/* Survey Popup Styles */
.survey-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.survey-popup-overlay.active {
    display: flex;
    opacity: 1;
}

.survey-popup {
    background: white;
    border-radius: 28px;
    padding: 40px;
    max-width: 520px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.survey-popup-overlay.active .survey-popup {
    transform: translateY(0);
}

.survey-popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.survey-popup-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text);
}

.survey-popup-header {
    text-align: center;
    margin-bottom: 32px;
}

.survey-popup-icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.survey-popup-header h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    line-height: 1.1;
    color: var(--text);
    margin: 0 0 12px;
}

.survey-popup-header p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
}

.survey-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.survey-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.survey-field label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

.survey-field input,
.survey-field select,
.survey-field textarea {
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text);
    background: rgba(255, 255, 255, 0.95);
    transition: all 0.2s ease;
}

.survey-field input:focus,
.survey-field select:focus,
.survey-field textarea:focus {
    outline: none;
    border-color: var(--accent-strong);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

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

.survey-field select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.survey-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.survey-submit {
    flex: 1;
    padding: 16px 24px;
    background: var(--accent-strong);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.survey-submit:hover {
    background: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.survey-submit:active {
    transform: translateY(0);
}

.survey-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.survey-later {
    padding: 16px 24px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 16px;
    font-size: 0.95rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.survey-later:hover {
    border-color: var(--text-muted);
    color: var(--text);
}

.survey-privacy {
    text-align: center;
    margin-top: 20px;
    font-size: 0.85rem;
    color: var(--text-soft);
}

.survey-privacy i {
    margin-right: 6px;
}

/* Success Message */
.survey-success {
    text-align: center;
    padding: 40px 20px;
}

.survey-success-icon {
    font-size: 64px;
    color: #10b981;
    margin-bottom: 20px;
}

.survey-success h3 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--text);
    margin: 0 0 12px;
}

.survey-success p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.5;
    margin: 0 0 24px;
}

.survey-success-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Dark Theme */
[data-theme="dark"] .survey-popup {
    background: linear-gradient(180deg, rgba(31, 24, 19, 0.96), rgba(20, 16, 13, 0.98));
    border: 1px solid rgba(255, 248, 242, 0.08);
}

[data-theme="dark"] .survey-popup-close {
    color: rgba(255, 248, 242, 0.6);
}

[data-theme="dark"] .survey-popup-close:hover {
    background: rgba(255, 248, 242, 0.1);
    color: rgba(255, 248, 242, 0.9);
}

[data-theme="dark"] .survey-field input,
[data-theme="dark"] .survey-field select,
[data-theme="dark"] .survey-field textarea {
    background: rgba(15, 12, 10, 0.6);
    border-color: rgba(255, 248, 242, 0.12);
    color: rgba(255, 248, 242, 0.9);
}

[data-theme="dark"] .survey-field input:focus,
[data-theme="dark"] .survey-field select:focus,
[data-theme="dark"] .survey-field textarea:focus {
    border-color: var(--accent-strong);
    box-shadow: 0 0 0 3px rgba(201, 157, 91, 0.15);
}

[data-theme="dark"] .survey-later {
    border-color: rgba(255, 248, 242, 0.12);
    color: rgba(255, 248, 242, 0.6);
}

[data-theme="dark"] .survey-later:hover {
    border-color: rgba(255, 248, 242, 0.3);
    color: rgba(255, 248, 242, 0.9);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .survey-popup {
        padding: 28px 24px;
        border-radius: 24px;
    }

    .survey-popup-header h2 {
        font-size: 1.6rem;
    }

    .survey-popup-icon {
        font-size: 36px;
    }

    .survey-actions {
        flex-direction: column;
    }

    .survey-later {
        width: 100%;
    }
}

/* Loading Spinner */
.survey-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}