﻿body {
    *, *::before, *::after

{
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Nunito', sans-serif;
    background: transparent;
}

#chatbox {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    border-radius: 0;
    box-shadow: none;
    display: none;
    overflow: hidden;
    z-index: 9999;
    animation: slideUp 0.35s ease;
    font-family: 'Nunito', sans-serif;
    flex-direction: column;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cb-header {
    background: #1895f1;
    padding: 13px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.cb-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cb-header-av {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255,255,255,0.35);
    animation: pulse 2s infinite;
    position: relative;
}

    .cb-header-av img {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        object-fit: cover;
    }

    .cb-header-av::after {
        content: '';
        position: absolute;
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: #4CAF50;
        border: 2px solid #fff;
        right: -3px;
        bottom: -3px;
        z-index: 3;
    }

.cb-brand-logo {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.1;
}

    .cb-brand-logo span.pink {
        color: #fff;
    }

    .cb-brand-logo span.green {
        color: #C5F060;
    }

    .cb-brand-logo span.blue {
        color: #A0E8FF;
    }

    .cb-brand-logo span.white {
        color: #fff;
    }

.cb-header-status {
    color: rgba(255,255,255,0.85);
    font-size: 11px;
    margin-top: 2px;
}

.cb-header-actions {
    display: flex;
    gap: 12px;
    position: absolute;
    top: 9px;
    right: 15px;
}

.cb-header-actions button {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    transition: color .2s;
}

.powerd-text {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 9px;
    color: #f7f7f7;
}

#chat-body {
    padding: 14px;
    /*max-height: 430px;*/
    flex: 1;
    overflow-y: auto;
    overflow-y: auto;
    background: #f4f6f9;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    #chat-body::-webkit-scrollbar {
        width: 4px;
    }

    #chat-body::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 4px;
    }

.bot-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.bot-av {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    background: linear-gradient(135deg, #FF2D78, #00AEEF);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

    .bot-av img {
        width: 28px;
        height: 28px;
        border-radius: 50%;
        object-fit: cover;
    }

    .bot-av::after {
        content: '';
        position: absolute;
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: #4CAF50;
        border: 2px solid #fff;
        right: -1px;
        bottom: -1px;
        z-index: 3;
    }

.bot-content {
    display: flex;
    flex-direction: column;
    max-width: 84%;
}

.bot-bubble {
    background: #fff;
    border-radius: 4px 16px 16px 16px;
    border-left: 3px solid #FF2D78;
    padding: 9px 13px;
    font-size: 13px;
    color: #222;
    line-height: 1.55;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.user-row {
    display: flex;
    justify-content: flex-end;
}

.user-content {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    max-width: 78%;
}

.user-bubble {
    background: linear-gradient(135deg, #FF2D78, #00AEEF);
    color: #fff;
    border-radius: 16px 4px 16px 16px;
    padding: 9px 13px;
    font-size: 13px;
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(255,45,120,0.25);
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.cb-ts {
    font-size: 10px;
    color: #bbb;
    margin-top: 3px;
    padding-left: 2px;
}

.cb-ts-right {
    text-align: right;
    padding-right: 2px;
}

.typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 9px 13px;
    background: #fff;
    border-radius: 4px 16px 16px 16px;
    border-left: 3px solid #FF2D78;
    width: fit-content;
}

.dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #FF2D78;
    animation: bounce 1.2s infinite;
}

    .dot:nth-child(2) {
        animation-delay: .2s;
        background: #7DC829;
    }

    .dot:nth-child(3) {
        animation-delay: .4s;
        background: #00AEEF;
    }

@keyframes bounce {
    0%,60%,100% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-6px);
    }
}

.opt-section-label {
    font-size: 11px;
    font-weight: 800;
    color: #FF2D78;
    letter-spacing: .6px;
    margin: 10px 0 5px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 5px;
}

.opt-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.opt-btn {
    background: #f9f9f9;
    border: 1.5px solid #ddd;
    border-radius: 22px;
    padding: 7px 12px;
    font-size: 12px;
    cursor: pointer;
    color: #333;
    text-align: left;
    transition: all .2s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Nunito', sans-serif;
}

    .opt-btn:hover:not(.selected) {
        background: #f0f8ff;
        border-color: #1895f1;
    }

    .opt-btn.selected {
        background: #e8f4ff;
        color: #1a1a1a;
        border-color: #1895f1;
        font-weight: 700;
    }

    .opt-btn[disabled] {
        cursor: default;
        pointer-events: none;
    }

.cb-checkbox {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid #ccc;
    border-radius: 5px;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all .2s;
}

.cb-check-icon {
    opacity: 0;
    transition: opacity .15s;
}

.opt-btn.selected .cb-checkbox {
    background: #1895f1;
    border-color: #1895f1;
}

.opt-btn.selected .cb-check-icon {
    opacity: 1;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.radio-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-radius: 22px;
    border: 1.5px solid #ddd;
    background: #f9f9f9;
    cursor: pointer;
    font-size: 13px;
    color: #333;
    font-family: 'Nunito', sans-serif;
    transition: all .2s;
}

    .radio-btn .radio-circle {
        width: 16px;
        height: 16px;
        border-radius: 50%;
        border: 2px solid #ccc;
        flex-shrink: 0;
        transition: all .2s;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .radio-btn.selected {
        background: linear-gradient(135deg, #FF2D78, #00AEEF);
        color: #fff;
        border-color: transparent;
    }

        .radio-btn.selected .radio-circle {
            border-color: rgba(255,255,255,0.8);
            background: rgba(255,255,255,0.3);
        }

    .radio-btn:hover:not(.selected) {
        background: #fff0f5;
        border-color: #FF2D78;
    }

.yn-row {
    display: flex;
    gap: 8px;
    margin-top: 9px;
}

.yn-btn {
    flex: 1;
    padding: 8px 10px;
    border-radius: 22px;
    border: 1.5px solid #ddd;
    background: #f9f9f9;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    transition: all .2s;
    color: #333;
    min-height: 40px;
    line-height: 1.3;
}

    .yn-btn.selected {
        background: linear-gradient(135deg, #FF2D78, #00AEEF);
        color: #fff;
        border-color: transparent;
    }

    .yn-btn:hover {
        background: linear-gradient(135deg, #FF2D78, #00AEEF) !important;
        color: #fff !important;
        border-color: transparent;
    }

    .yn-btn:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }

.confirm-btn {
    background: linear-gradient(135deg, #FF2D78, #00AEEF);
    color: #fff;
    border: none;
    border-radius: 22px;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: block;
    margin: 10px auto 0;
    transition: all .2s;
    font-family: 'Nunito', sans-serif;
}

    .confirm-btn:hover:not(:disabled) {
        filter: brightness(1.1);
    }

    .confirm-btn:disabled {
        background: linear-gradient(135deg, #FF2D78, #00AEEF);
        color: #fff;
        cursor: not-allowed;
        opacity: 0.5;
    }

#cb-input-area {
    background: #fff;
    border-top: 1px solid #eee;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

#cb-prefix {
    font-size: 13px;
    color: #444;
    font-weight: 700;
    display: none;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

#cb-flag {
    width: 18px;
    height: 12px;
    object-fit: cover;
    border-radius: 2px;
}

#cb-user-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 13px;
    color: #222;
    background: transparent;
    font-family: 'Nunito', sans-serif;
    resize: none;
    overflow-y: auto;
    min-height: 22px;
    max-height: 120px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: break-word;
    padding: 4px 0;
}

    #cb-user-input::placeholder {
        color: #bbb;
    }

#cb-send-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #ccc;
    font-size: 20px;
    padding: 0 4px;
    transition: transform .15s, color .15s;
    pointer-events: none;
}

    #cb-send-btn:hover {
        transform: scale(1.2);
    }

#cb-final-screen {
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 26px 18px;
    text-align: center;
    background: #fff;
    gap: 0;
}

.cb-final-text {
    font-size: 13px;
    color: #333;
    line-height: 1.7;
    margin-bottom: 18px;
}

.cb-final-actions {
    display: flex;
    flex-direction: column;
    gap: 9px;
    width: 100%;
}

.cb-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 12px 16px;
    border-radius: 10px;
    border: none;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    font-family: 'Nunito', sans-serif;
    transition: all .2s;
}

    .cb-action-btn:hover {
        transform: translateY(-1px);
    }

.cb-btn-appt {
    background: linear-gradient(135deg, #FF2D78, #ff6fa8) !important;
    color: #fff !important;
}

.cb-btn-call {
    background: linear-gradient(135deg, #7DC829, #a8e05f);
    color: #fff;
}

.cb-btn-wa {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #fff;
}

.cb-wa-note {
    font-size: 12px;
    color: #666;
    margin: 4px 0 2px;
    line-height: 1.5;
}

.cb-restart-btn {
    margin-top: 14px;
    background: none;
    border: none;
    color: #999;
    font-size: 12px;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    display: flex;
    align-items: center;
    gap: 5px;
}

    .cb-restart-btn:hover {
        color: #FF2D78;
    }

/* ── FAB BUTTON ── */
#chat-fab {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7DC829, #00AEEF);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    z-index: 9999;
    border: none;
    box-shadow: 0 4px 18px rgba(255,45,120,0.45);
    transition: transform .2s;
}

    #chat-fab:hover {
        transform: translate(-50%, -50%) scale(1.1);
    }

.fab-inner {
    animation: pulse 2s infinite;
    border-radius: 50%;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(168,63,57,0.4);
    }

    5% {
        transform: scale(1.01);
    }

    15% {
        transform: scale(1);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(168,63,57,0);
    }

    100% {
        box-shadow: 0 0 0 20px rgba(168,63,57,0);
    }
}

.fab-tooth {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
}

.fab-online-dot {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 14px;
    height: 14px;
    background: #4CAF50;
    border-radius: 50%;
    border: 2px solid #fff;
    z-index: 99999;
    animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
    0% {
        box-shadow: 0 0 0 0 rgba(76,175,80,0.6);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(76,175,80,0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(76,175,80,0);
    }
}

/* ── CHAT BUBBLE POPUP ── */
#chat-bubble-popup {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    right: 14px;
    z-index: 10000;
    display: none;
    animation: bubbleIn 0.4s cubic-bezier(.34,1.56,.64,1);
}

@keyframes bubbleIn {
    from {
        transform: translateY(20px) scale(0.85);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.cb-popup-inner {
    background: #FFE600;
    color: #1a1a1a;
    border-radius: 18px 18px 4px 18px;
    padding: 11px 14px 11px 16px;
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.35;
    box-shadow: 0 6px 24px rgba(0,0,0,0.18);
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 210px;
    position: relative;
    cursor: default;
}

    .cb-popup-inner::after {
        content: '';
        position: absolute;
        bottom: -10px;
        right: 18px;
        border-left: 10px solid transparent;
        border-right: 0 solid transparent;
        border-top: 10px solid #FFE600;
    }

.cb-popup-text {
    flex: 1;
    line-height: 1.4;
    cursor: pointer;
}

    .cb-popup-text .cb-popup-hi {
        font-size: 12px;
        font-weight: 700;
        color: #555;
        display: block;
        margin-bottom: 1px;
    }

    .cb-popup-text .cb-popup-msg {
        font-size: 14px;
        font-weight: 800;
        color: #1a1a1a;
    }

.fab-tooth img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
}

.cb-popup-close {
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 900;
    color: #888;
    cursor: pointer;
    padding: 0 0 0 4px;
    line-height: 1;
    flex-shrink: 0;
    transition: color .2s;
    font-family: 'Nunito', sans-serif;
}

    .cb-popup-close:hover {
        color: #FF2D78;
    }

/* ── OTP INPUT ── */
.otp-inp {
    width: 42px;
    height: 42px;
    border: 2px solid #FF2D78;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 800;
    text-align: center;
    color: #FF2D78;
    background: #fff0f5;
    font-family: 'Poppins', sans-serif;
    outline: none;
    transition: all .2s;
    caret-color: transparent;
}

    .otp-inp:focus {
        border-color: #00AEEF;
        background: #f0faff;
        box-shadow: 0 0 0 3px rgba(0,174,239,0.15);
        color: #00AEEF;
    }

    .otp-inp.otp-error {
        border-color: red;
        color: red;
        background: #fff5f5;
    }
}
