/* ==========================================================================
   BSP - Belge Sorgu Paneli Frontend Stilleri
   Site renkleri: #c8202c (kırmızı), #d62828 (canlı kırmızı), #1a1a1a (siyah)
   ========================================================================== */

.bsp-sorgu-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #2c2c2c;
    line-height: 1.6;
    padding: 20px 0 40px;
}

.bsp-sorgu-wrapper * { box-sizing: border-box; }

.bsp-sorgu-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 16px;
}

/* SEKMELER - Tek konteyner içinde yan yana hap kutucuklar */
.bsp-tabs-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    margin-bottom: 24px;
    padding: 8px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
    border: 1px solid #f0f0f0;
}

.bsp-tab-card {
    flex: 1 1 0;
    min-width: 0;
    padding: 14px 16px;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    user-select: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bsp-tab-card:hover:not(.active) {
    background: #f6f6f6;
}

.bsp-tab-card.active {
    background: linear-gradient(135deg, #c8202c 0%, #d62828 100%);
    box-shadow: 0 4px 14px rgba(200, 32, 44, 0.28);
}

.bsp-tab-card:focus {
    outline: none;
}

.bsp-tab-card:focus-visible {
    box-shadow: 0 0 0 3px rgba(200, 32, 44, 0.18);
}

.bsp-tab-card.active:focus-visible {
    box-shadow: 0 4px 14px rgba(200, 32, 44, 0.28), 0 0 0 3px rgba(200, 32, 44, 0.25);
}

.bsp-tab-label {
    display: block;
    font-size: 14.5px;
    font-weight: 600;
    color: #6a6a6a;
    letter-spacing: 0.2px;
    line-height: 1.3;
    transition: color 0.2s ease;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bsp-tab-card:hover:not(.active) .bsp-tab-label {
    color: #1a1a1a;
}

.bsp-tab-card.active .bsp-tab-label {
    color: #ffffff;
    font-weight: 700;
}

/* FORM KARTI */
.bsp-sorgu-form-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 36px 36px 32px;
    position: relative;
    overflow: hidden;
}

.bsp-sorgu-form-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #c8202c 0%, #d62828 100%);
}

.bsp-sorgu-form-header {
    text-align: center;
    margin-bottom: 28px;
}

.bsp-sorgu-form-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px;
    letter-spacing: -0.3px;
}

.bsp-sorgu-form-header p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* FORM */
.bsp-sorgu-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.bsp-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bsp-form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    letter-spacing: 0.2px;
}

.bsp-form-group input[type="text"] {
    width: 100%;
    padding: 13px 16px;
    font-size: 15px;
    color: #1a1a1a;
    background: #f8f8f8;
    border: 2px solid #e8e8e8;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-family: inherit;
    outline: none;
}

.bsp-form-group input[type="text"]:focus {
    background: #ffffff;
    border-color: #c8202c;
    box-shadow: 0 0 0 3px rgba(200, 32, 44, 0.1);
}

.bsp-form-group input[type="text"]::placeholder {
    color: #aaa;
}

/* BUTON */
.bsp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    letter-spacing: 0.3px;
    margin-top: 8px;
}

.bsp-btn-primary {
    background: #c8202c;
    color: #ffffff;
}

.bsp-btn-primary:hover {
    background: #a51924;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(200, 32, 44, 0.25);
}

.bsp-btn-primary:active {
    transform: translateY(0);
}

.bsp-btn .bsp-btn-loading { display: none; }
.bsp-btn.is-loading .bsp-btn-text { display: none; }
.bsp-btn.is-loading .bsp-btn-loading { display: inline; }
.bsp-btn.is-loading {
    background: #888;
    cursor: not-allowed;
}

/* SONUÇ KARTI */
.bsp-sorgu-sonuc {
    margin-top: 24px;
}

.bsp-sonuc-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    animation: bspFadeIn 0.4s ease;
}

@keyframes bspFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.bsp-sonuc-header {
    padding: 20px 28px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 14px;
}

.bsp-sonuc-header.is-valid {
    background: linear-gradient(135deg, #2d7a2d 0%, #3a9b3a 100%);
}

.bsp-sonuc-header.is-invalid {
    background: linear-gradient(135deg, #c8202c 0%, #d62828 100%);
}

.bsp-sonuc-header .bsp-sonuc-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
    font-weight: 700;
}

.bsp-sonuc-header .bsp-sonuc-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 2px;
    color: #ffffff;
}

.bsp-sonuc-header .bsp-sonuc-subtitle {
    font-size: 13px;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
}

.bsp-sonuc-body {
    padding: 24px 28px;
}

.bsp-sonuc-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.bsp-sonuc-row:last-child { border-bottom: none; }

.bsp-sonuc-label {
    font-size: 13px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bsp-sonuc-value {
    font-size: 15px;
    color: #1a1a1a;
    font-weight: 500;
}

.bsp-sonuc-value.bsp-strong {
    font-weight: 700;
    font-size: 16px;
}

.bsp-status-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.bsp-status-pill.bsp-valid {
    background: #e6f3e6;
    color: #2d7a2d;
}

.bsp-status-pill.bsp-invalid {
    background: #fce8e8;
    color: #c41e1e;
}

/* HATA KARTI */
.bsp-error-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 24px 28px;
    text-align: center;
    border-left: 5px solid #c8202c;
    animation: bspFadeIn 0.4s ease;
}

.bsp-error-card .bsp-error-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fce8e8;
    color: #c41e1e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.bsp-error-card h4 {
    font-size: 17px;
    color: #1a1a1a;
    margin: 0 0 6px;
    font-weight: 700;
}

.bsp-error-card p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* MOBIL */
@media (max-width: 600px) {
    .bsp-tabs-grid {
        gap: 4px;
        padding: 5px;
        margin-bottom: 18px;
    }
    .bsp-tab-card {
        padding: 12px 6px;
    }
    .bsp-tab-label {
        font-size: 12px;
        font-weight: 600;
        letter-spacing: 0;
    }
    .bsp-sorgu-form-card {
        padding: 28px 22px 24px;
    }
    .bsp-sorgu-form-header h3 {
        font-size: 20px;
    }
    .bsp-sonuc-header {
        padding: 18px 20px;
    }
    .bsp-sonuc-body {
        padding: 18px 20px;
    }
    .bsp-sonuc-row {
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 10px 0;
    }
    .bsp-sonuc-label {
        font-size: 11px;
    }
    .bsp-sonuc-value {
        font-size: 14px;
    }
}

/* Çok küçük ekranlar - tek kelime */
@media (max-width: 380px) {
    .bsp-tab-label {
        font-size: 11px;
    }
}
