/* Feedback Modal Styles */
.feedback-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.feedback-modal.open {
    display: flex;
}

.feedback-modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.feedback-header {
    padding: 2rem;
    border-bottom: 1px solid var(--border-primary);
}

.feedback-header h2 {
    margin: 0  0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1.75rem;
}

.feedback-header p {
    margin: 0;
    color: var(--text-tertiary);
}

.feedback-body {
    padding: 2rem;
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.2s;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

/* Rating Stars - PREMIUM SVG LOGIC */
.rating-stars {
    display: flex;
    flex-direction: row-reverse; /* Important for ~ selector to work from left-to-right visually */
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.rating-stars label {
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-tertiary);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.rating-stars label svg {
    fill: #3f3f46; /* Initial dark grey/disabled color */
    transition: all 0.25s ease;
}

.rating-stars input[type="radio"] {
    display: none;
}

/* Logic: Hovering/Checking a star lights up itself and all siblings following it in the DOM 
   (Since we use row-reverse, those siblings appear to the LEFT visually) */

/* Active/Checked State */
.rating-stars input[type="radio"]:checked ~ label svg,
.rating-stars input[type="radio"]:checked + label svg {
    fill: #fbbf24;
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.4));
}

/* Hover States */
.rating-stars label:hover svg,
.rating-stars label:hover ~ label svg {
    fill: #fbbf24;
    transform: scale(1.1);
}

/* Checkboxes - CUSTOM STYLED */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 0.75rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Hide default checkbox */
.checkbox-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

/* Custom checkbox */
.checkbox-item label {
    position: relative;
    padding-left: 32px;
    margin: 0;
    font-weight: 400;
    cursor: pointer;
    user-select: none;
}

.checkbox-item label:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-primary);
    border-radius: 4px;
    background: var(--bg-secondary);
    transition: all 0.2s;
}

.checkbox-item input[type="checkbox"]:checked + label:before {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.checkbox-item input[type="checkbox"]:checked + label:after {
    content: '✓';
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.checkbox-item label:hover:before {
    border-color: var(--accent-primary);
}

/* Radio buttons */
.radio-group {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.radio-item input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.radio-item label {
    margin: 0;
    font-weight: 400;
    cursor: pointer;
}

.feedback-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-primary);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.btn-cancel {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-cancel:hover {
    background: var(--bg-secondary);
}

.btn-submit {
    padding: 0.75rem 2rem;
    background: var(--accent-primary);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.success-message {
    display: none;
    text-align: center;
    padding: 3rem;
}

.success-message.show {
    display: block;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* Floating Feedback Button */
.feedback-float-btn {
    position: fixed !important;
    bottom: 2rem !important;
    left: 2rem !important;
    background: var(--gradient-primary) !important;
    color: white !important;
    border: none !important;
    padding: 1rem 1.75rem !important;
    border-radius: 999px !important;
    font-weight: 700 !important;
    font-size: 0.9375rem !important;
    cursor: pointer !important;
    z-index: 1000 !important;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4) !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    letter-spacing: 0.02em !important;
}

.feedback-float-btn:hover {
    transform: translateY(-5px) scale(1.05) !important;
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.6) !important;
    filter: brightness(1.1) !important;
}

.feedback-float-btn:active {
    transform: translateY(-2px) scale(1) !important;
}

@media (max-width: 768px) {
    .feedback-float-btn span {
        display: none !important;
    }
    .feedback-float-btn {
        padding: 1rem !important;
        bottom: 1.5rem !important;
        left: 1.5rem !important;
    }
}
