/* Feedback Popup Styles - Side Flyout */

.feedback-tab {
    position: fixed;
    bottom: 50%;
    right: 0;
    transform: translateY(50%);
    background: #dc2626;
    color: white;
    padding: 1rem 0.75rem;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    z-index: 9999;
    box-shadow: -4px 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    animation: slideInFromRight 0.3s ease;
}

.feedback-tab:hover {
    right: -3px;
    background: #b91c1c;
    box-shadow: -6px 6px 16px rgba(0, 0, 0, 0.2);
}

@keyframes slideInFromRight {
    from {
        right: -100px;
        opacity: 0;
    }
    to {
        right: 0;
        opacity: 1;
    }
}

.feedback-tab-icon {
    font-size: 1.2rem;
}

.feedback-tab-text {
    white-space: nowrap;
}

.feedback-overlay {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    animation: slideInRight 0.4s ease;
    pointer-events: none;
}

.feedback-modal {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    width: 380px;
    max-width: calc(100vw - 40px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    position: relative;
    pointer-events: all;
    border: 1px solid #e1e5e9;
}

.feedback-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    line-height: 1;
}

.feedback-close:hover {
    background: #f1f5f9;
    color: var(--text-primary);
}

.feedback-header {
    margin-bottom: 1.25rem;
    padding-right: 2rem;
}

.feedback-header h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.beta-badge {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.feedback-header p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.4;
}

.feedback-question {
    margin-bottom: 1.5rem;
}

.feedback-question label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.rating-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.rating-btn {
    padding: 0.625rem 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    text-align: center;
}

.rating-btn:last-child {
    grid-column: 1 / -1;
}

.rating-btn:hover {
    border-color: var(--primary-color);
    background: #f0f7ff;
    transform: translateY(-2px);
}

.rating-btn.selected {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

#feedback-comments {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    transition: border-color 0.2s ease;
}

#feedback-comments:focus {
    outline: none;
    border-color: var(--primary-color);
}

.feedback-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.btn-small {
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
}

.feedback-thanks {
    text-align: center;
    padding: 2rem 1rem;
}

.feedback-thanks h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.feedback-thanks p {
    color: var(--text-secondary);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mobile responsive */
@media (max-width: 640px) {
    .feedback-tab {
        bottom: 20px;
        right: 0;
        transform: none;
        writing-mode: horizontal-tb;
        padding: 0.75rem 1rem;
        border-radius: 8px 0 0 8px;
        flex-direction: row;
    }

    .feedback-overlay {
        bottom: 10px;
        right: 10px;
        left: 10px;
    }

    .feedback-modal {
        width: 100%;
        max-width: 100%;
        padding: 1.25rem;
    }

    .rating-buttons {
        grid-template-columns: 1fr;
    }

    .rating-btn:last-child {
        grid-column: 1;
    }

    .feedback-actions {
        flex-direction: column-reverse;
    }

    .feedback-actions button {
        width: 100%;
    }
}
