/* ============================================
   FEEDBACK MODAL - FULL FIXED CSS
   ============================================ */

/* ============================================
   FOOTER FEEDBACK LINK
   ============================================ */
.footer-feedback-link {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.feedback-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 30px;
    background: rgba(215, 19, 19, 0.08);
    border: 1px solid rgba(215, 19, 19, 0.2);
}

.feedback-trigger:hover {
    color: #ffffff;
    background: rgba(215, 19, 19, 0.2);
    border-color: var(--action-red);
    transform: translateY(-2px);
}

.feedback-trigger i {
    color: var(--action-red);
    font-size: 1rem;
}

/* ============================================
   FEEDBACK MODAL OVERLAY
   ============================================ */
.feedback-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 99999;
    animation: fadeIn 0.3s ease;
}

.feedback-overlay.active {
    display: block;
}

/* ============================================
   FEEDBACK MODAL
   ============================================ */
.feedback-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 620px;
    max-height: 90vh;
    background: #ffffff;
    border-radius: 24px;
    padding: 2rem;
    z-index: 100000;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    animation: modalIn 0.3s ease forwards;
}

.feedback-modal.active {
    display: block;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============================================
   FEEDBACK MODAL HEADER
   ============================================ */
.feedback-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.feedback-modal-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-dark, #0B2447);
    margin: 0;
}

.feedback-modal-header .gradient-text {
    background: linear-gradient(135deg, var(--action-red, #d71313), var(--action-red-hover, #b01010));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.feedback-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #94a3b8;
    transition: all 0.3s ease;
    padding: 0 8px;
    line-height: 1;
}

.feedback-modal-close:hover {
    color: var(--action-red);
    transform: rotate(90deg);
}

.feedback-modal-subtitle {
    color: var(--text-secondary, #64748b);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

/* ============================================
   FEEDBACK MODAL FORM
   ============================================ */
.feedback-modal .feedback-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.feedback-modal .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.feedback-modal .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.feedback-modal .form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-dark, #0B2447);
}

.feedback-modal .form-group input,
.feedback-modal .form-group select,
.feedback-modal .form-group textarea {
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background: #fafbfc;
    color: var(--primary-dark, #0B2447);
}

.feedback-modal .form-group input:focus,
.feedback-modal .form-group select:focus,
.feedback-modal .form-group textarea:focus {
    outline: none;
    border-color: var(--action-red, #d71313);
    box-shadow: 0 0 0 4px rgba(215, 19, 19, 0.08);
    background: #ffffff;
}

.feedback-modal .form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* ============================================
   RATING STARS
   ============================================ */
.feedback-modal .rating-stars {
    display: flex;
    gap: 0.4rem;
    font-size: 2rem;
    cursor: pointer;
}

.feedback-modal .rating-stars i {
    color: #d1d5db;
    transition: all 0.3s ease;
    cursor: pointer;
}

.feedback-modal .rating-stars i.active {
    color: #f59e0b;
    transform: scale(1.1);
}

.feedback-modal .rating-stars i:hover {
    transform: scale(1.2);
    color: #f59e0b;
}

.feedback-modal .rating-label {
    font-size: 0.9rem;
    color: var(--text-secondary, #64748b);
    margin-top: 0.15rem;
}

/* ============================================
   CAPTCHA GROUP - FIXED
   ============================================ */
.feedback-modal .captcha-group {
    margin-top: 0.25rem;
}

.feedback-modal .captcha-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.feedback-modal .captcha-row img {
    height: 46px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.feedback-modal .captcha-row .captcha-refresh-btn {
    width: 46px;
    height: 46px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary, #64748b);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.feedback-modal .captcha-row .captcha-refresh-btn:hover {
    background: #f1f5f9;
    border-color: var(--action-red, #d71313);
    color: var(--action-red, #d71313);
}

.feedback-modal .captcha-row input {
    flex: 1;
    min-width: 120px;
}

/* ============================================
   CHECKBOX GROUP
   ============================================ */
.feedback-modal .checkbox-group {
    flex-direction: row;
    align-items: center;
    gap: 0.6rem;
}

.feedback-modal .checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--action-red, #d71313);
    cursor: pointer;
    flex-shrink: 0;
}

.feedback-modal .checkbox-group label {
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--text-secondary, #64748b);
    cursor: pointer;
}

/* ============================================
   SUBMIT BUTTON
   ============================================ */
.feedback-modal .btn-submit {
    background: var(--action-red, #d71313);
    color: #ffffff;
    border: none;
    padding: 12px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    font-family: 'Inter', sans-serif;
}

.feedback-modal .btn-submit:hover {
    background: var(--action-red-hover, #b01010);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(215, 19, 19, 0.25);
}

.feedback-modal .btn-submit:active {
    transform: translateY(0);
}

.feedback-modal .btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   FEEDBACK RESPONSE - VISIBLE FIXED
   ============================================ */
.feedback-modal .feedback-response {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    display: none;
    font-weight: 500;
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: left;
}

/* Success message - Green */
.feedback-modal .feedback-response.success {
    display: block;
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #34d399;
}

/* Error message - Red (visible) */
.feedback-modal .feedback-response.error {
    display: block;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #f87171;
}

/* CAPTCHA error specific - RED */
.feedback-modal .feedback-response.captcha_error {
    display: block;
    background: #fee2e2 !important;
    color: #991b1b !important;
    border: 1px solid #f87171 !important;
}

/* Field error - RED */
.feedback-modal .feedback-response.field_error {
    display: block;
    background: #fee2e2 !important;
    color: #991b1b !important;
    border: 1px solid #f87171 !important;
}

/* Server error - RED */
.feedback-modal .feedback-response.server_error {
    display: block;
    background: #fee2e2 !important;
    color: #991b1b !important;
    border: 1px solid #f87171 !important;
}

/* Catch-all for any error class */
.feedback-modal .feedback-response[class*="error"] {
    display: block;
    background: #fee2e2 !important;
    color: #991b1b !important;
    border: 1px solid #f87171 !important;
}

/* Catch-all for any error message text */
.feedback-modal .feedback-response.error,
.feedback-modal .feedback-response.captcha_error,
.feedback-modal .feedback-response.field_error,
.feedback-modal .feedback-response.server_error {
    display: block;
    background: #fee2e2 !important;
    color: #991b1b !important;
    border: 1px solid #f87171 !important;
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */
.feedback-modal::-webkit-scrollbar {
    width: 6px;
}

.feedback-modal::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.feedback-modal::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 10px;
}

.feedback-modal::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .feedback-modal {
        padding: 1.5rem;
        width: 95%;
        max-height: 95vh;
    }
    
    .feedback-modal-header h2 {
        font-size: 1.6rem;
    }
    
    .feedback-modal .form-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .feedback-modal .rating-stars {
        font-size: 1.6rem;
    }
    
    .feedback-trigger {
        font-size: 0.85rem;
        padding: 6px 12px;
    }

    .feedback-modal .captcha-row img {
        height: 38px;
    }
    
    .feedback-modal .captcha-row .captcha-refresh-btn {
        width: 38px;
        height: 38px;
    }
    
    .feedback-modal .captcha-row input {
        min-width: 100px;
    }
}

@media (max-width: 480px) {
    .feedback-modal {
        padding: 1rem;
        border-radius: 16px;
    }
    
    .feedback-modal-header h2 {
        font-size: 1.4rem;
    }
    
    .feedback-modal .rating-stars {
        font-size: 1.4rem;
    }
    
    .feedback-modal .btn-submit {
        padding: 10px 20px;
        font-size: 0.85rem;
    }

    .feedback-modal .captcha-row {
        gap: 8px;
    }
    
    .feedback-modal .captcha-row img {
        height: 34px;
    }
    
    .feedback-modal .captcha-row .captcha-refresh-btn {
        width: 34px;
        height: 34px;
        font-size: 0.8rem;
    }
    
    .feedback-modal .captcha-row input {
        min-width: 80px;
        font-size: 0.85rem;
        padding: 8px 10px;
    }

    .feedback-modal .feedback-response {
        font-size: 0.85rem;
        padding: 0.6rem 0.8rem;
    }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .feedback-overlay {
        animation: none;
    }
    
    .feedback-modal {
        animation: none;
    }
    
    .feedback-modal .rating-stars i {
        transition: none;
    }
    
    .feedback-modal-close {
        transition: none;
    }
}