/************************************/
/*** 	 Website Chatbot	          ***/
/************************************/

.rohc-launcher,
.rohc-panel {
    --rohc-primary: #f77d0c;
    --rohc-gradient: linear-gradient(135deg, #f77d0c 0%, #ff5a1f 52%, #ef2d2d 100%);
    --rohc-chat-bg: #f6efe7;
    --rohc-bot-bubble: #ffffff;
    --rohc-user-bubble: #ffe3c8;
    --rohc-text: #1f2430;
    --rohc-muted: #7a808c;
    font-family: "Sora", "Noto Sans Gujarati", sans-serif;
}

/* Launcher sits right above the WhatsApp float button */
.rohc-launcher {
    position: fixed;
    right: 33px;
    bottom: 110px;
    z-index: 10000;
    width: 60px;
    height: 60px;
    border: 0;
    border-radius: 50%;
    background: var(--rohc-gradient);
    color: #fff;
    font-size: 26px;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(247, 125, 12, 0.4);
    transition: transform 0.2s ease;
}

.rohc-launcher:hover {
    transform: scale(1.06);
}

.rohc-launcher:focus-visible {
    outline: 3px solid #fbc99e;
    outline-offset: 3px;
}

.rohc-launcher .rohc-icon-close,
.rohc-launcher.is-open .rohc-icon-open {
    display: none;
}

.rohc-launcher.is-open .rohc-icon-close {
    display: inline-block;
}

.rohc-launcher-tip {
    position: absolute;
    right: 74px;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    background: #fff;
    color: var(--rohc-text);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 20px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.rohc-launcher:hover .rohc-launcher-tip,
.rohc-launcher.show-tip .rohc-launcher-tip {
    opacity: 1;
}

.rohc-launcher.is-open .rohc-launcher-tip {
    display: none;
}

/* Panel */
.rohc-panel {
    position: fixed;
    right: 110px;
    bottom: 30px;
    z-index: 10001;
    width: 370px;
    height: min(600px, calc(100vh - 60px));
    display: flex;
    flex-direction: column;
    background: var(--rohc-chat-bg);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.rohc-panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.rohc-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 12px 14px 16px;
    background: var(--rohc-gradient);
    color: #fff;
}

.rohc-avatar {
    flex: 0 0 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.rohc-head-text {
    flex: 1;
    min-width: 0;
    line-height: 1.25;
}

.rohc-head-text strong {
    display: block;
    font-size: 15px;
}

.rohc-head-text small {
    font-size: 12px;
    opacity: 0.9;
}

.rohc-head-btn {
    flex: 0 0 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}

.rohc-head-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.rohc-lang {
    font-weight: 700;
    font-size: 13px;
}

.rohc-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 14px 8px;
    overscroll-behavior: contain;
}

.rohc-msg {
    display: flex;
    margin-bottom: 8px;
}

.rohc-msg-user {
    justify-content: flex-end;
}

.rohc-bubble {
    max-width: 85%;
    padding: 9px 13px;
    border-radius: 14px;
    border-top-left-radius: 4px;
    background: var(--rohc-bot-bubble);
    color: var(--rohc-text);
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-line;
    overflow-wrap: anywhere;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.rohc-msg-user .rohc-bubble {
    background: var(--rohc-user-bubble);
    border-top-left-radius: 14px;
    border-top-right-radius: 4px;
}

.rohc-typing .rohc-bubble {
    display: flex;
    gap: 4px;
    padding: 13px 14px;
}

.rohc-typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #c4c7cd;
    animation: rohc-blink 1s infinite ease-in-out;
}

.rohc-typing span:nth-child(2) {
    animation-delay: 0.15s;
}

.rohc-typing span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes rohc-blink {
    0%, 80%, 100% {
        opacity: 0.3;
    }

    40% {
        opacity: 1;
    }
}

.rohc-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0 8px;
}

.rohc-opt {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid var(--rohc-primary);
    background: #fff;
    color: var(--rohc-primary);
    border-radius: 20px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.rohc-opt:hover,
.rohc-opt:focus-visible {
    background: var(--rohc-primary);
    color: #fff;
}

.rohc-opt-link::after {
    content: "\2197";
    margin-left: 6px;
    font-size: 12px;
}

.rohc-opt-menu {
    border-color: #c9ccd2;
    color: var(--rohc-muted);
}

.rohc-opt-menu:hover,
.rohc-opt-menu:focus-visible {
    background: var(--rohc-muted);
    border-color: var(--rohc-muted);
}

.rohc-date-row {
    display: flex;
    gap: 8px;
    width: 100%;
}

.rohc-date-row input {
    flex: 1;
    min-width: 0;
    border: 1.5px solid #d8dbe0;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 14px;
    color: var(--rohc-text);
    background: #fff;
}

.rohc-footer {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    background: #fff;
    border-top: 1px solid #eee;
    margin: 0;
}

.rohc-input {
    flex: 1;
    min-width: 0;
    border: 1.5px solid #e2e4e8;
    border-radius: 22px;
    padding: 9px 15px;
    font-size: 14px;
    color: var(--rohc-text);
    outline: none;
}

.rohc-input:focus {
    border-color: var(--rohc-primary);
}

.rohc-send {
    flex: 0 0 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: var(--rohc-gradient);
    color: #fff;
    font-size: 15px;
    cursor: pointer;
}

.rohc-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

@media (max-width: 768px) {
    .rohc-launcher {
        right: 21px;
        bottom: 92px;
        width: 56px;
        height: 56px;
        font-size: 24px;
    }

    .rohc-launcher.is-open {
        display: none;
    }

    body.rohc-open {
        overflow: hidden;
    }

    .rohc-launcher-tip {
        display: none;
    }

    .rohc-panel {
        inset: 0;
        width: 100%;
        height: 100%;
        height: 100dvh;
        border-radius: 0;
    }

    /* 16px stops iOS zooming into the field */
    .rohc-input,
    .rohc-date-row input {
        font-size: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rohc-panel,
    .rohc-launcher {
        transition: none;
    }

    .rohc-typing span {
        animation: none;
    }
}
