/**
 * Feedback System Styles
 * Mobile-first responsive design
 */

/* Feedback Button */
.feedback-btn {
    margin-left: 15px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.feedback-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.feedback-btn:active {
    transform: translateY(0);
}

/* Feedback Popup */
.feedback-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.feedback-popup.hidden {
    display: none;
}

.feedback-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1;
}

.feedback-modal {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
    z-index: 2;
    pointer-events: auto;
}

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

.feedback-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}

.feedback-close:hover {
    color: #333;
}

.feedback-modal h2 {
    color: #667eea;
    margin-bottom: 5px;
    font-size: 1.8rem;
}

.feedback-subtitle {
    color: #999;
    margin-bottom: 25px;
    font-size: 0.9rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #333;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.required {
    color: #ff6b6b;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Rating Stars */
.rating-stars {
    display: flex;
    gap: 8px;
    margin-bottom: 5px;
}

.star {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.3;
    transition: opacity 0.2s, transform 0.2s;
    padding: 0;
}

.star:hover {
    transform: scale(1.2);
}

.star.active {
    opacity: 1;
}

.rating-label {
    color: #999;
    font-size: 0.8rem;
}

/* Submit Button */
.feedback-submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.feedback-submit-btn:hover {
    transform: translateY(-2px);
}

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

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

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

.feedback-success.hidden {
    display: none;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.feedback-success h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.feedback-success p {
    color: #666;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    /* Credits section mobile layout */
    .credits {
        flex-direction: column !important;
        text-align: center !important;
        gap: 10px;
    }

    .feedback-btn {
        display: inline-block;
        margin: 10px auto 0 !important;
        font-size: 0.85rem;
        padding: 8px 16px;
        width: auto;
    }

    /* Feedback popup - CENTER on mobile (like mobile-notice) */
    .feedback-popup {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
        align-items: center;
        justify-content: center;
        padding: 15px;
    }

    /* Feedback modal mobile optimization */
    .feedback-modal {
        padding: 18px;
        max-height: 75vh;
        width: 85%;
        max-width: 380px;
        margin: auto;
        position: relative;
        left: auto;
        right: auto;
        top: auto;
        bottom: auto;
        transform: none;
    }

    .feedback-modal h2 {
        font-size: 1.3rem;
    }

    .feedback-subtitle {
        font-size: 0.8rem;
    }

    .star {
        font-size: 1.6rem;
    }

    .rating-stars {
        justify-content: center;
    }

    .form-group input,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .feedback-submit-btn {
        font-size: 0.95rem;
        padding: 13px;
    }
}

@media (max-width: 480px) {
    /* Centered popup for small screens */
    .feedback-popup {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
        align-items: center;
        justify-content: center;
        padding: 12px;
    }

    .feedback-modal {
        padding: 16px;
        border-radius: 15px;
        max-height: 80vh;
        width: 88%;
        max-width: 340px;
        margin: auto;
        position: relative;
        left: auto;
        right: auto;
        top: auto;
        bottom: auto;
        transform: none;
    }

    .feedback-modal h2 {
        font-size: 1.2rem;
        margin-bottom: 5px;
    }

    .feedback-subtitle {
        font-size: 0.75rem;
        margin-bottom: 18px;
    }

    .feedback-close {
        font-size: 1.2rem;
        top: 12px;
        right: 12px;
    }

    .form-group {
        margin-bottom: 14px;
    }

    .form-group label {
        font-size: 0.8rem;
        margin-bottom: 6px;
    }

    .form-group input,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 10px 12px;
    }

    .form-group textarea {
        min-height: 70px;
    }

    .star {
        font-size: 1.4rem;
    }

    .rating-stars {
        gap: 6px;
        justify-content: center;
    }

    .rating-label {
        font-size: 0.7rem;
    }

    .feedback-submit-btn {
        font-size: 0.9rem;
        padding: 12px;
    }

    .success-icon {
        font-size: 2.5rem;
    }

    .feedback-success h3 {
        font-size: 1.1rem;
    }

    .feedback-success p {
        font-size: 0.85rem;
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    .feedback-popup {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
        align-items: center;
        justify-content: center;
        padding: 10px;
    }

    .feedback-modal {
        padding: 14px;
        width: 90%;
        max-width: 310px;
        margin: auto;
        position: relative;
        left: auto;
        right: auto;
        top: auto;
        bottom: auto;
        transform: none;
    }

    .feedback-modal h2 {
        font-size: 1.1rem;
    }

    .feedback-subtitle {
        font-size: 0.7rem;
    }

    .form-group {
        margin-bottom: 12px;
    }

    .form-group label {
        font-size: 0.75rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 8px 10px;
        font-size: 15px;
    }

    .star {
        font-size: 1.2rem;
    }

    .rating-stars {
        gap: 4px;
    }

    .feedback-submit-btn {
        font-size: 0.85rem;
        padding: 11px;
    }
}
