/* Feedback Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000; /* Above mobile controls (9999) */
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: flex;
}

/* Hide mobile controls when modal is open */
body:has(.modal-overlay.active) .mobile-controls {
    display: none !important;
}

.modal-content {
    background: linear-gradient(135deg, #1a0033, #330066);
    border: 3px solid var(--primary-accent);
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 50px rgba(255, 0, 255, 0.5);
    animation: slideUp 0.4s ease;
}

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

.modal-header {
    padding: var(--spacing-lg);
    border-bottom: 2px solid rgba(255, 0, 255, 0.3);
    text-align: center;
}

.modal-header h2 {
    color: var(--primary-accent);
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
}

#modal-stats {
    font-size: 1.2rem;
    color: var(--secondary-accent);
}

.modal-body {
    padding: var(--spacing-lg);
}

.question-group {
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.question-text {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: var(--spacing-md);
    color: var(--text-light);
}

/* Radio and Checkbox Options */
.option-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.option-label {
    display: flex;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.option-label:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--secondary-accent);
}

.option-label input[type="radio"],
.option-label input[type="checkbox"] {
    margin-right: var(--spacing-sm);
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-accent);
}

.option-label.selected {
    background: rgba(255, 0, 255, 0.2);
    border-color: var(--primary-accent);
}

/* Option Wrapper (for options with conditional text input) */
.option-wrapper {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

/* "Other" Text Input (conditional input that appears with some options) */
.other-text-input {
    width: 100%;
    padding: var(--spacing-sm);
    margin-left: 2rem;
    font-size: 0.95rem;
    font-family: var(--font-main);
    border: 2px solid var(--secondary-accent);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-light);
    transition: all 0.3s ease;
}

.other-text-input:focus {
    outline: none;
    border-color: var(--primary-accent);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.2);
}

.other-text-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
}

/* Mobile adjustments for other inputs */
@media (max-width: 767px) {
    .other-text-input {
        margin-left: 1rem;
        font-size: 0.9rem;
        padding: 0.6rem;
    }
}

/* Text Input */
.text-input-field {
    width: 100%;
    min-height: 100px;
    padding: var(--spacing-sm);
    font-size: 1rem;
    font-family: var(--font-main);
    border: 2px solid var(--secondary-accent);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    resize: vertical;
}

.text-input-field:focus {
    outline: none;
    border-color: var(--primary-accent);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.3);
}

/* Rating Scale */
.rating-group {
    display: flex;
    justify-content: space-between;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.rating-btn {
    flex: 1;
    min-width: 50px;
    padding: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(0, 255, 255, 0.3);
    color: var(--text-light);
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rating-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--secondary-accent);
    transform: translateY(-2px);
}

.rating-btn.selected {
    background: rgba(255, 0, 255, 0.3);
    border-color: var(--primary-accent);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.5);
}

/* Validation */
.question-group.error {
    border-color: var(--error-color);
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.modal-footer {
    padding: var(--spacing-lg);
    border-top: 2px solid rgba(255, 0, 255, 0.3);
    text-align: center;
}

.validation-hint {
    margin-top: var(--spacing-sm);
    font-size: 0.9rem;
    opacity: 0.7;
}

.validation-hint.hidden {
    display: none;
}

/* Responsive modal */
@media (max-width: 767px) {
    .modal-content {
        width: 95%;
        max-height: 85vh;
    }

    .modal-header h2 {
        font-size: 1.5rem;
    }

    #modal-stats {
        font-size: 1rem;
    }

    .question-text {
        font-size: 1rem;
    }

    .option-label {
        font-size: 0.9rem;
        padding: 0.5rem;
    }

    .rating-group {
        gap: 0.3rem;
    }

    .rating-btn {
        min-width: 40px;
        font-size: 1rem;
    }
}
