/* =========================================================
   CHATBOT WIDGET
   ========================================================= */

:root {
    --icb-primary: #0FB8A6;
    --icb-primary-dark: #0A9486;
    --icb-primary-light: #25C8B7;

    --icb-text: #334155;
    --icb-muted: #64748b;

    --icb-white: #ffffff;

    --icb-shadow:
        0 14px 35px rgba(0, 0, 0, 0.16),
        0 4px 12px rgba(15, 184, 166, 0.18);

    --icb-font:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
}


/* =========================================================
   ASK AI FLOATING BUTTON
   ========================================================= */

.icb-bubble {
    position: fixed;
    right: 22px;
    bottom: 22px;

    width: 385px;
    height: 58px;

    padding: 5px;

    display: flex;
    align-items: center;

    border: 1px solid rgba(15, 184, 166, 0.25);
    border-radius: 20px;

    background: #ffffff;

    cursor: pointer;

    z-index: 10000;

    font-family: var(--icb-font);

    box-shadow:
        0 12px 30px rgba(15, 23, 42, 0.14),
        0 4px 10px rgba(15, 184, 166, 0.10);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}



/* =========================================================
   AVATAR
   ========================================================= */

.icb-bubble-avatar {
    position: relative;

    width: 48px;
    height: 48px;

    min-width: 48px;

    margin-left: 0;

    border-radius: 50%;

    overflow: hidden;

    background: #ffffff;

    border: 2px solid #0FB8A6;

    box-shadow:
        0 3px 10px rgba(15, 184, 166, 0.25);
}

.icb-bubble-avatar img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}

/* ================================
   ONLINE STATUS
================================ */

.icb-bubble-avatar::after {
    content: "";

    position: absolute;

    right: 0;
    bottom: 1px;

    width: 10px;
    height: 10px;

    border-radius: 50%;

    background: #22C55E;

    border: 2px solid #ffffff;

    box-shadow:
        0 1px 4px rgba(0, 0, 0, 0.18);
}


/* =========================================================
   WHITE ASK AI AREA
   ========================================================= */

.icb-bubble-content {
    flex: 1;

    height: 44px;

    margin-left: 10px;
    margin-right: 8px;

    padding: 0 14px;

    display: flex;
    align-items: center;

    border-radius: 12px;

    background: #F5FAF9;

    border: 1px solid #E3F3F1;

    text-align: left;

    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}


/* =========================================================
   ASK AI TEXT
   ========================================================= */

.icb-bubble-label {
    color: #0FB8A6;

    font-size: 16px;

    font-weight: 600;

    letter-spacing: -0.01em;
}

.icb-bubble-label::after {
    content: "AI";

    display: inline-flex;

    align-items: center;
    justify-content: center;

    margin-left: 7px;

    padding: 2px 6px;

    border-radius: 5px;

    background: #E4F8F5;

    color: #0A9486;

    font-size: 9px;

    font-weight: 700;

    letter-spacing: 0.04em;

    vertical-align: middle;
}


/* =========================================================
   ARROW BUTTON
   ========================================================= */

.icb-bubble-arrow {
    width: 34px;
    height: 34px;

    min-width: 34px;

    margin-right: 6px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #0FB8A6;

    color: #ffffff;

    font-size: 17px;
    font-weight: 500;

    box-shadow:
        0 4px 10px rgba(15, 184, 166, 0.25);

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}


/* =========================================================
   HOVER
   ========================================================= */

.icb-bubble:hover {
    transform: translateY(-3px);

    box-shadow:
        0 18px 40px rgba(15, 23, 42, 0.17),
        0 6px 18px rgba(15, 184, 166, 0.18);
}

.icb-bubble:hover .icb-bubble-content {
    background: #F0FAF8;
    border-color: #CDEDE9;
}

.icb-bubble:hover .icb-bubble-arrow {
    transform: translateY(-1px) scale(1.07);

    background: #0A9486;

    box-shadow:
        0 6px 14px rgba(15, 184, 166, 0.35);
}


/* =========================================================
   ACTIVE
   ========================================================= */

.icb-bubble:active {
    transform: translateY(0) scale(0.98);
}


/* ================================
   SUBTLE FLOATING ANIMATION
================================ */

.icb-bubble.pulse {
    animation: icbFloat 4s ease-in-out infinite;
}

@keyframes icbFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

@keyframes icbAskAiFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}


/* =========================================================
   SUBTLE GLOW
   ========================================================= */

.icb-bubble.pulse::before {
    content: "";

    position: absolute;
    inset: -2px;

    border-radius: 20px;

    background:
        linear-gradient(
            90deg,
            rgba(15, 184, 166, 0.95),
            rgba(37, 200, 183, 0.45),
            rgba(10, 148, 134, 0.75)
        );

    z-index: -1;

    opacity: 0;

    animation: icbAskAiGlow 3.5s ease-in-out infinite;
}

@keyframes icbAskAiGlow {
    0%, 100% {
        opacity: 0;
    }

    50% {
        opacity: 0.55;
    }
}


/* =========================================================
   CHAT PANEL
   ========================================================= */

.icb-panel {
    position: fixed;

    bottom: 112px;
    right: 22px;

    width: 392px;
    height: 600px;

    max-height: calc(100vh - 135px);

    background: #f8fafc;

    border-radius: 20px;

    box-shadow:
        0 20px 50px -12px rgba(0, 0, 0, 0.22),
        0 4px 14px rgba(0, 0, 0, 0.08);

    display: none;

    flex-direction: column;

    overflow: hidden;

    z-index: 9999;

    font-family: var(--icb-font);

    opacity: 0;

    transform:
        translateY(16px)
        scale(0.98);

    transition:
        opacity 0.18s ease,
        transform 0.18s ease;
}

.icb-panel.open {
    display: flex;

    opacity: 1;

    transform:
        translateY(0)
        scale(1);
}


/* =========================================================
   BACKDROP
   ========================================================= */

.icb-backdrop {
    position: fixed;

    inset: 0;

    background: rgba(10, 14, 19, 0.5);

    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);

    z-index: 9998;

    opacity: 0;

    pointer-events: none;

    transition: opacity 0.2s ease;
}

.icb-backdrop.show {
    opacity: 1;

    pointer-events: auto;
}


/* =========================================================
   FULLSCREEN
   ========================================================= */

.icb-panel.fullscreen {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    width: 100%;
    height: 100%;

    max-height: none;

    border-radius: 0;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 640px) {

    .icb-bubble {
        left: 12px;
        right: 12px;
        bottom: 14px;

        width: auto;
        height: 54px;

        border-radius: 18px;
    }

    .icb-bubble-avatar {
        width: 42px;
        height: 42px;
        min-width: 42px;
    }

    .icb-bubble-content {
        height: 38px;

        margin-left: 8px;
        margin-right: 6px;

        padding: 0 12px;
    }

    .icb-bubble-label {
        font-size: 15px;
    }

    .icb-bubble-arrow {
        width: 30px;
        height: 30px;
        min-width: 30px;

        font-size: 15px;
    }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .icb-bubble,
    .icb-bubble.pulse,
    .icb-bubble.pulse::before {
        animation: none;
    }

    .icb-bubble {
        transition: none;
    }
}