/* ==========================================================================
   ONYXBILLS & INVENTORY HELP CENTER, DRAWER & CHATBOT STYLES
   ========================================================================== */

/* Highlight Pulse Animation */
@keyframes help-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.7);
        border-color: #4f46e5;
    }
    50% {
        box-shadow: 0 0 0 12px rgba(79, 70, 229, 0);
        border-color: #6366f1;
    }
    100% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0);
        border-color: #4f46e5;
    }
}

.help-highlight-target {
    animation: help-pulse 2s infinite ease-in-out;
    border: 2px solid #4f46e5 !important;
    border-radius: 8px;
    background-color: #f5f3ff !important;
    transition: all 0.3s ease;
}

/* Slide-out Help Drawer */
.help-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(3px);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease-in-out;
}

.help-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.help-drawer {
    position: fixed;
    top: 0;
    right: -460px;
    width: 460px;
    max-width: 90vw;
    height: 100vh;
    background: #ffffff;
    box-shadow: -8px 0 28px rgba(0, 0, 0, 0.15);
    z-index: 1055;
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.help-drawer.open {
    right: 0;
}

.help-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.help-drawer-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.help-drawer-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.help-prereq-box {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 0.88rem;
    color: #92400e;
}

.help-step-item {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
    position: relative;
}

.help-step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #4f46e5;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.82rem;
    flex-shrink: 0;
}

.help-step-content {
    flex: 1;
}

.help-step-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1e293b;
    margin-bottom: 4px;
}

.help-step-desc {
    font-size: 0.86rem;
    color: #64748b;
    line-height: 1.45;
}

/* Floating Chatbot Widget */
.help-chat-trigger {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.4);
    cursor: pointer;
    z-index: 1040;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.help-chat-trigger:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.55);
}

.help-chat-popup {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 32px);
    height: 520px;
    max-height: calc(100vh - 120px);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
    border: 1px solid #e2e8f0;
    z-index: 1045;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.help-chat-header {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: #ffffff;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.help-chat-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 700;
}

.help-chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8fafc;
}

.help-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.88rem;
    line-height: 1.45;
    position: relative;
    word-break: break-word;
}

.help-msg-bot {
    align-self: flex-start;
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.help-msg-user {
    align-self: flex-end;
    background: #4f46e5;
    color: #ffffff;
    border-bottom-right-radius: 2px;
}

.help-chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.help-chip {
    background: #eef2ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
    border-radius: 14px;
    padding: 4px 10px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.help-chip:hover {
    background: #e0e7ff;
    border-color: #a5b4fc;
}

.help-chat-footer {
    padding: 10px 14px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 8px;
    align-items: center;
}

.help-chat-input {
    flex: 1;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 0.88rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.help-chat-input:focus {
    border-color: #4f46e5;
}

.help-chat-send {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #4f46e5;
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.help-chat-send:hover {
    background: #4338ca;
}

/* Help Center Portal (/help) */
.help-portal-hero {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
    color: #ffffff;
    padding: 44px 28px;
    border-radius: 16px;
    margin-bottom: 28px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(49, 46, 129, 0.25);
}

.help-search-box {
    max-width: 600px;
    margin: 20px auto 0 auto;
    position: relative;
}

.help-search-input {
    width: 100%;
    padding: 14px 20px 14px 48px;
    border-radius: 30px;
    border: none;
    font-size: 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    outline: none;
}

.help-search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
    color: #64748b;
}

.help-topic-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s ease-in-out;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.help-topic-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

.help-topic-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #eef2ff;
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 14px;
}
