.career-modal,
.career-modal *,
.career-modal *::before,
.career-modal *::after {
    box-sizing: border-box;
}

.career-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.career-modal.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0s linear 0s;
}

/* Body scroll lock — modal açıkken arka plan kaymasın */
body.career-modal-open {
    overflow: hidden;
}

/* Karartma overlay */
.career-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(8, 6, 6, 0.88);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    cursor: pointer;
}

/* İçerik kutusu */
.career-modal__container {
    position: absolute;
    inset: 24px;
    max-width: 980px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    transform: scale(0.96) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.career-modal.is-open .career-modal__container {
    transform: scale(1) translateY(0);
}

/* Kapat butonu (sağ üst) */
.career-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 20;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(21, 55, 80, 0.85);
    color: #ffffff;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    padding: 0;
}

.career-modal__close:hover {
    background: #d2d945;
    color: #153750;
    transform: rotate(90deg);
}

/* ============ HEADER ============ */
.career-modal__header {
    background: #153750;
    color: #ffffff;
    padding: 24px 36px 22px;
    padding-right: 70px; /* Kapat butonu için yer aç */
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 22px;
}

/* Header'ın sol kısmı (başlık + alt yazı) */
.career-modal__header-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.career-modal__title {
    color: #d2d945;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 6px;
    line-height: 1.2;
    letter-spacing: 0.02em;
}

.career-modal__subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
    max-width: 600px;
}

/* ============ ALERT MESAJ KUTUSU (header'ın sağında) ============ */
/* Default gizli — JS .is-visible class'ı ekleyince görünür olur */
.career-modal__alert {
    flex: 0 0 300px;
    border-radius: 8px;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 4px solid transparent;
    background: rgba(255, 255, 255, 0.04);
    opacity: 0;
    transform: translateX(8px);
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
    pointer-events: none;
}

.career-modal__alert.is-visible {
    opacity: 1;
    transform: translateX(0);
    visibility: visible;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0s;
}

/* Başarı varyasyonu — marka renkli */
.career-modal__alert--success {
    background: rgba(210, 217, 69, 0.12);
    border-left-color: #d2d945;
}

.career-modal__alert--success .career-modal__alert__icon,
.career-modal__alert--success .career-modal__alert__title {
    color: #d2d945;
}

/* Hata varyasyonu — kırmızı */
.career-modal__alert--error {
    background: rgba(231, 76, 60, 0.15);
    border-left-color: #e74c3c;
}

.career-modal__alert--error .career-modal__alert__icon,
.career-modal__alert--error .career-modal__alert__title {
    color: #ff7b6b;
}

/* Alert başlığı satırı: ikon + başlık */
.career-modal__alert__head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 3px;
}

.career-modal__alert__icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.career-modal__alert__icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.career-modal__alert__title {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    letter-spacing: 0.02em;
}

.career-modal__alert__subtitle {
    color: rgba(255, 255, 255, 0.78);
    font-size: 11.5px;
    line-height: 1.4;
    margin: 0;
}

/* ============ FORM ALANI ============ */
.career-modal__body {
    padding: 28px 36px;
    overflow-y: auto;
    overflow-x: hidden; /* İçerik genişse asla yatay kaymasın */
    flex: 1;
    min-height: 0;
}

/* Form grid yapısı: 2 sütun (geniş ekranda).
   minmax(0, 1fr) → grid item'ların shrink edebilmesi için kritik.
   1fr varsayılan min-width: auto'dur ve içerik genişse hücre büyür, taşma olur. */
.career-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px 20px;
}

/* Tam genişlik öğeler */
.career-form__full {
    grid-column: 1 / -1;
}

/* Form grup (label + input wrapper) */
.career-form__group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0; /* Grid/flex içinde shrink için zorunlu */
}

.career-form__label {
    color: #153750;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0;
}

.career-form__label .required {
    color: #d63031;
    margin-left: 2px;
}

/* Input ve select temel stili */
.career-form__input,
.career-form__select {
    width: 100%;
    max-width: 100%; /* Global input kuralları varsa override güvencesi */
    padding: 11px 14px;
    border: 1.5px solid #e1e4e8;
    border-radius: 6px;
    background: #ffffff;
    color: #153750;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Number input arrow'larını gizle — hem masaüstünde hem mobilde temiz görünüm */
.career-form__input[type="number"] {
    -moz-appearance: textfield;
}
.career-form__input[type="number"]::-webkit-outer-spin-button,
.career-form__input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.career-form__input:focus,
.career-form__select:focus {
    outline: none;
    border-color: #d2d945;
    box-shadow: 0 0 0 3px rgba(210, 217, 69, 0.18);
}

.career-form__input::placeholder {
    color: #a0a8b0;
}

/* Hatalı alan stili */
.career-form__input.has-error,
.career-form__select.has-error,
.career-form__file.has-error {
    border-color: #d63031;
    box-shadow: 0 0 0 3px rgba(214, 48, 49, 0.12);
}

.career-form__error {
    color: #d63031;
    font-size: 11px;
    margin: 4px 0 0;
    min-height: 14px;
    line-height: 1.2;
}

/* Select için özel ok ikonu (appearance:none yüzünden) */
.career-form__select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23153750'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    padding-right: 38px;
    cursor: pointer;
}

/* ============ RADIO GRUBU (Cinsiyet) ============ */
.career-form__radios {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.career-form__radio {
    flex: 1;
    min-width: 100px;
    position: relative;
    cursor: pointer;
}

/* Native radio gizle, label'ı buton gibi göster */
.career-form__radio input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.career-form__radio-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border: 1.5px solid #e1e4e8;
    border-radius: 6px;
    background: #ffffff;
    color: #153750;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.career-form__radio:hover .career-form__radio-label {
    border-color: #d2d945;
}

.career-form__radio input[type="radio"]:checked + .career-form__radio-label {
    background: #d2d945;
    border-color: #d2d945;
    color: #153750;
    font-weight: 700;
}

.career-form__radio input[type="radio"]:focus-visible + .career-form__radio-label {
    box-shadow: 0 0 0 3px rgba(210, 217, 69, 0.25);
}

/* ============ PDF UPLOAD ALANI ============ */
.career-form__file-wrapper {
    position: relative;
}

/* Native input gizle */
.career-form__file-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
}

/* Drag & drop tarzı görsel etiket */
.career-form__file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    border: 1.5px dashed #cdd2d8;
    border-radius: 8px;
    background: #f8f9fa;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.career-form__file:hover,
.career-form__file.is-dragover {
    border-color: #d2d945;
    background: rgba(210, 217, 69, 0.08);
}

.career-form__file-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    background: #153750;
    color: #d2d945;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.career-form__file-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.career-form__file-text {
    flex: 1;
    min-width: 0; /* flex item shrink için zorunlu — uzun dosya isimleri ekrandan taşmasın */
}

.career-form__file-title {
    display: block;
    color: #153750;
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.career-form__file-hint {
    display: block;
    color: #6c757d;
    font-size: 11px;
    font-weight: 400;
}

/* Dosya seçilince — temizle butonu */
.career-form__file-clear {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid #cdd2d8;
    color: #6c757d;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.career-form__file-clear:hover {
    border-color: #d63031;
    color: #d63031;
}

/* Dosya seçildiğinde temizle butonunu göster */
.career-form__file.has-file .career-form__file-clear {
    display: flex;
}

.career-form__file.has-file {
    border-style: solid;
    border-color: #d2d945;
    background: rgba(210, 217, 69, 0.06);
}

/* ============ FOOTER (Submit) ============ */
.career-modal__footer {
    padding: 18px 36px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid #eef0f2;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.career-modal__info {
    color: #6c757d;
    font-size: 11px;
    line-height: 1.4;
    flex: 1;
    min-width: 200px;
}

/* Submit butonu — site tema buton stiline benzer */
.career-form__submit {
    position: relative;
    padding: 14px 36px;
    background: #d2d945;
    color: #153750;
    border: 2px solid #d2d945;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease;
    min-width: 180px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.career-form__submit:hover:not(:disabled) {
    background: #153750;
    color: #d2d945;
}

.career-form__submit:active:not(:disabled) {
    transform: translateY(1px);
}

.career-form__submit:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Submit butonunda loading state — küçük spinner */
.career-form__submit-spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid currentColor;
    border-right-color: transparent;
    animation: career-spin 0.8s linear infinite;
    display: none;
}

.career-form__submit.is-loading .career-form__submit-spinner {
    display: inline-block;
}

.career-form__submit.is-loading .career-form__submit-text {
    opacity: 0.7;
}

@keyframes career-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============ HONEYPOT (anti-spam) ============ */
/* Botların doldurmaya çalıştığı görünmez alan */
.career-form__honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* ============ RESPONSIVE ============ */

/* Tablet (≤768px): Tek sütunlu form, container tam ekran */
@media (max-width: 768px) {
    .career-modal__container {
        inset: 0;
        border-radius: 0;
        max-width: none;
    }

    .career-modal__header {
        flex-direction: column;
        padding: 20px 20px 16px;
        padding-right: 56px; /* Kapat butonu için yer aç */
        gap: 12px;
    }

    .career-modal__title {
        font-size: 19px;
    }

    .career-modal__subtitle {
        font-size: 12.5px;
    }

    /* Mobilde alert tam genişlik, header'ın altında */
    .career-modal__alert {
        flex: 0 0 auto;
        width: 100%;
        padding: 12px 14px;
    }

    .career-modal__body {
        padding: 20px;
    }

    .career-form {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    /* iOS Safari zoom önleme — input font-size mutlaka 16px olmalı,
       yoksa focus olunca tarayıcı otomatik zoom yapıp sayfayı kaydırır */
    .career-form__input,
    .career-form__select {
        font-size: 16px;
        padding: 10px 12px;
    }

    /* Select arrow konumunu küçük padding'e göre ayarla */
    .career-form__select {
        background-position: right 8px center;
        padding-right: 34px;
    }

    /* File upload alanı kompakt */
    .career-form__file {
        padding: 12px 14px;
        gap: 10px;
    }

    .career-form__file-icon {
        width: 32px;
        height: 32px;
    }

    .career-form__file-title {
        font-size: 12.5px;
    }

    .career-form__file-hint {
        font-size: 10.5px;
    }

    /* Radio butonlar arası boşluk azalsın */
    .career-form__radios {
        gap: 8px;
    }

    .career-form__radio {
        min-width: 0; /* 100px sabit min-width'i kaldır, esnek olsun */
    }

    .career-form__radio-label {
        padding: 9px 12px;
    }

    /* Footer */
    .career-modal__footer {
        padding: 14px 20px 20px;
        gap: 12px;
    }

    .career-modal__info {
        font-size: 10.5px;
        min-width: 0; /* Önceki 200px'i kaldır → daralabilir */
    }

    .career-form__submit {
        width: 100%;
        min-width: 0;
        padding: 13px 24px;
    }

    /* Kapat butonunu da küçük tut */
    .career-modal__close {
        width: 36px;
        height: 36px;
        top: 10px;
        right: 10px;
        font-size: 22px;
    }
}

/* Küçük mobil (≤480px): radio dikey stack, daha kompakt */
@media (max-width: 480px) {
    .career-modal__header {
        padding: 18px 16px 14px;
        padding-right: 52px;
    }

    .career-modal__body {
        padding: 18px 16px;
    }

    .career-form {
        gap: 12px;
    }

    .career-modal__footer {
        padding: 12px 16px 18px;
    }

    /* Radio butonlar dikey */
    .career-form__radios {
        flex-direction: column;
        gap: 6px;
    }

    /* File upload: tek satıra sığmazsa metin satırı küçült */
    .career-form__file {
        padding: 12px;
    }

    .career-form__file-title {
        /* Çok uzun dosya isimleri için ellipsis korunur, ama küçük ekranda mesaj kısalsın */
        font-size: 12px;
    }
}

/* Çok dar ekran (≤360px): en kompakt */
@media (max-width: 360px) {
    .career-modal__header {
        padding: 16px 14px 12px;
        padding-right: 48px;
    }

    .career-modal__title {
        font-size: 17px;
    }

    .career-modal__body {
        padding: 16px 14px;
    }

    .career-form__label {
        font-size: 10.5px;
    }
}

@media (max-height: 600px) and (max-width: 768px) {
    .career-modal__title {
        font-size: 17px;
        margin-bottom: 3px;
    }

    .career-modal__subtitle {
        font-size: 11.5px;
    }

    .career-modal__header {
        padding-top: 14px;
        padding-bottom: 12px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .career-modal,
    .career-modal__container,
    .career-modal__close,
    .career-form__submit {
        transition: none;
    }
    .career-form__submit-spinner {
        animation-duration: 2s;
    }
}