/**
 * Help Assistant / FAQ System Styles
 * Styles for the rule-based FAQ chatbot
 */

/* ============================================================================
   FAQ CARD IN HELP TAB
   ============================================================================ */

.help-card-faq {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(6, 182, 212, 0.05) 100%);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.help-card-faq .help-card-header {
    border-bottom-color: rgba(6, 182, 212, 0.2);
}

.help-card-faq .help-card-header h3 {
    color: #06b6d4;
}

.help-card-faq .help-card-header h3 i {
    color: #06b6d4;
}

.help-faq-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
}

.help-faq-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.help-faq-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(6, 182, 212, 0.15);
    border-radius: 12px;
    flex-shrink: 0;
}

.help-faq-icon i {
    font-size: 1.5rem;
    color: #06b6d4;
}

.help-faq-text h4 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 600;
    color: #f1f5f9;
}

.help-faq-text p {
    margin: 0;
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.4;
}

.btn-faq-open {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-faq-open:hover {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

/* ============================================================================
   FAQ MODAL
   ============================================================================ */

.faq-modal .faq-modal-content {
    max-width: 600px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.faq-modal-header {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

.faq-modal-header h3 {
    color: white;
}

.faq-modal-header h3 i {
    color: white;
}

.faq-modal-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    padding: 0;
}

/* Chat Container */
.faq-chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Welcome Message */
.faq-welcome {
    text-align: center;
    padding: 2rem 1rem;
}

.faq-welcome-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(6, 182, 212, 0.15);
    border-radius: 50%;
}

.faq-welcome-icon i {
    font-size: 2rem;
    color: #06b6d4;
}

.faq-welcome h4 {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: #f1f5f9;
}

.faq-welcome p {
    margin: 0;
    font-size: 0.9rem;
    color: #94a3b8;
}

/* Suggestions */
.faq-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    padding: 0 1rem;
}

.faq-suggestion-chip {
    padding: 0.5rem 1rem;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 20px;
    color: #06b6d4;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.faq-suggestion-chip:hover {
    background: rgba(6, 182, 212, 0.2);
    border-color: rgba(6, 182, 212, 0.5);
    transform: translateY(-1px);
}

/* Messages Container */
.faq-messages {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Message Bubbles */
.faq-message {
    max-width: 90%;
    animation: fadeInUp 0.2s ease;
}

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

.faq-message-user {
    align-self: flex-end;
}

.faq-message-user .faq-message-content {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border-radius: 16px 16px 4px 16px;
    padding: 0.75rem 1rem;
}

.faq-message-assistant {
    align-self: flex-start;
}

.faq-message-assistant .faq-message-content {
    background: #334155;
    color: #f1f5f9;
    border-radius: 16px 16px 16px 4px;
    padding: 1rem;
}

/* Answer Formatting */
.faq-answer-title {
    font-size: 1rem;
    font-weight: 600;
    color: #06b6d4;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(6, 182, 212, 0.2);
}

.faq-answer-text {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.faq-answer-text ul {
    margin: 0.5rem 0;
    padding-left: 1.25rem;
}

.faq-answer-text li {
    margin-bottom: 0.25rem;
}

.faq-answer-steps {
    margin: 0.75rem 0;
    padding-left: 1.25rem;
    counter-reset: step;
}

.faq-answer-steps li {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.faq-answer-hint {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 8px;
    font-size: 0.85rem;
    color: #f59e0b;
}

.faq-answer-hint i {
    flex-shrink: 0;
    margin-top: 0.125rem;
}

/* Tables in Answers */
.faq-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0;
    font-size: 0.85rem;
}

.faq-table th,
.faq-table td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #475569;
}

.faq-table th {
    background: rgba(6, 182, 212, 0.1);
    color: #06b6d4;
    font-weight: 600;
}

.faq-table tr:last-child td {
    border-bottom: none;
}

/* Related Topics */
.faq-related {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #475569;
}

.faq-related-label {
    display: block;
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

.faq-related-btn {
    padding: 0.375rem 0.75rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 6px;
    color: #06b6d4;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.faq-related-btn:hover {
    background: rgba(6, 182, 212, 0.2);
}

/* Fallback Suggestions */
.faq-fallback-suggestions {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #475569;
}

.faq-fallback-suggestions span {
    display: block;
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

.faq-suggestion-btn {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 6px;
    color: #3b82f6;
    font-size: 0.85rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

.faq-suggestion-btn:hover {
    background: rgba(59, 130, 246, 0.2);
}

/* Input Container */
.faq-input-container {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    border-top: 1px solid #334155;
    background: #0f172a;
}

.faq-input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 10px;
    color: #f1f5f9;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.faq-input:focus {
    border-color: #06b6d4;
}

.faq-input::placeholder {
    color: #64748b;
}

.faq-send-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.faq-send-btn:hover {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    transform: scale(1.05);
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 640px) {
    .faq-modal .faq-modal-content {
        max-height: 95vh;
        border-radius: 12px 12px 0 0;
        margin-top: auto;
    }

    .faq-chat-container {
        padding: 1rem;
    }

    .faq-message {
        max-width: 95%;
    }

    .faq-suggestions {
        padding: 0;
    }

    .faq-suggestion-chip {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

/* ============================================================================
   TILE ICON COLOR FOR FAQ
   ============================================================================ */

/* Removed: cyan background override - now uses default gray background */
