/**
 * NDE Sonuç Sorgulama — Stiller
 * Profesyonel ve zarif tasarım.
 *
 * @version 1.0.1
 */

/* ═══════════════════ WRAPPER ═══════════════════ */
.nde-sonuc-wrapper {
    max-width: 580px;
    margin: 40px auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ═══════════════════ HERO BAŞLIK ═══════════════════ */
.nde-sonuc-hero {
    text-align: center;
    padding: 36px 32px 28px;
    background: #fff;
    border-radius: 16px 16px 0 0;
    border: 1px solid #e2e8f0;
    border-top: 4px solid #2C8C7B;
    border-bottom: none;
}

.nde-sonuc-hero-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #eef9f6, #e0f5f0);
    border-radius: 14px;
    color: #2C8C7B;
    margin-bottom: 16px;
}

.nde-sonuc-title {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #1B3A5C;
    margin: 0 0 10px;
    letter-spacing: -0.3px;
}

.nde-sonuc-subtitle {
    display: inline-block;
    font-size: 14px;
    color: #64748b;
    margin: 0;
    line-height: 1.6;
}

/* ═══════════════════ FORM KARTI ═══════════════════ */
.nde-sonuc-card {
    background: #fff;
    border-radius: 0 0 16px 16px;
    padding: 32px;
    box-shadow: 0 4px 24px rgba(27,58,92,0.06);
    border: 1px solid #e2e8f0;
    border-top: 1px solid #f1f5f9;
}

/* ═══════════════════ ADIMLAR ═══════════════════ */
.nde-sonuc-step {
    margin-bottom: 24px;
}

.nde-sonuc-step:last-of-type {
    margin-bottom: 0;
}

.nde-sonuc-step-hidden {
    display: none;
}

.nde-sonuc-step-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.nde-sonuc-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #1B3A5C, #2C5282);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    border-radius: 8px;
    flex-shrink: 0;
}

.nde-sonuc-step-label {
    font-size: 15px;
    font-weight: 600;
    color: #1B3A5C;
    letter-spacing: -0.2px;
}

.nde-sonuc-otp-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #64748b;
    margin: -6px 0 14px 38px;
    line-height: 1.4;
}

.nde-sonuc-otp-info svg {
    flex-shrink: 0;
    color: #94a3b8;
}

/* ═══════════════════ INPUT SATIRI ═══════════════════ */
.nde-sonuc-field-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.nde-sonuc-input-wrap {
    flex: 1;
    position: relative;
}

.nde-sonuc-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    transition: color 0.2s;
}

.nde-sonuc-input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    color: #1e293b;
    background: #f8fafc;
    transition: all 0.2s ease;
    outline: none;
    box-sizing: border-box;
    height: 48px;
}

.nde-sonuc-input::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

.nde-sonuc-input:hover {
    border-color: #cbd5e1;
    background: #fff;
}

.nde-sonuc-input:focus {
    border-color: #2C8C7B;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(44,140,123,0.1);
}

.nde-sonuc-input-wrap:focus-within .nde-sonuc-input-icon {
    color: #2C8C7B;
}

/* OTP input */
.nde-sonuc-otp-input {
    letter-spacing: 6px;
    font-weight: 600;
    text-align: center;
    padding-left: 42px;
    font-size: 18px;
}

/* ═══════════════════ BUTONLAR ═══════════════════ */
.nde-sonuc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s ease;
    outline: none;
    flex-shrink: 0;
    height: 48px;
}

.nde-sonuc-btn svg {
    flex-shrink: 0;
}

.nde-sonuc-btn:active {
    transform: scale(0.97);
}

/* Primary — Kod Gönder */
.nde-sonuc-btn-primary {
    background: linear-gradient(135deg, #1B3A5C, #2C5282);
    color: #fff;
    box-shadow: 0 2px 8px rgba(27,58,92,0.2);
}

.nde-sonuc-btn-primary:hover {
    background: linear-gradient(135deg, #234976, #3568a0);
    box-shadow: 0 4px 14px rgba(27,58,92,0.28);
    transform: translateY(-1px);
}

.nde-sonuc-btn-primary:disabled {
    background: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
    opacity: 0.8;
}

/* Success — Sonuçları Görüntüle */
.nde-sonuc-btn-success {
    background: linear-gradient(135deg, #2C8C7B, #38a89d);
    color: #fff;
    box-shadow: 0 2px 8px rgba(44,140,123,0.2);
}

.nde-sonuc-btn-success:hover {
    background: linear-gradient(135deg, #349e8c, #42bfb1);
    box-shadow: 0 4px 14px rgba(44,140,123,0.3);
    transform: translateY(-1px);
}

.nde-sonuc-btn-success:disabled {
    background: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
    opacity: 0.8;
}

/* Gönderildi durumu */
.nde-sonuc-btn.sent {
    background: linear-gradient(135deg, #2C8C7B, #38a89d) !important;
    box-shadow: 0 2px 8px rgba(44,140,123,0.2) !important;
}

/* ═══════════════════ MESAJLAR ═══════════════════ */
.nde-sonuc-message {
    display: none;
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    animation: nde-sonuc-fadeIn 0.3s ease;
}

.nde-sonuc-message.error {
    display: block;
    background: linear-gradient(135deg, #fef2f2, #fff5f5);
    color: #991b1b;
    border: 1px solid #fecaca;
}

.nde-sonuc-message.success {
    display: block;
    background: linear-gradient(135deg, #f0fdf4, #f7fdf9);
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* ═══════════════════ SONUÇ KARTLARI ═══════════════════ */
.nde-sonuc-results {
    margin-top: 20px;
}

.nde-sonuc-results-header {
    text-align: center;
    padding: 24px;
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
    border-radius: 14px 14px 0 0;
    border: 1px solid #bbf7d0;
    border-bottom: none;
}

.nde-sonuc-results-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #dcfce7;
    border-radius: 50%;
    color: #16a34a;
    margin-bottom: 10px;
}

.nde-sonuc-results-header h3 {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #166534;
    margin: 0;
}

/* Sonuç kartı */
.nde-result-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-top: none;
    padding: 0;
    overflow: hidden;
}

.nde-result-card:last-child {
    border-radius: 0 0 14px 14px;
}

.nde-result-card:first-child:not(:only-child) {
    border-top: 1px solid #e2e8f0;
}

.nde-result-card:only-child {
    border-top: 1px solid #e2e8f0;
}

.nde-result-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 24px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-bottom: 1px solid #e2e8f0;
}

.nde-result-card-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #1B3A5C, #2C5282);
    color: #fff;
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
    letter-spacing: -0.5px;
}

.nde-result-card-info {
    flex: 1;
    min-width: 0;
}

.nde-result-card-name {
    font-size: 16px;
    font-weight: 700;
    color: #1B3A5C;
    margin: 0;
    line-height: 1.3;
}

.nde-result-card-donem {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: #2C8C7B;
    background: #E8F4F8;
    padding: 2px 10px;
    border-radius: 20px;
    margin-top: 3px;
}

/* Sonuç tablosu */
.nde-result-table {
    width: 100%;
    border-collapse: collapse;
}

.nde-result-table tr {
    transition: background 0.15s;
}

.nde-result-table tr:hover {
    background: #f8fafc;
}

.nde-result-table th,
.nde-result-table td {
    padding: 13px 24px;
    border-bottom: 1px solid #f1f5f9;
    text-align: left;
    font-size: 14px;
    vertical-align: middle;
}

.nde-result-table tr:last-child th,
.nde-result-table tr:last-child td {
    border-bottom: none;
}

.nde-result-table th {
    color: #64748b;
    font-weight: 500;
    width: 42%;
    white-space: nowrap;
}

.nde-result-table td {
    color: #1e293b;
    font-weight: 500;
}

/* Badge'ler */
.nde-result-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1px;
}

.nde-result-badge.kabul {
    background: linear-gradient(135deg, #dcfce7, #d1fae5);
    color: #166534;
}

.nde-result-badge.yedek {
    background: linear-gradient(135deg, #fef3c7, #fef9c3);
    color: #92400e;
}

.nde-result-badge.red {
    background: linear-gradient(135deg, #fee2e2, #fce7f3);
    color: #991b1b;
}

.nde-result-badge.beklemede {
    background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
    color: #475569;
}

.nde-result-badge.belirlenmedi {
    background: #f1f5f9;
    color: #94a3b8;
}

/* Açıklama notu */
.nde-result-note {
    margin: 0;
    padding: 14px 24px;
    background: linear-gradient(135deg, #fffbeb, #fefce8);
    border-top: 1px solid #fde68a;
    font-size: 13px;
    color: #92400e;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.nde-result-note svg {
    flex-shrink: 0;
    margin-top: 1px;
}

/* Başvuru bulunamadı */
.nde-sonuc-empty {
    text-align: center;
    padding: 48px 32px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
}

.nde-sonuc-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: #f1f5f9;
    border-radius: 50%;
    color: #94a3b8;
    margin-bottom: 16px;
}

.nde-sonuc-empty h4 {
    font-size: 16px;
    font-weight: 600;
    color: #475569;
    margin: 0 0 6px;
}

.nde-sonuc-empty p {
    font-size: 13px;
    color: #94a3b8;
    margin: 0;
}

/* Yeniden sorgula butonu */
.nde-sonuc-retry-wrap {
    text-align: center;
    margin-top: 20px;
}

.nde-sonuc-btn-retry {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.nde-sonuc-btn-retry:hover {
    border-color: #1B3A5C;
    color: #1B3A5C;
    background: #f8fafc;
}

/* ═══════════════════ ANİMASYONLAR ═══════════════════ */
@keyframes nde-sonuc-fadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.nde-sonuc-step-reveal {
    animation: nde-sonuc-fadeIn 0.35s ease;
}

.nde-sonuc-results-reveal {
    animation: nde-sonuc-fadeIn 0.4s ease;
}

/* ═══════════════════ RESPONSİVE ═══════════════════ */
@media (max-width: 600px) {
    .nde-sonuc-wrapper {
        margin: 20px 12px;
    }

    .nde-sonuc-hero {
        padding: 28px 20px 24px;
    }

    .nde-sonuc-title {
        font-size: 19px;
    }

    .nde-sonuc-card {
        padding: 20px 16px;
    }

    .nde-sonuc-field-row {
        flex-direction: column;
    }

    .nde-sonuc-btn {
        width: 100%;
        justify-content: center;
    }

    .nde-result-table th,
    .nde-result-table td {
        padding: 10px 16px;
        font-size: 13px;
    }

    .nde-result-card-header {
        padding: 14px 16px;
    }

    .nde-result-note {
        padding: 12px 16px;
    }

    .nde-sonuc-otp-info {
        margin-left: 0;
    }
}

@media (max-width: 400px) {
    .nde-sonuc-hero {
        padding: 24px 16px 20px;
    }

    .nde-sonuc-hero-icon {
        width: 48px;
        height: 48px;
    }

    .nde-sonuc-title {
        font-size: 17px;
    }

    .nde-sonuc-subtitle {
        font-size: 13px;
    }
}
