/**
 * File: help-feedback-widget.css
 * Desc: Styles for "Was this helpful?" feedback widget
 */

/* Widget container */
.help-feedback-widget {
    margin-top: 30px;
    padding: 20px;
    background: #F8F9FA;
    border-radius: 8px;
    border: 1px solid #E0E0E0;
    text-align: center;
}

.help-feedback-question {
    margin: 0 0 15px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* Buttons */
.help-feedback-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

.help-feedback-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 2px solid transparent;
    border-radius: 8px;
    background: white;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.help-feedback-btn svg {
    transition: transform 0.2s ease;
}

.help-feedback-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

/* Yes button (thumbs up) */
.help-feedback-yes {
    border-color: #7FB069;
}

.help-feedback-yes:hover {
    background: #7FB069;
    color: white;
}

.help-feedback-yes:hover svg {
    transform: scale(1.1);
}

/* No button (thumbs down) */
.help-feedback-no {
    border-color: #E74C3C;
}

.help-feedback-no:hover {
    background: #E74C3C;
    color: white;
}

.help-feedback-no:hover svg {
    transform: scale(1.1);
}

/* Submitted state */
.help-feedback-submitted {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
    border-color: #7FB069;
}

.help-feedback-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #7FB069;
    color: white;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
}

.help-feedback-thanks {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: #2E7D32;
}

/* Loading state */
.help-feedback-loading {
    padding: 15px 20px;
    background: #FFF9E6;
    border-color: #FFD700;
}

.help-feedback-loading p {
    margin: 0;
    font-size: 14px;
    color: #997300;
}

/* Error state */
.help-feedback-error {
    padding: 15px 20px;
    background: #FFEBEE;
    border-color: #F44336;
}

.help-feedback-error p {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #C62828;
}

.help-feedback-retry {
    padding: 8px 16px;
    border: 1px solid #F44336;
    border-radius: 6px;
    background: white;
    color: #F44336;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.help-feedback-retry:hover {
    background: #F44336;
    color: white;
}

/* Modal overlay */
.help-feedback-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal dialog */
.help-feedback-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Modal header */
.help-feedback-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #E0E0E0;
}

.help-feedback-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.help-feedback-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.help-feedback-modal-close:hover {
    background: #F5F5F5;
    color: #666;
}

/* Modal body */
.help-feedback-modal-body {
    padding: 24px;
}

.help-feedback-modal-body label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.help-feedback-comment {
    width: 100%;
    padding: 12px;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.help-feedback-comment:focus {
    outline: none;
    border-color: #8B7EC8;
}

.help-feedback-char-count {
    margin-top: 8px;
    text-align: right;
    font-size: 12px;
    color: #999;
}

.help-feedback-char-count #char-count {
    color: #666;
    font-weight: 500;
}

/* Modal footer */
.help-feedback-modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #E0E0E0;
    justify-content: flex-end;
}

.help-feedback-btn-secondary,
.help-feedback-btn-primary {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.help-feedback-btn-secondary {
    background: white;
    border: 1px solid #E0E0E0;
    color: #666;
}

.help-feedback-btn-secondary:hover {
    background: #F5F5F5;
    border-color: #BDBDBD;
}

.help-feedback-btn-primary {
    background: linear-gradient(135deg, #8B7EC8, #7FB069);
    border: none;
    color: white;
}

.help-feedback-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 126, 200, 0.4);
}

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

/* Mobile responsive */
@media (max-width: 768px) {
    .help-feedback-buttons {
        flex-direction: column;
    }

    .help-feedback-btn {
        width: 100%;
        justify-content: center;
    }

    .help-feedback-modal {
        width: 95%;
        max-height: 90vh;
    }

    .help-feedback-modal-header,
    .help-feedback-modal-body,
    .help-feedback-modal-footer {
        padding: 16px;
    }
}

/* Accessibility: Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .help-feedback-btn,
    .help-feedback-btn svg,
    .help-feedback-modal-overlay,
    .help-feedback-modal {
        animation: none;
        transition: none;
    }

    .help-feedback-btn:hover {
        transform: none;
    }
}
