/* TB Job Board - Single vacancy page */
.tbjb-single {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.tbjb-single-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.tbjb-single-content-col {
    flex: 1;
    min-width: 0;
}

.tbjb-single-meta-col {
    flex: 0 0 340px;
    align-self: flex-start;
}

.tbjb-single-meta {
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,.04);
}

@media (min-width: 993px) {
    .tbjb-single-meta-col {
        position: sticky;
        top: 24px;
    }
}

@media (max-width: 992px) {
    .tbjb-single-layout {
        flex-direction: column;
    }
    .tbjb-single-meta-col {
        flex: none;
        width: 100%;
        order: -1;
    }
}

/* Apply form view: centered, max 700px */
.tbjb-single--apply .tbjb-single-content-col {
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
}

/* Same validation styles as tbjb-form.css */
.tbjb-apply-required-hint {
    display: none;
    font-size: 12px;
    color: #ff0000;
    margin-top: 4px;
    line-height: 1.3;
}

.tbjb-apply-field.tbjb-field--error .tbjb-apply-required-hint {
    display: block;
}

.tbjb-apply-field.tbjb-field--error input,
.tbjb-apply-field.tbjb-field--error textarea {
    border-color: #ff0000 !important;
}

.tbjb-required-mark {
    color: #ff0000;
    font-weight: 600;
}

.tbjb-apply-validation-msg {
    padding: 14px 18px;
    margin-bottom: 20px;
    background: #fff5f5;
    border: 1px solid #fecaca;
    border-radius: 12px;
    color: #dc3545;
    font-size: 14px;
}

.tbjb-single-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.tbjb-single-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: opacity .2s, background .2s;
}

.tbjb-single-btn:hover {
    opacity: .9;
}

.tbjb-single-btn--back {
    background: #f0f0f0;
    color: #333;
}

.tbjb-single-btn--apply {
    background: #52b7b5;
    color: #fff;
    transition: all 0.3s ease 0s;
    &:hover { 
        background-color: #4c9491;
        color: #fff;
    }
}

.tbjb-single-meta p {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.5;
}

.tbjb-single-meta p:last-child {
    margin-bottom: 0;
}

.tbjb-single-meta-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.tbjb-single-meta-row .tbjb-meta-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    color: #52b7b5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tbjb-single-meta-row .tbjb-meta-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.tbjb-single-meta-row .tbjb-meta-text {
    flex: 1;
    min-width: 0;
}

.tbjb-single-content {
    font-size: 16px;
    line-height: 1.7;
}

.tbjb-single-content h1,
.tbjb-single-content h2,
.tbjb-single-content h3 {
    margin-top: 24px;
    margin-bottom: 12px;
}

.tbjb-single-content h1:first-child { margin-top: 0; }

.tbjb-single-footer {
    display: none;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #eee;
}

@media (max-width: 992px) {
    .tbjb-single-footer {
        display: block;
    }
}

.tbjb-single-footer a {
    display: inline-block;
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
}

.tbjb-single-footer a:hover {
    background: #f9f9f9;
}

/* Apply form view */
.tbjb-apply-header {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.tbjb-apply-job-title {
    font-size: 28px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tbjb-apply-summary {
    color: #666;
    font-size: 14px;
    margin: 0 0 24px;
}

/* When success block is visible, hide header, job title and summary */
.tbjb-single-content-col.tbjb-apply-success-visible .tbjb-apply-header,
.tbjb-single-content-col.tbjb-apply-success-visible .tbjb-apply-job-title,
.tbjb-single-content-col.tbjb-apply-success-visible .tbjb-apply-summary {
    display: none !important;
}

.tbjb-apply-form-wrap {
    max-width: 680px;
}

.tbjb-apply-form-wrap .tbjb-apply-title {
    font-size: 22px;
    margin: 28px 0 16px;
}

.tbjb-apply-form-wrap .tbjb-apply-title:first-child {
    margin-top: 0;
}

.tbjb-apply-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
}

@media (max-width: 600px) {
    .tbjb-apply-grid {
        grid-template-columns: 1fr;
    }
}

.tbjb-apply-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tbjb-apply-field.tbjb-apply-field--full {
    grid-column: 1 / -1;
}

.tbjb-apply-field label {
    font-size: 14px;
    font-weight: 500;
}

.tbjb-apply-field input,
.tbjb-apply-field textarea {
    padding: 12px 14px;
    border: 1px solid #c3c4c7;
    border-radius: 10px;
    font-size: 15px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.tbjb-apply-field input:focus,
.tbjb-apply-field textarea:focus {
    border-color: #52b7b5;
    outline: none;
    box-shadow: 0 0 0 2px rgba(82, 183, 181, 0.2);
}

.tbjb-apply-field input:hover,
.tbjb-apply-field textarea:hover {
    border-color: #a7aaad;
}

.tbjb-apply-field textarea {
    min-height: 100px;
    resize: vertical;
}

.tbjb-apply-uploads {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Phone input (intl-tel-input) */
.tbjb-apply-form-wrap .iti {
    width: 100%;
    position: relative;
}

.tbjb-apply-form-wrap .iti__flag-container {
    z-index: 2;
}

.tbjb-apply-form-wrap .iti__country-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 2px;
    max-height: 240px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 9999;
}

.tbjb-apply-form-wrap .iti__selected-flag {
    border-radius: 10px 0 0 10px;
}

.tbjb-apply-form-wrap input[type="tel"] {
    padding-left: 58px; /* space for flag and dial code */
}

/* Ensure flags sprite loads and render sharply on iOS/macOS (WebKit).
 * Apply to .iti__flag globally: on mobile iOS the dropdown is often outside the form
 * (e.g. appended to body), so flags in the list need these styles too. */
.tbjb-apply-form-wrap .iti__flag,
.iti__flag {
    background-image: url("https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/24.0.0/img/flags.png") !important;
    background-repeat: no-repeat;
    background-size: 5938px 15px !important;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
}

@media only screen and (-webkit-min-device-pixel-ratio: 2),
       only screen and (min--moz-device-pixel-ratio: 2),
       only screen and (-o-min-device-pixel-ratio: 2/1),
       only screen and (min-device-pixel-ratio: 2),
       only screen and (min-resolution: 192dpi),
       only screen and (min-resolution: 2dppx) {
    .tbjb-apply-form-wrap .iti__flag,
    .iti__flag {
        background-image: url("https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/24.0.0/img/flags@2x.png") !important;
        background-size: 5938px 15px !important;
    }
}

.tbjb-apply-file-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tbjb-apply-file-name {
    flex: 1;
    min-width: 0;
}

.tbjb-apply-file-remove {
    flex-shrink: 0;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #b85450;
    background: #fff;
    border: 1px solid #e8c4c2;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.tbjb-apply-file-remove:hover {
    background: #fef2f2;
    border-color: #d4a5a5;
    color: #9b3c38;
}

.tbjb-apply-file-remove.tbjb-apply-file-remove--hidden {
    display: none !important;
    visibility: hidden;
    pointer-events: none;
}

.tbjb-apply-file-row--hidden {
    display: none;
}

.tbjb-apply-add-file-wrap {
    margin-top: 12px;
}

.tbjb-apply-add-file-btn {
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    color: #52b7b5;
    background: transparent;
    border: 1px solid #52b7b5;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.tbjb-apply-add-file-btn:hover {
    background: #52b7b5;
    color: #fff;
}

.tbjb-apply-add-file-btn.tbjb-add-file-hidden {
    display: none;
}

.tbjb-apply-file-btn {
    flex-shrink: 0;
    padding: 8px 16px;
    background: #52b7b5;
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
}

.tbjb-apply-file-btn:hover {
    opacity: .9;
}

.tbjb-apply-file-name {
    font-size: 14px;
    color: #666;
}

.tbjb-apply-submit {
    margin-top: 24px;
}

.tbjb-apply-submit .tbjb-single-btn--apply {
    min-width: 120px;
}

.tbjb-apply-success {

}

.description { 
    font-size: 14px;
}