/**
 * Tool Feedback Styles
 * Styles for the report & recommend feature on tool pages
 */

/* ============================================
   SIDEBAR CARD (Desktop)
   ============================================ */
.tool-feedback-sidebar {
    background: var(--color-surface, #fff);
    border-radius: 12px;
    padding: 1.25rem;
    margin-top: 1.5rem;
    border: 1px solid var(--color-border, #e5e7eb);
}

.tool-feedback-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--color-text, #1f2937);
    font-size: 0.95rem;
}

.tool-feedback-header i {
    color: var(--color-primary, #e63946);
}

.tool-feedback-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tool-feedback-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 8px;
    background: var(--color-background, #f9fafb);
    color: var(--color-text, #1f2937);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    text-align: left;
}

.tool-feedback-btn:hover {
    border-color: var(--color-primary, #e63946);
    background: rgba(230, 57, 70, 0.05);
}

.tool-feedback-btn i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.tool-feedback-btn-report i {
    color: #f59e0b;
}

.tool-feedback-btn-recommend i {
    color: #10b981;
}

/* ============================================
   MOBILE CARD (Inside tool card)
   ============================================ */
.tool-feedback-mobile {
    display: none;
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.05) 0%, rgba(230, 57, 70, 0.02) 100%);
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1.5rem;
    border: 1px solid rgba(230, 57, 70, 0.15);
}

.tool-feedback-mobile-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--color-text, #1f2937);
    font-size: 0.9rem;
}

.tool-feedback-mobile-header i {
    color: var(--color-primary, #e63946);
}

.tool-feedback-mobile-buttons {
    display: flex;
    gap: 0.5rem;
}

.tool-feedback-mobile-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 0.5rem;
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 6px;
    background: var(--color-surface, #fff);
    color: var(--color-text, #1f2937);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tool-feedback-mobile-btn:hover,
.tool-feedback-mobile-btn:active {
    border-color: var(--color-primary, #e63946);
    background: rgba(230, 57, 70, 0.05);
}

.tool-feedback-mobile-btn i {
    font-size: 0.9rem;
}

/* ============================================
   MODAL OVERLAY - Must be above everything
   ============================================ */
.tool-feedback-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.6) !important;
    z-index: 2000000 !important;
    display: none !important; /* Hidden by default */
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
    overflow-y: auto;
}

/* Only show when is-open class is added */
.tool-feedback-modal-overlay.is-open {
    display: flex !important;
}

/* ============================================
   MODAL CONTAINER
   ============================================ */
.tool-feedback-modal-container {
    background: var(--color-surface, #fff);
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    z-index: 2000001 !important;
    animation: tfModalSlideIn 0.3s ease;
}

@keyframes tfModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.tool-feedback-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
    background: var(--color-background, #f9fafb);
    border-radius: 16px 16px 0 0;
}

.tool-feedback-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text, #1f2937);
}

.tool-feedback-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-gray, #6b7280);
    transition: all 0.2s ease;
    line-height: 1;
}

.tool-feedback-modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--color-text, #1f2937);
}

.tool-feedback-modal-body {
    padding: 1.5rem;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.tool-feedback-hint {
    color: var(--color-gray, #6b7280);
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: block;
}

.tool-feedback-required {
    color: var(--color-primary, #e63946);
}

.tool-feedback-recaptcha-notice {
    text-align: center;
    color: var(--color-gray, #9ca3af);
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border, #e5e7eb);
    font-size: 0.75rem;
}

/* Submit button full width */
.tool-feedback-modal-body .btn {
    width: 100%;
}

/* Spinner visibility */
#feedbackBtnSpinner {
    display: none;
}

/* ============================================
   ALERT MESSAGES
   ============================================ */
.tool-feedback-alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.tool-feedback-alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.tool-feedback-alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ============================================
   RECAPTCHA BADGE - Hide the floating badge
   ============================================ */
.grecaptcha-badge {
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    right: -9999px !important;
    pointer-events: none !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .tool-feedback-sidebar {
        display: none !important;
    }

    .tool-feedback-mobile {
        display: block !important;
    }
}

@media (max-width: 600px) {
    .tool-feedback-modal-overlay {
        padding: 0.5rem;
        align-items: flex-start;
        padding-top: 2rem;
    }

    .tool-feedback-modal-container {
        max-height: calc(100vh - 3rem);
        border-radius: 12px;
    }

    .tool-feedback-modal-header {
        padding: 1rem;
        border-radius: 12px 12px 0 0;
    }

    .tool-feedback-modal-header h3 {
        font-size: 1.1rem;
    }

    .tool-feedback-modal-body {
        padding: 1rem;
    }
}

/* ============================================
   BODY CLASS WHEN MODAL IS OPEN
   ============================================ */
body.tool-feedback-modal-active {
    overflow: hidden !important;
}