﻿/* ════════════════════════════════════════════════════════════════
   index.css  —  Kaplan Support Bot
   ════════════════════════════════════════════════════════════════ */

/* ── Shared wrap ─────────────────────────────────────────────── */
.kp-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}


.kp-hero {
    background: var(--bs-blue-delta);
    padding: 64px 0 72px;
    overflow: hidden;
}

.kp-hero-row {
    min-height: 340px;
}

/* Eyebrow label */
.kp-eyebrow {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--bs-blue-beta);
    margin-bottom: 14px;
}

/* Main heading — Merriweather italic like KP homepage */
.kp-hero-title {
    font-family: Merriweather, Georgia, serif;
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.15;
    color: var(--bs-purple-beta);
    margin-bottom: 20px;
}

    .kp-hero-title em {
        font-style: italic;
        font-weight: 400;
    }

.kp-hero-body {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--bs-grey-alpha);
    max-width: 500px;
    margin-bottom: 0;
}

/* ── KP pill buttons ─────────────────────────────────────────── */
.kp-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border: 2px solid var(--bs-purple-beta);
    border-radius: 50rem;
    background: var(--bs-purple-beta);
    color: #fff;
    font-family: var(--bs-font-sans-serif);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    white-space: nowrap;
}

    .kp-btn-primary:hover {
        background: var(--bs-purple-alpha);
        border-color: var(--bs-purple-alpha);
    }

.kp-btn-outline {
    display: inline-flex;
    align-items: center;
    padding: 14px 28px;
    border: 2px solid var(--bs-purple-beta);
    border-radius: 50rem;
    background: transparent;
    color: var(--bs-purple-beta);
    font-family: var(--bs-font-sans-serif);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, color .15s;
    white-space: nowrap;
}

    .kp-btn-outline:hover {
        background: var(--bs-purple-beta);
        color: #fff;
    }

/* ── Decorative bot widget in hero ──────────────────────────── */
.kp-hero-bot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.kp-hero-bot-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--bs-purple-beta);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 32px rgba(36,15,110,.25);
}

.kp-bot-icon {
    font-size: 60px;
    color: #fff;
    font-variation-settings: 'FILL' 1, 'wght' 300, 'GRAD' 0, 'opsz' 48;
}

.kp-hero-bot-bubble {
    background: #fff;
    border-radius: 16px 16px 16px 4px;
    padding: 12px 18px;
    font-size: 14px;
    font-style: italic;
    color: var(--bs-grey-alpha);
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
    max-width: 260px;
    text-align: center;
}

.kp-hero-bot-reply {
    display: flex;
    gap: 6px;
    align-items: center;
}

.kp-reply-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--bs-purple-beta);
    opacity: .4;
    animation: kpBounce 1.2s infinite ease-in-out;
}

    .kp-reply-dot:nth-child(2) {
        animation-delay: .2s;
    }

    .kp-reply-dot:nth-child(3) {
        animation-delay: .4s;
    }

@keyframes kpBounce {
    0%, 80%, 100% {
        transform: scale(.7);
        opacity: .3;
    }

    40% {
        transform: scale(1);
        opacity: .9;
    }
}

.kp-info-bg {
    background: var(--bs-grey-iota);
}

/* ── Section header ──────────────────────────────────────────── */
.kp-section-header {
    padding: 56px 0 40px;
    border-bottom: 1px solid var(--bs-grey-delta);
    margin-bottom: 40px;
}

/* ── Card header: icon + title + purple underline ────────────── */
.kp-card-hd {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--bs-purple-beta);
}

.kp-card-hd-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bs-blue-delta);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .kp-card-hd-icon .material-symbols,
    .kp-card-hd-icon .material-symbols-outlined {
        color: var(--bs-purple-beta);
    }

/* ── Docs accordion button ── */
.kp-docs-btn {
    font-size: 13px;
    font-weight: 600;
    color: var(--bs-blue-beta);
    text-decoration: underline;
    text-underline-offset: 3px;
    box-shadow: none !important;
}

    .kp-docs-btn:not(.collapsed) {
        color: var(--bs-blue-alpha);
    }

    .kp-docs-btn::after {
        display: none;
    }
/* hide Bootstrap chevron */
.docs-table-wrap {
    max-height: 220px;
    overflow-y: auto;
    border-radius: 8px;
    border: 1px solid var(--bs-grey-delta);
}

/* ── Pipeline (no toolkit equivalent) ───────────────────────── */
.kp-pipeline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.kp-pipe-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.kp-pipe-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--bs-purple-beta);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kp-pipe-body {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid var(--bs-grey-delta);
    border-radius: 8px;
    padding: 8px 14px;
    white-space: nowrap;
}

.kp-pipe-icon {
    color: var(--bs-purple-beta);
}

.kp-pipe-arrow {
    color: var(--bs-grey-beta);
    margin-bottom: -28px;
    flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════════════
   CHAT FAB  (fixed launcher button)
   ════════════════════════════════════════════════════════════════ */
.chat-fab {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: var(--bs-purple-beta);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(36,15,110,.35);
    z-index: 1100;
    transition: background .15s, transform .15s;
}

    .chat-fab:hover {
        background: var(--bs-purple-alpha);
        transform: scale(1.05);
    }

.chat-fab-icon {
    font-size: 26px;
    color: #fff;
    background: transparent;
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ════════════════════════════════════════════════════════════════
   CHAT WIDGET
   ════════════════════════════════════════════════════════════════ */
.chat-widget {
    position: fixed;
    right: 24px;
    bottom: 24px;
    max-width: 480px;
    width: 86vw;
    height: min(90dvh, calc(100dvh - 80px));
    max-height: min(700px, calc(100dvh - 80px));
    background: #fff;
    border-radius: var(--bs-border-radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 16px 6px rgba(0,0,0,.12), 0 4px 8px rgba(0,0,0,.24);
    z-index: 1100;
    opacity: 0;
    pointer-events: none;
    transition: none;
}

    .chat-widget.open {
        opacity: 1;
        pointer-events: all;
        transform: translateY(0);
    }

    .chat-widget.fullscreen {
        right: 50%;
        bottom: 50%;
        transform: translate(50%, 50%);
        width: min(592px, 95vw);
        height: min(821px, 92vh);
    }

    .chat-widget.open.fullscreen {
        transform: translate(50%, 50%);
    }


.chat-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 8px 8px 8px 16px;
    height: 64px;
    background: var(--bs-purple-beta);
    border-radius: var(--bs-border-radius-lg) var(--bs-border-radius-lg) 0 0;
    color: #fff;
    flex-shrink: 0;
    z-index: 1;
}

.chat-header-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--bs-grey-iota);
    border-radius: 3.2px;
    padding: 3.2px;
    flex-shrink: 0;
}

.chat-header-logo {
    width: 100%;
    height: 100%;
}

.chat-icon-btn {
    border: none;
    background: transparent;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 4px;
    border-radius: 6px;
    transition: background .15s;
}

    .chat-icon-btn:hover {
        background: rgba(255,255,255,.15);
    }

    .chat-icon-btn.active {
        background: rgba(255,255,255,.2);
    }

    .chat-icon-btn .material-symbols-rounded {
        font-size: 22px;
        color: #fff;
        background: transparent;
        font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    }

/* Chat body + iframe */
.chat-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-iframe {
    width: 100%;
    flex: 1;
    min-height: 0;
    border: 0;
    display: block;
    overscroll-behavior: contain;
}

.kebab-wrap {
    position: relative;
}

.course-card-sub-menu {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    padding: 8px;
    gap: 4px;
    position: absolute;
    width: 200px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,.24), 0 2px 6px 1px rgba(0,0,0,.12);
    border-radius: var(--bs-border-radius-lg);
    top: calc(100% + 8px);
    right: -8px;
    z-index: 10;
}

    .course-card-sub-menu.open {
        display: flex;
    }

.menu-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 8px 12px;
    gap: 12px;
    width: 100%;
    height: 40px;
    border: none;
    border-radius: var(--bs-border-radius);
    background: transparent;
    font-family: var(--bs-font-sans-serif);
    font-size: 14px;
    font-weight: 600;
    color: var(--bs-grey-alpha);
    cursor: pointer;
    text-align: left;
    letter-spacing: 0.1px;
    transition: background .15s;
}

    .menu-row:hover {
        background: #EBECEE;
    }

    .menu-row .material-symbols,
    .menu-row .material-symbols-outlined {
        color: var(--bs-grey-alpha);
        flex-shrink: 0;
    }

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 992px) {
    .kp-hero-title {
        font-size: 2.25rem;
    }
}

@media (max-width: 768px) {
    .kp-hero {
        padding: 40px 0 48px;
    }

    .kp-hero-title {
        font-size: 1.875rem;
    }
    #fullscreenKebabItem {
        display: none;
    }

    .chat-widget.open:not(.fullscreen) {
        width: 100vw;
        max-width: none;
        max-height: none;
        right: 0;
        bottom: 0;
        border-radius: 0;
        height: 100dvh;
    }

    .chat-widget.open.fullscreen {
        width: 100vw;
        height: 100dvh;
        right: 0;
        bottom: 0;
        top: auto;
        left: auto;
        transform: none;
        border-radius: 0;
    }

    .kp-pipeline {
        gap: 6px;
    }

    .kp-pipe-step {
        padding: 6px 10px;
        font-size: 12px;
    }
}


.chat-toggle {
    margin: 0;
}

/* OFF state — white border + white circle on purple */
.chat-toggle-input {
    background-color: var(--bs-purple-beta) !important;
    border-color: #fff !important;
}

    .chat-toggle-input::after {
        background-color: #fff !important;
    }
