
/* =========================================================
   DDM COLLEGE OF PHARMACY
   ULTRA PREMIUM GLOBAL CHATBOT
   NAVY + GOLD + TEAL + IVORY DESIGN SYSTEM

   Theme:
   Navy 950  #03182b
   Navy 900  #062440
   Navy 800  #082f52
   Navy 700  #10466d

   Gold 700  #a87918
   Gold 600  #c18e25
   Gold 500  #d5a83a
   Gold 400  #e5bf62
   Gold 300  #f2d58a

   Teal 800  #075449
   Teal 700  #087f73
   Teal 600  #10967f
   Teal 500  #18a47b
   Teal 300  #71d7bd

   Surface:
   White
   Ivory
   Cream
   Soft Blue
   Soft Teal
========================================================= */


/* =========================================================
   ROOT
========================================================= */

:root {

    /* NAVY */
    --chat-navy-950: #03182b;
    --chat-navy-900: #062440;
    --chat-navy-800: #082f52;
    --chat-navy-700: #10466d;

    /* GOLD */
    --chat-gold-700: #a87918;
    --chat-gold-600: #c18e25;
    --chat-gold-500: #d5a83a;
    --chat-gold-400: #e5bf62;
    --chat-gold-300: #f2d58a;

    /* TEAL */
    --chat-teal-800: #075449;
    --chat-teal-700: #087f73;
    --chat-teal-600: #10967f;
    --chat-teal-500: #18a47b;
    --chat-teal-300: #71d7bd;

    /* SURFACES */
    --chat-white: #ffffff;
    --chat-ivory: #fbfaf6;
    --chat-cream: #f6f3eb;
    --chat-soft-blue: #eef4f8;
    --chat-soft-teal: #edf8f5;

    /* TEXT */
    --chat-text: #173044;
    --chat-text-dark: #062440;
    --chat-muted: #718096;
    --chat-muted-light: #9aa7b4;

    /* BORDERS */
    --chat-border: rgba(6, 36, 64, 0.09);
    --chat-gold-border: rgba(213, 168, 58, 0.28);
    --chat-teal-border: rgba(24, 164, 123, 0.22);

    /* SHADOWS */
    --chat-shadow:
        0 35px 90px rgba(3, 24, 43, 0.30),
        0 12px 35px rgba(3, 24, 43, 0.12);

    --chat-soft-shadow:
        0 10px 28px rgba(3, 24, 43, 0.07);
}


/* =========================================================
   FLOATING BUTTON
========================================================= */

.chatbot-button {

    position: fixed;

    right: 28px;
    bottom: 28px;

    width: 68px;
    height: 68px;

    border: 1px solid
        rgba(229, 191, 98, 0.45);

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    background:

        radial-gradient(
            circle at 30% 20%,
            rgba(113, 215, 189, 0.24),
            transparent 28%
        ),

        linear-gradient(
            145deg,
            var(--chat-teal-500),
            var(--chat-teal-700) 55%,
            var(--chat-teal-800)
        );

    color: var(--chat-white);

    font-size: 25px;

    cursor: pointer;

    z-index: 99990;

    box-shadow:

        0 16px 38px
        rgba(8, 127, 115, 0.30),

        0 7px 18px
        rgba(3, 24, 43, 0.20),

        inset 0 1px 0
        rgba(255, 255, 255, 0.20);

    transition:
        transform .32s cubic-bezier(.2,.8,.2,1),
        box-shadow .32s ease,
        filter .32s ease;
}


/* Outer premium ring */

.chatbot-button::before {

    content: "";

    position: absolute;

    inset: 4px;

    border-radius: 50%;

    border:
        1px solid
        rgba(242, 213, 138, 0.65);

    pointer-events: none;
}


/* Inner shine */

.chatbot-button::after {

    content: "";

    position: absolute;

    width: 25px;
    height: 13px;

    top: 8px;
    left: 13px;

    border-radius: 50%;

    background:
        rgba(255, 255, 255, 0.20);

    filter: blur(5px);

    transform: rotate(-22deg);

    pointer-events: none;
}


.chatbot-button:hover {

    transform:
        translateY(-6px)
        scale(1.06);

    filter:
        saturate(1.08);

    box-shadow:

        0 23px 50px
        rgba(8, 127, 115, 0.36),

        0 10px 25px
        rgba(3, 24, 43, 0.22),

        inset 0 1px 0
        rgba(255, 255, 255, 0.25);
}


.chatbot-button:active {

    transform:
        translateY(-1px)
        scale(.96);
}


.chatbot-button i {

    position: relative;

    z-index: 4;

    filter:
        drop-shadow(
            0 2px 3px
            rgba(3, 24, 43, .18)
        );
}


/* =========================================================
   FLOATING PULSE
========================================================= */

.chatbot-pulse {

    position: absolute;

    inset: -2px;

    border-radius: 50%;

    border:
        2px solid
        rgba(24, 164, 123, .55);

    animation:
        chatbotPulse 2.5s infinite;

    pointer-events: none;
}


@keyframes chatbotPulse {

    0% {

        transform: scale(1);

        opacity: .75;
    }

    65% {

        transform: scale(1.48);

        opacity: 0;
    }

    100% {

        transform: scale(1.48);

        opacity: 0;
    }
}


/* =========================================================
   CHAT WINDOW
========================================================= */

.chatbot-window {

    position: fixed;

    right: 28px;
    bottom: 110px;

    width: 410px;

    max-width:
        calc(100vw - 32px);

    height: 620px;

    max-height:
        calc(100vh - 140px);

    display: flex;

    flex-direction: column;

    overflow: hidden;

    border-radius: 28px;

    border:
        1px solid
        rgba(213, 168, 58, .28);

    background:
        rgba(255,255,255,.96);

    box-shadow:
        var(--chat-shadow);

    backdrop-filter:
        blur(25px);

    -webkit-backdrop-filter:
        blur(25px);

    z-index: 99989;

    opacity: 0;

    visibility: hidden;

    pointer-events: none;

    transform:
        translateY(24px)
        scale(.94);

    transform-origin:
        bottom right;

    transition:
        opacity .28s ease,
        visibility .28s ease,
        transform .32s cubic-bezier(.2,.8,.2,1);
}


/* =========================================================
   OPEN
========================================================= */

.chatbot-window.active,
.chatbot-window.open {

    opacity: 1;

    visibility: visible;

    pointer-events: auto;

    transform:
        translateY(0)
        scale(1);
}


/* =========================================================
   PREMIUM HEADER
========================================================= */

.chatbot-header {

    min-height: 94px;

    padding:
        16px 17px;

    display: flex;

    align-items: center;

    gap: 13px;

    position: relative;

    overflow: hidden;

    color: white;

    background:

        radial-gradient(
            circle at 88% 10%,
            rgba(24,164,123,.22),
            transparent 32%
        ),

        radial-gradient(
            circle at 5% 100%,
            rgba(213,168,58,.18),
            transparent 36%
        ),

        linear-gradient(
            135deg,
            var(--chat-navy-950),
            var(--chat-navy-900) 48%,
            var(--chat-navy-800)
        );
}


/* Header gold-teal line */

.chatbot-header::after {

    content: "";

    position: absolute;

    left: 0;
    right: 0;

    bottom: 0;

    height: 3px;

    background:

        linear-gradient(
            90deg,
            transparent,
            var(--chat-gold-600) 24%,
            var(--chat-gold-400) 43%,
            var(--chat-teal-500) 67%,
            var(--chat-teal-300) 82%,
            transparent
        );
}


/* Header decorative orb */

.chatbot-header::before {

    content: "";

    position: absolute;

    width: 180px;
    height: 180px;

    right: -85px;
    top: -105px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(229,191,98,.16),
            transparent 68%
        );

    pointer-events: none;
}


/* =========================================================
   AVATAR
========================================================= */

.chatbot-avatar {

    width: 52px;
    height: 52px;

    flex:
        0 0 52px;

    display: flex;

    align-items: center;
    justify-content: center;

    position: relative;

    border-radius: 17px;

    background:

        linear-gradient(
            145deg,
            rgba(24,164,123,.25),
            rgba(213,168,58,.20)
        );

    border:
        1px solid
        rgba(242,213,138,.32);

    color:
        var(--chat-gold-300);

    font-size: 21px;

    box-shadow:

        inset 0 1px 0
        rgba(255,255,255,.14),

        0 8px 20px
        rgba(3,24,43,.15);

    z-index: 2;
}


.chatbot-avatar::before {

    content: "";

    position: absolute;

    inset: 5px;

    border-radius: 13px;

    border:
        1px solid
        rgba(113,215,189,.20);
}


/* =========================================================
   HEADER INFO
========================================================= */

.chatbot-header-info {

    flex: 1;

    min-width: 0;

    position: relative;

    z-index: 3;
}


.chatbot-header-info strong {

    display: block;

    font-family:
        "Cormorant Garamond",
        Georgia,
        serif;

    font-size: 23px;

    line-height: 1;

    font-weight: 700;

    letter-spacing: .2px;

    color: white;
}


.chatbot-header-info span {

    display: flex;

    align-items: center;

    gap: 6px;

    margin-top: 6px;

    font-family:
        "Inter",
        Arial,
        sans-serif;

    font-size: 10.5px;

    letter-spacing: .3px;

    color:
        rgba(255,255,255,.68);
}


/* Online dot */

.chatbot-header-info span::before {

    content: "";

    width: 7px;
    height: 7px;

    border-radius: 50%;

    background:
        var(--chat-teal-300);

    box-shadow:

        0 0 0 3px
        rgba(113,215,189,.10),

        0 0 9px
        rgba(113,215,189,.35);
}


/* =========================================================
   CLOSE BUTTON
========================================================= */

.chatbot-close {

    width: 39px;
    height: 39px;

    flex:
        0 0 39px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 12px;

    border:
        1px solid
        rgba(255,255,255,.09);

    background:
        rgba(255,255,255,.065);

    color:
        rgba(255,255,255,.82);

    cursor: pointer;

    position: relative;

    z-index: 5;

    transition:
        transform .22s ease,
        background .22s ease,
        color .22s ease,
        border-color .22s ease;
}


.chatbot-close:hover {

    transform:
        rotate(90deg);

    background:
        rgba(213,168,58,.14);

    border-color:
        rgba(229,191,98,.30);

    color:
        var(--chat-gold-300);
}


/* =========================================================
   MESSAGES
========================================================= */

.chatbot-messages {

    flex: 1;

    overflow-y: auto;

    padding:
        22px 17px;

    background:

        radial-gradient(
            circle at 95% 0%,
            rgba(24,164,123,.085),
            transparent 30%
        ),

        radial-gradient(
            circle at 0% 100%,
            rgba(213,168,58,.065),
            transparent 30%
        ),

        linear-gradient(
            180deg,
            var(--chat-ivory),
            var(--chat-cream)
        );

    scroll-behavior: smooth;

    overscroll-behavior:
        contain;
}


/* Scrollbar */

.chatbot-messages::-webkit-scrollbar {

    width: 5px;
}


.chatbot-messages::-webkit-scrollbar-track {

    background:
        transparent;
}


.chatbot-messages::-webkit-scrollbar-thumb {

    background:
        linear-gradient(
            180deg,
            var(--chat-teal-500),
            var(--chat-gold-500)
        );

    border-radius: 999px;
}


/* =========================================================
   MESSAGE
========================================================= */

.chat-msg {

    display: flex;

    margin-bottom: 15px;

    animation:
        chatbotMessageIn
        .30s
        ease
        both;
}


.chat-msg.bot {

    justify-content:
        flex-start;
}


.chat-msg.user {

    justify-content:
        flex-end;
}


/* =========================================================
   MESSAGE CONTENT
========================================================= */

.chat-msg-content {

    max-width: 82%;

    padding:
        12px 15px;

    border-radius:
        17px;

    font-family:
        "Inter",
        Arial,
        sans-serif;

    font-size:
        13px;

    line-height:
        1.65;

    position:
        relative;
}


/* BOT */

.chat-msg.bot .chat-msg-content {

    color:
        var(--chat-text);

    background:
        rgba(255,255,255,.94);

    border:
        1px solid
        rgba(6,36,64,.075);

    border-top-left-radius:
        5px;

    box-shadow:
        0 8px 22px
        rgba(3,24,43,.055);
}


/* Bot accent */

.chat-msg.bot .chat-msg-content::before {

    content: "";

    position: absolute;

    left: 0;
    top: 12px;

    width: 3px;
    height: 26px;

    border-radius:
        0 5px 5px 0;

    background:

        linear-gradient(
            180deg,
            var(--chat-gold-500),
            var(--chat-teal-500)
        );
}


/* USER */

.chat-msg.user .chat-msg-content {

    color:
        white;

    background:

        linear-gradient(
            135deg,
            var(--chat-teal-600),
            var(--chat-teal-700) 55%,
            var(--chat-teal-800)
        );

    border:
        1px solid
        rgba(113,215,189,.13);

    border-top-right-radius:
        5px;

    box-shadow:
        0 9px 23px
        rgba(8,127,115,.20);
}


/* =========================================================
   TEXT
========================================================= */

.chat-msg-content strong {

    color:
        var(--chat-teal-700);

    font-weight:
        700;
}


.chat-msg.user .chat-msg-content strong {

    color:
        var(--chat-gold-300);
}


.chat-msg-content ul {

    margin:
        8px 0 0;

    padding-left:
        18px;
}


.chat-msg-content li {

    margin:
        3px 0;
}


.chat-msg-content p {

    margin:
        0 0 7px;
}


.chat-msg-content p:last-child {

    margin-bottom:
        0;
}


.chat-msg-content a {

    color:
        var(--chat-teal-700);

    font-weight:
        600;

    text-decoration:
        underline;
}


.chat-msg.user .chat-msg-content a {

    color:
        var(--chat-gold-300);
}


/* =========================================================
   TYPING
========================================================= */

.chatbot-typing {

    display:
        flex;

    align-items:
        center;

    gap:
        5px;

    padding:
        13px 15px;

    border-radius:
        17px;

    border-top-left-radius:
        5px;

    background:
        rgba(255,255,255,.96);

    border:
        1px solid
        rgba(6,36,64,.075);

    box-shadow:
        0 7px 20px
        rgba(3,24,43,.05);
}


.chatbot-typing span {

    width: 6px;
    height: 6px;

    border-radius: 50%;

    background:
        var(--chat-teal-500);

    animation:
        chatbotTyping
        1.15s
        infinite
        ease-in-out;
}


.chatbot-typing span:nth-child(2) {

    background:
        var(--chat-gold-500);

    animation-delay:
        .15s;
}


.chatbot-typing span:nth-child(3) {

    background:
        var(--chat-teal-700);

    animation-delay:
        .30s;
}


@keyframes chatbotTyping {

    0%,
    60%,
    100% {

        transform:
            translateY(0);

        opacity:
            .42;
    }

    30% {

        transform:
            translateY(-4px);

        opacity:
            1;
    }
}


/* =========================================================
   QUICK ACTIONS
========================================================= */

.chatbot-quick {

    display:
        flex;

    gap:
        7px;

    padding:
        11px 12px;

    overflow-x:
        auto;

    background:
        rgba(255,255,255,.98);

    border-top:
        1px solid
        rgba(6,36,64,.07);

    scrollbar-width:
        none;
}


.chatbot-quick::-webkit-scrollbar {

    display:
        none;
}


.chatbot-quick button {

    flex:
        0 0 auto;

    display:
        inline-flex;

    align-items:
        center;

    gap:
        6px;

    padding:
        8px 12px;

    border-radius:
        999px;

    border:
        1px solid
        rgba(8,127,115,.16);

    background:

        linear-gradient(
            135deg,
            rgba(24,164,123,.07),
            rgba(213,168,58,.06)
        );

    color:
        var(--chat-teal-800);

    font-family:
        "Inter",
        Arial,
        sans-serif;

    font-size:
        11px;

    font-weight:
        600;

    white-space:
        nowrap;

    cursor:
        pointer;

    transition:
        all .22s ease;
}


.chatbot-quick button i {

    font-size:
        10px;

    color:
        var(--chat-gold-600);

    transition:
        color .22s ease;
}


.chatbot-quick button:hover {

    transform:
        translateY(-2px);

    color:
        white;

    border-color:
        var(--chat-teal-600);

    background:

        linear-gradient(
            135deg,
            var(--chat-teal-600),
            var(--chat-teal-800)
        );

    box-shadow:
        0 6px 16px
        rgba(8,127,115,.20);
}


.chatbot-quick button:hover i {

    color:
        var(--chat-gold-300);
}


/* =========================================================
   INPUT AREA
========================================================= */

.chatbot-input {

    display:
        flex;

    align-items:
        center;

    gap:
        8px;

    padding:
        12px;

    background:
        rgba(255,255,255,.99);

    border-top:
        1px solid
        rgba(6,36,64,.08);
}


/* Input */

.chatbot-input input {

    flex:
        1;

    min-width:
        0;

    height:
        47px;

    padding:
        0 15px;

    border:
        1px solid
        rgba(6,36,64,.11);

    border-radius:
        14px;

    outline:
        none;

    background:
        var(--chat-soft-blue);

    color:
        var(--chat-text);

    font-family:
        "Inter",
        Arial,
        sans-serif;

    font-size:
        13px;

    transition:
        .22s ease;
}


.chatbot-input input::placeholder {

    color:
        var(--chat-muted-light);
}


.chatbot-input input:hover {

    border-color:
        rgba(8,127,115,.22);
}


.chatbot-input input:focus {

    background:
        white;

    border-color:
        rgba(8,127,115,.46);

    box-shadow:
        0 0 0 3px
        rgba(24,164,123,.09);
}


/* =========================================================
   SEND BUTTON
========================================================= */

.chatbot-input button {

    width:
        47px;

    height:
        47px;

    flex:
        0 0 47px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    border-radius:
        14px;

    border:
        1px solid
        rgba(229,191,98,.30);

    background:

        linear-gradient(
            135deg,
            var(--chat-teal-500),
            var(--chat-teal-700) 58%,
            var(--chat-teal-800)
        );

    color:
        white;

    cursor:
        pointer;

    box-shadow:
        0 6px 15px
        rgba(8,127,115,.16);

    transition:
        transform .22s ease,
        box-shadow .22s ease,
        filter .22s ease;
}


.chatbot-input button:hover {

    transform:
        translateY(-2px);

    filter:
        brightness(1.04);

    box-shadow:
        0 9px 21px
        rgba(8,127,115,.25);
}


.chatbot-input button:active {

    transform:
        scale(.95);
}


/* =========================================================
   MESSAGE ANIMATION
========================================================= */

@keyframes chatbotMessageIn {

    from {

        opacity:
            0;

        transform:
            translateY(9px)
            scale(.985);
    }

    to {

        opacity:
            1;

        transform:
            translateY(0)
            scale(1);
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    .chatbot-button {

        width:
            60px;

        height:
            60px;

        right:
            17px;

        bottom:
            17px;

        font-size:
            22px;
    }


    .chatbot-window {

        right:
            10px;

        bottom:
            86px;

        width:
            calc(100vw - 20px);

        max-width:
            none;

        height:
            calc(100vh - 105px);

        max-height:
            680px;

        border-radius:
            22px;
    }


    .chatbot-header {

        min-height:
            80px;

        padding:
            14px;
    }


    .chatbot-avatar {

        width:
            45px;

        height:
            45px;

        flex-basis:
            45px;

        border-radius:
            14px;
    }


    .chatbot-header-info strong {

        font-size:
            20px;
    }


    .chatbot-header-info span {

        font-size:
            10px;
    }


    .chatbot-messages {

        padding:
            17px 12px;
    }


    .chat-msg-content {

        max-width:
            89%;

        font-size:
            12.5px;
    }


    .chatbot-quick {

        padding:
            9px 10px;
    }


    .chatbot-input {

        padding:
            10px;
    }


    .chatbot-input input {

        height:
            44px;
    }


    .chatbot-input button {

        width:
            44px;

        height:
            44px;

        flex-basis:
            44px;
    }
}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 380px) {

    .chatbot-window {

        right:
            7px;

        width:
            calc(100vw - 14px);

        bottom:
            80px;

        border-radius:
            19px;
    }


    .chatbot-button {

        width:
            56px;

        height:
            56px;

        right:
            13px;

        bottom:
            13px;
    }


    .chatbot-header {

        min-height:
            74px;
    }


    .chatbot-header-info strong {

        font-size:
            18px;
    }


    .chatbot-avatar {

        width:
            41px;

        height:
            41px;

        flex-basis:
            41px;
    }


    .chat-msg-content {

        max-width:
            92%;

        font-size:
            12px;
    }
}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .chatbot-button,
    .chatbot-window,
    .chatbot-close,
    .chatbot-quick button,
    .chatbot-input button,
    .chatbot-input input {

        transition:
            none !important;
    }

    .chatbot-pulse,
    .chat-msg,
    .chatbot-typing span {

        animation:
            none !important;
    }
}
