/* HMTHUNT AI Integration Styling */

/* AI Insight Tab Elements */
.ai-badge {
    background-color: #090230;
    color: #ffffff;
    font-size: 0.85rem;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-weight: 600;
}

.ai-card {
    border: 1px solid #e3e6f0;
    border-radius: 0.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.05);
    background-color: #ffffff;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.ai-header-title {
    color: #090230;
    font-weight: 700;
    font-size: 1.4rem;
    border-bottom: 2px solid #eaeaea;
    padding-bottom: 0.5rem;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Skeleton Loading Animation */
.ai-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

.ai-skeleton-title {
    height: 28px;
    width: 60%;
    margin-bottom: 15px;
}

.ai-skeleton-line {
    height: 16px;
    margin-bottom: 10px;
    width: 100%;
}

.ai-skeleton-line.short {
    width: 80%;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Comparison and Recommendation UI */
.ai-report-content h1, .ai-report-content h2, .ai-report-content h3 {
    color: #090230;
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.ai-report-content p {
    line-height: 1.6;
    color: #4e4e4e;
    margin-bottom: 1rem;
    text-align: left;
}

.ai-report-content ul, .ai-report-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.ai-report-content li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

/* Recommendation Cards styling */
.recommendation-category {
    margin-bottom: 2rem;
}

.rec-title-dream {
    color: #e74a3b;
    border-bottom: 2px solid #e74a3b;
}

.rec-title-target {
    color: #4e73df;
    border-bottom: 2px solid #4e73df;
}

.rec-title-safe {
    color: #1cc88a;
    border-bottom: 2px solid #1cc88a;
}

.recommendation-card {
    border-left: 4px solid #eaeaea;
    transition: all 0.2s ease-in-out;
}

.recommendation-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.08);
}

.recommendation-card.dream {
    border-left-color: #e74a3b;
}

.recommendation-card.target {
    border-left-color: #4e73df;
}

.recommendation-card.safe {
    border-left-color: #1cc88a;
}

/* Modal Search Adjustments */
#searchTabs .nav-link {
    color: #4e5e78;
    font-weight: 600;
    border: none;
    border-bottom: 3px solid transparent;
}

#searchTabs .nav-link.active {
    color: #090230;
    border-bottom: 3px solid #090230;
    background-color: transparent;
}

.ai-search-meta {
    font-size: 0.75rem;
    color: #999;
    text-align: right;
    margin-top: 10px;
}

/* Floating AI Counsellor Widget */
.hmthunt-floating-chat-widget {
    position: fixed;
    right: 20px;
    bottom: 90px;
    width: min(360px, calc(100vw - 24px));
    background: #ffffff;
    border: 1px solid rgba(9, 2, 48, 0.12);
    border-radius: 18px 18px 10px 10px;
    box-shadow: 0 18px 40px rgba(9, 2, 48, 0.18);
    overflow: hidden;
    z-index: 9999;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.hmthunt-floating-chat-widget.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px) scale(0.98);
}

.floating-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #090230 0%, #221b57 100%);
    color: #fff;
    padding: 12px 14px;
}

.floating-chat-header-title {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.floating-chat-header-title strong {
    font-size: 0.95rem;
}

.floating-chat-header-title small {
    font-size: 0.72rem;
    opacity: 0.8;
}

.floating-chat-close {
    border: none;
    background: transparent;
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    padding: 0;
    cursor: pointer;
}

.floating-chat-body {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 12px;
}

.floating-chat-messages {
    max-height: 260px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 4px;
}

.floating-chat-message {
    display: flex;
}

.floating-chat-message.user {
    justify-content: flex-end;
}

.floating-chat-message.ai {
    justify-content: flex-start;
}

.floating-chat-bubble {
    max-width: 85%;
    padding: 10px 12px;
    border-radius: 14px;
    font-size: 0.86rem;
    line-height: 1.5;
}

.floating-chat-message.user .floating-chat-bubble {
    background: #090230;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.floating-chat-message.ai .floating-chat-bubble {
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #1f2937;
    border-bottom-left-radius: 4px;
}

.floating-chat-bubble ul,
.floating-chat-bubble ol {
    margin: 8px 0 0;
    padding-left: 18px;
}

.floating-chat-typing {
    display: none;
    margin-top: 10px;
}

.floating-chat-typing.active {
    display: flex;
}

.floating-chat-typing .floating-typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8;
    margin-right: 4px;
    animation: floatingTyping 1.4s infinite ease-in-out;
}

.floating-chat-typing .floating-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.floating-chat-typing .floating-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes floatingTyping {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30% { transform: translateY(-6px); opacity: 1; }
}

.floating-chat-form {
    display: flex;
    gap: 8px;
    padding: 10px 12px 12px;
    background: #fff;
}

.floating-chat-form input {
    flex: 1;
    border: 1px solid #dfe3e8;
    border-radius: 999px;
    padding: 10px 14px;
    font-size: 0.88rem;
}

.floating-chat-form button {
    border: none;
    border-radius: 999px;
    background: #090230;
    color: #fff;
    padding: 10px 16px;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
}

#floating-chat-toggle {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9998;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #090230 0%, #3b2d8d 100%);
    color: #fff;
    padding: 13px 18px;
    font-weight: 700;
    box-shadow: 0 10px 22px rgba(9, 2, 48, 0.22);
    cursor: pointer;
}

#floating-chat-toggle .fa {
    margin-right: 6px;
}

@media (max-width: 576px) {
    .hmthunt-floating-chat-widget {
        right: 12px;
        bottom: 76px;
        width: min(320px, calc(100vw - 20px));
    }

    #floating-chat-toggle {
        right: 12px;
        bottom: 12px;
        padding: 11px 15px;
    }
}
