/* Survey Modal Overlay */
.survey-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    padding: 20px;
}

.survey-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Survey Container */
.survey-container {
    background-color: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
}

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

/* Scrollbar for container */
.survey-container::-webkit-scrollbar {
    width: 8px;
}

.survey-container::-webkit-scrollbar-track {
    background: transparent;
}

.survey-container::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

/* Close Button */
.survey-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.survey-close:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.1);
}

/* Survey Steps */
.survey-step {
    display: none;
    padding: 50px 40px;
    animation: fadeIn 0.5s ease;
    flex: 1;
}

.survey-step.active {
    display: flex;
    flex-direction: column;
}

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

/* Progress Bar */
.survey-progress-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px 4px 0 0;
    overflow: hidden;
}

.survey-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-light));
    width: 0%;
    transition: width 0.4s ease;
}

/* Typography */
.survey-step h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.survey-step p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 30px;
}

/* Options Grid */
.survey-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.survey-option {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

.survey-option:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.survey-option.selected {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--accent-primary);
}

.survey-option-checkbox {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.survey-option.selected .survey-option-checkbox {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.survey-option-checkbox svg {
    width: 14px;
    height: 14px;
    color: white;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s ease;
}

.survey-option.selected .survey-option-checkbox svg {
    opacity: 1;
    transform: scale(1);
}

/* Radio variant for single select */
.survey-option.radio .survey-option-checkbox {
    border-radius: 50%;
}

.survey-option-content h4 {
    color: var(--text-main);
    font-size: 1.1rem;
    margin-bottom: 5px;
    font-weight: 500;
}

.survey-option-content span {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: block;
}

/* Navigation Buttons */
.survey-nav {
    display: flex;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.survey-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: var(--font-main);
}

.survey-btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-light));
    color: #fff;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    margin-left: auto; /* Push to right if alone */
}

.survey-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.survey-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.survey-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.survey-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Results Screen */
.survey-result-box {
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid var(--accent-primary);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    margin: 30px 0;
}

.survey-result-box h3 {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-weight: 500;
}

.survey-result-value {
    font-size: 2.5rem;
    color: var(--text-main);
    font-weight: 700;
    margin-bottom: 20px;
}

.survey-result-value span {
    color: var(--accent-light);
}

.survey-result-box p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .survey-step {
        padding: 30px 20px;
    }
    
    .survey-step h2 {
        font-size: 1.6rem;
    }
    
    .survey-result-value {
        font-size: 2rem;
    }
}
