.feedback-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

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

.feedback-modal {
    background: #ffffff;
    border-radius: 1.25rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 480px;
    padding: 2.5rem 2rem 2rem;
    position: relative;
    transform: translateY(20px) scale(0.96);
    transition: transform 0.3s;
}

.feedback-overlay.active .feedback-modal {
    transform: translateY(0) scale(1);
}

.feedback-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #94a3b8;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}

.feedback-close:hover {
    background: #f1f5f9;
    color: #334155;
}

.feedback-heading {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    text-align: center;
    margin-bottom: 0.25rem;
}

.feedback-subheading {
    font-size: 0.9rem;
    color: #64748b;
    text-align: center;
    margin-bottom: 1.5rem;
}

.feedback-stars {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.feedback-star {
    background: none;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.5rem 0.6rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    transition: all 0.2s;
    min-width: 72px;
}

.feedback-star .star-emoji {
    font-size: 1.6rem;
    line-height: 1;
}

.feedback-star .star-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: #94a3b8;
    text-align: center;
    line-height: 1.2;
}

.feedback-star:hover {
    border-color: #4f46e5;
    background: #f0efff;
}

.feedback-star.selected {
    border-color: #4f46e5;
    background: #eef2ff;
}

.feedback-star.selected .star-label {
    color: #4f46e5;
}

.feedback-message {
    text-align: center;
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 1rem;
    min-height: 1.2rem;
    font-style: italic;
}

.feedback-textarea {
    width: 100%;
    min-height: 100px;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
    color: #1e293b;
    margin-bottom: 1.25rem;
}

.feedback-textarea::placeholder {
    color: #94a3b8;
}

.feedback-textarea:focus {
    border-color: #4f46e5;
}

.feedback-actions {
    display: flex;
    gap: 0.75rem;
}

.feedback-btn-submit {
    flex: 1;
    padding: 0.8rem 1.5rem;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 0.6rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.feedback-btn-submit:hover {
    background: #4338ca;
}

.feedback-btn-submit:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.feedback-btn-cancel {
    padding: 0.8rem 1.5rem;
    background: #f1f5f9;
    color: #475569;
    border: none;
    border-radius: 0.6rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.feedback-btn-cancel:hover {
    background: #e2e8f0;
}

.feedback-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 0.85rem 1.5rem;
    border-radius: 0.6rem;
    font-size: 0.95rem;
    font-weight: 600;
    z-index: 10000;
    transition: transform 0.3s;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.feedback-toast.show {
    transform: translateX(-50%) translateY(0);
}

.feedback-toast.success {
    background: #059669;
    color: white;
}

.feedback-toast.error {
    background: #dc2626;
    color: white;
}

@media (max-width: 520px) {
    .feedback-modal {
        padding: 2rem 1.25rem 1.5rem;
        width: 95%;
    }

    .feedback-stars {
        gap: 0.3rem;
    }

    .feedback-star {
        min-width: 56px;
        padding: 0.4rem 0.3rem;
    }

    .feedback-star .star-emoji {
        font-size: 1.3rem;
    }

    .feedback-star .star-label {
        font-size: 0.55rem;
    }

    .feedback-heading {
        font-size: 1.25rem;
    }
}
