/**
 * Şehir Mini Anketi Popup Stilleri
 * Eniyi.Best kurumsal renkleriyle uyumlu (rgb(133, 93, 52) / #855d34 bronz-altın),
 * dikey ve yatay olarak tam ortalı modal tasarımı.
 */

:root {
    --sp-brand: #855d34;
    --sp-brand-hover: #6d4a27;
    --sp-brand-light: #f7efe7;
    --sp-brand-border: #ebd9c8;
    --sp-brand-glow: rgba(133, 93, 52, 0.2);
    --sp-bg-card: #ffffff;
    --sp-bg-input: #faf7f5;
    --sp-border: #e2d9d0;
    --sp-border-input: #dcd1c7;
    --sp-text: #1e1e1e;
    --sp-text-muted: #786f66;
    --sp-radius: 18px;
    --sp-shadow: 0 25px 60px -12px rgba(45, 30, 15, 0.35), 0 0 0 1px rgba(133, 93, 52, 0.1);
}

/* Arka Plan Karartması */
.sp-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(25, 20, 15, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 999990;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
}
.sp-backdrop.sp-visible {
    opacity: 1;
    visibility: visible;
}

/* Pasta Volkanı, Yıldızlar & Katkı Kutlama Canvas Katmanı */
.sp-fountain-canvas {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    touch-action: none;
    z-index: 999995; /* Backdrop (999990) ile Modal (999999) arasında */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s;
}
.sp-fountain-canvas.sp-visible {
    opacity: 1;
    visibility: visible;
}

/* Dikey ve Yatay Tam Ortalı Modal Kapsayıcı */
.sp-modal-wrapper {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 999999;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    color: var(--sp-text);
    box-sizing: border-box;
    width: 92%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translate(-50%, -46%) scale(0.96);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s, visibility 0.3s;
}

.sp-modal-wrapper.sp-visible {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
}

.sp-modal-wrapper * {
    box-sizing: border-box;
}

/* Ana Kart - Parlayan Yıldız Halesi ve Zarif Gölgelendirme */
.sp-card {
    background: var(--sp-bg-card);
    border: 1px solid var(--sp-brand-border);
    border-radius: var(--sp-radius);
    padding: 24px;
    box-shadow: var(--sp-shadow), 0 0 20px rgba(245, 158, 11, 0.2);
    position: relative;
    animation: spStarGlow 3s infinite alternate ease-in-out;
}

@keyframes spStarGlow {
    0% {
        box-shadow: 0 25px 60px -12px rgba(45, 30, 15, 0.35),
                    0 0 16px rgba(251, 191, 36, 0.18);
        border-color: rgba(235, 217, 200, 0.9);
    }
    100% {
        box-shadow: 0 28px 65px -10px rgba(45, 30, 15, 0.38),
                    0 0 26px rgba(251, 191, 36, 0.32),
                    0 0 45px rgba(245, 158, 11, 0.12);
        border-color: rgba(251, 191, 36, 0.5);
    }
}

@media (max-width: 480px) {
    .sp-card {
        padding: 20px 18px;
        border-radius: 16px;
    }
}

/* Üst Başlık & Kapatma */
.sp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.sp-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--sp-brand-light);
    color: var(--sp-brand);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid var(--sp-brand-border);
}
.sp-close-btn {
    background: transparent;
    border: none;
    color: var(--sp-text-muted);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}
.sp-close-btn:hover {
    color: var(--sp-text);
    background: #f3ece5;
}

/* İlerleme Çubuğu */
.sp-progress-container {
    width: 100%;
    height: 3px;
    background: #f0e9e2;
    border-radius: 2px;
    margin-bottom: 16px;
    overflow: hidden;
}
.sp-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #c59b6d, var(--sp-brand));
    width: 50%;
    transition: width 0.3s ease;
}

/* Soru Başlığı */
.sp-soru-text {
    font-family: 'Capriola', 'Roboto', sans-serif;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.45;
    color: #1e1e1e;
    margin: 0 0 16px 0;
    text-align: left;
}
.sp-soru-text .sp-highlight {
    color: var(--sp-brand);
    font-weight: 700;
}

/* Giriş Alanı / Autocomplete */
.sp-input-group {
    position: relative;
    margin-bottom: 16px;
}
.sp-text-input {
    width: 100%;
    background: var(--sp-bg-input);
    border: 1.5px solid var(--sp-border-input);
    border-radius: 10px;
    padding: 12px 14px;
    color: #1e1e1e;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.sp-text-input:focus {
    background: #ffffff;
    border-color: var(--sp-brand);
    box-shadow: 0 0 0 3px var(--sp-brand-glow);
}
.sp-text-input::placeholder {
    color: #8c827a;
}

/* Öneri Açılır Listesi */
.sp-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid var(--sp-border-input);
    border-radius: 10px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
    display: none;
    padding: 4px 0;
    list-style: none;
    margin: 0;
}
.sp-suggestions.sp-open {
    display: block;
}
.sp-suggestion-item {
    padding: 10px 14px;
    font-size: 13px;
    cursor: pointer;
    border-bottom: 1px solid #f3ece5;
    transition: background 0.15s, color 0.15s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #1e1e1e;
}
.sp-suggestion-item:last-child {
    border-bottom: none;
}
.sp-suggestion-item:hover,
.sp-suggestion-item.sp-active {
    background: var(--sp-brand-light);
    color: var(--sp-brand);
}
.sp-suggestion-sub {
    font-size: 11px;
    color: var(--sp-text-muted);
}

/* Çoktan Seçmeli Butonlar */
.sp-options-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}
.sp-option-label {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--sp-bg-input);
    border: 1px solid var(--sp-border);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    color: #1e1e1e;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    margin: 0;
}
.sp-option-label:hover {
    border-color: #c59b6d;
    background: #f7efe7;
}
.sp-option-label.sp-selected {
    border-color: var(--sp-brand);
    background: var(--sp-brand-light);
    color: var(--sp-brand);
    font-weight: 600;
}
.sp-option-label input[type="radio"] {
    accent-color: var(--sp-brand);
    width: 16px;
    height: 16px;
    margin: 0;
}

/* Evet / Hayır Butonları */
.sp-yn-group {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}
.sp-yn-btn {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--sp-border);
    background: var(--sp-bg-input);
    color: #1e1e1e;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.sp-yn-btn.sp-yes:hover,
.sp-yn-btn.sp-yes.sp-selected {
    background: #059669;
    color: #fff;
    border-color: #059669;
}
.sp-yn-btn.sp-no:hover,
.sp-yn-btn.sp-no.sp-selected {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

/* Ana Gönder Butonu (Eniyi.Best Kurumsal Bronz-Altın) */
.sp-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--sp-brand) 0%, var(--sp-brand-hover) 100%);
    color: #ffffff;
    font-family: 'Capriola', 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 14px;
    border: none;
    border-radius: 10px;
    padding: 13px 16px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
    box-shadow: 0 4px 15px rgba(133, 93, 52, 0.35);
}
.sp-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(133, 93, 52, 0.48);
}
.sp-submit-btn:active {
    transform: translateY(0);
}
.sp-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Alt Bilgi */
.sp-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    font-size: 11px;
    color: var(--sp-text-muted);
}
.sp-skip-btn {
    background: transparent;
    border: none;
    color: var(--sp-text-muted);
    font-size: 11px;
    cursor: pointer;
    padding: 2px 4px;
    text-decoration: underline;
}
.sp-skip-btn:hover {
    color: var(--sp-brand);
}

/* Teşekkür / Katkı Ekranı */
.sp-thanks-view {
    text-align: center;
    padding: 6px 0;
}
.sp-thanks-icon,
.sp-civic-trophy {
    width: 58px;
    height: 58px;
    margin: 0 auto 12px auto;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #b45309;
    border: 2px solid #f59e0b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    box-shadow: 0 0 24px rgba(245, 158, 11, 0.45), 0 0 0 4px rgba(254, 243, 199, 0.6);
    animation: spTrophyBounce 0.65s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes spTrophyBounce {
    0% { transform: scale(0.3); opacity: 0; }
    60% { transform: scale(1.18); }
    100% { transform: scale(1); opacity: 1; }
}
.sp-thanks-title {
    font-family: 'Capriola', -apple-system, sans-serif;
    font-size: 19px;
    font-weight: 700;
    color: #1e1e1e;
    margin: 0 0 6px 0;
}
.sp-thanks-desc {
    font-size: 13px;
    color: var(--sp-text-muted);
    margin: 0 0 14px 0;
    line-height: 1.45;
}

/* Katkı Etki Kartı (Civic Impact Box) */
.sp-impact-box {
    background: linear-gradient(180deg, #fffcf8 0%, #faf5ef 100%);
    border: 1px solid #e7dacd;
    border-radius: 14px;
    padding: 12px 14px;
    margin: 0 0 16px 0;
    text-align: left;
    box-shadow: 0 4px 14px rgba(133, 93, 52, 0.08);
}
.sp-impact-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.sp-impact-label {
    font-size: 12px;
    font-weight: 700;
    color: #292524;
    display: flex;
    align-items: center;
    gap: 6px;
}
.sp-xp-pill {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    border-radius: 12px;
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.15);
}
.sp-impact-track {
    width: 100%;
    height: 7px;
    background: #e7dfd5;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
    position: relative;
}
.sp-impact-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #f59e0b 0%, #10b981 100%);
    border-radius: 10px;
    transition: width 1.1s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}
.sp-impact-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #78716c;
}
.sp-impact-footer strong {
    color: #047857;
}

.sp-email-box {
    margin-bottom: 14px;
    display: flex;
    gap: 8px;
}
.sp-email-input {
    flex: 1;
    background: var(--sp-bg-input);
    border: 1px solid var(--sp-border-input);
    border-radius: 8px;
    padding: 9px 12px;
    color: #1e1e1e;
    font-size: 12px;
    outline: none;
}
.sp-email-input:focus {
    border-color: var(--sp-brand);
}
.sp-email-btn {
    background: var(--sp-brand);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 9px 15px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.sp-email-btn:hover {
    background: var(--sp-brand-hover);
}
.sp-city-link-btn {
    display: inline-block;
    background: var(--sp-brand-light);
    color: var(--sp-brand);
    border: 1px solid var(--sp-brand-border);
    border-radius: 8px;
    padding: 9px 16px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.sp-city-link-btn:hover {
    background: var(--sp-brand);
    color: #ffffff;
    text-decoration: none;
}

/* Honeypot gizli alan */
.sp-hp-field {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
}
