/* =========================================================
   ORGANIC PARADISE - AI ASSISTANT
========================================================= */

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




.op-ai-button {
    position: fixed;
    right: 27px;
    bottom: 175px;

    width: 50px;
    height: 50px;

    border: none;
    border-radius: 50%;

    /*background: linear-gradient(*/
    /*    135deg,*/
    /*    var(--primary-color),*/
    /*    var(--secondary-color2)*/
    /*);*/
     /*background: #F3F4FF;*/
background: #FFFFFF;
    color: #fff;

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

    cursor: pointer;

    z-index: 999990;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.25);

    transition: all 0.3s ease;
}

.op-ai-button:hover {
    transform: translateY(-5px) scale(1.06);

    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.30);
}


/* Robot Icon */

.op-ai-icon {
    position: relative;

    z-index: 2;

    font-size: 27px;

    line-height: 1;
}


/* Pulse */

.op-ai-pulse {
    position: absolute;

    width: 100%;
    height: 100%;

    border-radius: 50%;

    border: 2px solid rgba(255, 255, 255, 0.8);

    animation: opAiPulse 2s infinite;
}


@keyframes opAiPulse {

    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    70% {
        transform: scale(1.35);
        opacity: 0;
    }

    100% {
        transform: scale(1.35);
        opacity: 0;
    }

}


/* =========================================================
   CHATBOX
========================================================= */

.op-ai-chatbox {

    position: fixed;

    right: 25px;
    bottom: 100px;

    width: 390px;

    max-width: calc(100vw - 30px);

    height: 600px;

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

    background: #ffffff;

    border-radius: 22px;

    overflow: hidden;

    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.25);

    z-index: 999989;

    display: none;

    flex-direction: column;

    border: 1px solid rgba(0, 0, 0, 0.08);
}


/* OPEN */

.op-ai-chatbox.active {

    display: flex;

    animation: opAiOpen 0.3s ease;

}


@keyframes opAiOpen {

    from {
        opacity: 0;

        transform:
            translateY(25px)
            scale(0.95);
    }

    to {
        opacity: 1;

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

}


/* =========================================================
   HEADER
========================================================= */

.op-ai-header {

    padding: 16px 18px;

    background: linear-gradient(
        135deg,
        var(--primary-color),
        var(--secondary-color2)
    );

    color: #ffffff;

    display: flex;

    align-items: center;

    justify-content: space-between;

    flex-shrink: 0;
}


/* Profile */

.op-ai-profile {

    display: flex;

    align-items: center;

    gap: 12px;
}


/* Avatar */

.op-ai-avatar {

    position: relative;

    width: 46px;
    height: 46px;

    min-width: 46px;

    border-radius: 50%;

    background: #ffffff;

    display: flex;

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

    font-size: 24px;

    box-shadow:
        0 5px 15px rgba(0, 0, 0, 0.15);
}


/* Online */

.op-online-dot {

    position: absolute;

    right: 0;
    bottom: 1px;

    width: 11px;
    height: 11px;

    background: #25c56f;

    border: 2px solid #ffffff;

    border-radius: 50%;
}


/* Title */

.op-ai-title h3 {

    margin: 0;

    color: #ffffff;

    font-size: 17px;

    line-height: 1.2;

    font-weight: 700;
}


.op-ai-title span {

    display: block;

    margin-top: 4px;

    font-size: 11px;

    opacity: 0.9;
}


/* Close */

.op-ai-close {

    width: 36px;
    height: 36px;

    border: none;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.15);

    color: #ffffff;

    font-size: 25px;

    line-height: 1;

    cursor: pointer;

    display: flex;

    align-items: center;

    justify-content: center;

    transition: 0.25s ease;
}


.op-ai-close:hover {

    background: rgba(255, 255, 255, 0.25);

    transform: rotate(90deg);
}


/* =========================================================
   MESSAGE AREA
========================================================= */

.op-ai-messages {

    flex: 1;

    padding: 18px;

    overflow-y: auto;

    background: #f7f7f4;

    scroll-behavior: smooth;
}


/* Scrollbar */

.op-ai-messages::-webkit-scrollbar {

    width: 5px;
}


.op-ai-messages::-webkit-scrollbar-track {

    background: transparent;
}


.op-ai-messages::-webkit-scrollbar-thumb {

    background: #c9c9c9;

    border-radius: 10px;
}


/* Message */

.op-ai-message {

    display: flex;

    align-items: flex-start;

    gap: 8px;

    margin-bottom: 15px;

    width: 100%;
}


/* Bot Avatar */

.op-ai-small-avatar {

    width: 32px;
    height: 32px;

    min-width: 32px;

    border-radius: 50%;

    background: #ffffff;

    display: flex;

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

    font-size: 17px;

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.08);
}


/* Bubble */

.op-ai-bubble {

    max-width: 82%;

    padding: 12px 14px;

    background: #ffffff;

    border-radius:
        5px
        16px
        16px
        16px;

    color: #333333;

    font-size: 13px;

    line-height: 1.6;

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.05);

    word-wrap: break-word;
}


/* Bot paragraph */

.op-ai-bubble p {

    margin: 5px 0;
}


.op-ai-bubble strong {

    display: block;

    margin-bottom: 5px;
}


/* =========================================================
   USER MESSAGE
========================================================= */

.op-ai-user {

    justify-content: flex-end;
}


.op-ai-user .op-ai-bubble {

    background: var(--primary-color);

    color: #ffffff;

    border-radius:
        16px
        5px
        16px
        16px;
}


/* =========================================================
   QUICK QUESTIONS
========================================================= */

.op-ai-quick-title {

    font-size: 12px;

    font-weight: 600;

    color: #777777;

    margin:
        10px
        0;
}


.op-ai-quick-buttons {

    display: flex;

    flex-direction: column;

    gap: 8px;

    margin-bottom: 10px;
}


.op-ai-quick-buttons button {

    width: 100%;

    text-align: left;

    padding: 10px 13px;

    border:
        1px
        solid
        #e1e1e1;

    border-radius: 10px;

    background: #ffffff;

    color: var(--primary-color);

    font-size: 12px;

    cursor: pointer;

    transition: all 0.25s ease;
}


.op-ai-quick-buttons button:hover {

    border-color:
        var(--secondary-color2);

    background: #fafafa;

    transform:
        translateX(3px);
}


/* =========================================================
   TYPING INDICATOR
========================================================= */

.op-ai-typing {

    display: none;

    align-items: center;

    gap: 4px;

    padding:
        7px
        18px;

    background: #f7f7f4;

    flex-shrink: 0;
}


.op-ai-typing.active {

    display: flex;
}


.op-ai-typing span {

    width: 6px;
    height: 6px;

    background: #777777;

    border-radius: 50%;

    animation:
        opTyping
        1.2s
        infinite;
}


.op-ai-typing span:nth-child(2) {

    animation-delay: 0.2s;
}


.op-ai-typing span:nth-child(3) {

    animation-delay: 0.4s;
}


.op-ai-typing small {

    margin-left: 6px;

    font-size: 10px;

    color: #888888;
}


@keyframes opTyping {

    0%,
    60%,
    100% {

        transform:
            translateY(0);

    }

    30% {

        transform:
            translateY(-4px);

    }

}


/* =========================================================
   INPUT AREA
========================================================= */

.op-ai-input-area {

    display: flex;

    align-items: center;

    padding: 10px;

    background: #ffffff;

    border-top:
        1px
        solid
        #eeeeee;

    flex-shrink: 0;
}


.op-ai-input-area input {

    flex: 1;

    height: 44px;

    min-width: 0;

    border:
        1px
        solid
        #dddddd;

    border-radius: 10px;

    padding:
        0
        13px;

    outline: none;

    font-family:
        var(--default-font),
        Arial,
        sans-serif;

    font-size: 13px;

    color: #333333;

    transition: 0.25s ease;
}


.op-ai-input-area input::placeholder {

    color: #999999;
}


.op-ai-input-area input:focus {

    border-color:
        var(--secondary-color2);

    box-shadow:
        0
        0
        0
        3px
        rgba(0, 0, 0, 0.04);
}


.op-ai-input-area input:disabled {

    background: #f5f5f5;

    cursor: not-allowed;
}


/* Send */

.op-ai-input-area button {

    width: 44px;
    height: 44px;

    min-width: 44px;

    margin-left: 7px;

    border: none;

    border-radius: 10px;

    background:
        var(--secondary-color2);

    color: #ffffff;

    cursor: pointer;

    display: flex;

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

    transition: 0.25s ease;
}


.op-ai-input-area button:hover {

    transform:
        translateY(-2px);

    opacity: 0.9;
}


.op-ai-input-area button:disabled {

    opacity: 0.5;

    cursor: not-allowed;

    transform: none;
}


/* =========================================================
   FOOTER
========================================================= */

.op-ai-footer {

    padding:
        7px
        12px;

    background: #ffffff;

    border-top:
        1px
        solid
        #eeeeee;

    display: flex;

    align-items: center;

    justify-content: space-between;

    font-size: 10px;

    color: #999999;

    flex-shrink: 0;
}


.op-ai-footer a {

    color:
        var(--primary-color);

    font-weight: 600;

    text-decoration: none;
}


.op-ai-footer a:hover {

    text-decoration: underline;
}


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

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

@media (max-width: 767px) {

    /* Floats above the mobile navigation bar */
    .op-ai-button {
        width: 50px;
        height: 50px;
        right: 16px;
        bottom: 155px; 
    }

    /* Screen-fitted modal sheet */
    .op-ai-chatbox {
        right: 0;
        bottom: 0;
        width: 100vw;
        max-width: 100vw;
        height: 80dvh;
        max-height: 100dvh;
        border-radius: 0;
        border: none;
    }

    .op-ai-header {
        padding: 14px 16px;
        border-radius: 0;
    }

    .op-ai-avatar {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 20px;
    }

    .op-ai-title h3 {
        font-size: 15px;
    }

    .op-ai-title span {
        font-size: 10.5px;
    }

    .op-ai-messages {
        padding: 14px;
    }

    .op-ai-bubble {
        max-width: 88%;
        font-size: 12.5px;
    }
    
    .op-ai-input-area {
        padding: 10px 12px;
    }
}

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

@media (max-width: 400px) {

    .op-ai-chatbox {

        right: 5px;

        width:
            calc(100vw - 10px);

        bottom: 95px;

    }


    .op-ai-button {

        right: 18px;

        width: 45px;
        height: 45px;

    }

}