#my-chatbot-container * {
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#my-chatbot-container {
    position: fixed;
    bottom: 5px;
    right: 5px;
    z-index: 9999;
}

#cb-window {
    width: 400px;
    height: 750px;
    max-width: calc(100vw - 10px);
    max-height: calc(100dvh - 10px);
    background-color: #fcf9f5;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

#cb-header-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* 2. Main (Orange) */
.cb-header-main {
    background-color: #d85c35;
    color: white;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.cb-avatar {
    width: 45px;
    height: 45px;
    background-color: #f5d8ba;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.cb-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cb-brand-info {
    flex: 1;
}

.cb-brand-name {
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 1px;
}

.cb-brand-sub {
    font-size: 11px;
}

.cb-header-actions {
    display: flex;
    gap: 15px;
    font-size: 18px;
}

.cb-header-actions span {
    cursor: pointer;
    opacity: 0.9;
}

.cb-header-actions span:hover {
    opacity: 1;
}

/* 3. Progress (Orange) */
.cb-header-progress {
    background-color: #d85c35;
    padding: 0 15px 12px 15px;
}

.cb-step-text {
    display: flex;
    justify-content: space-between;
    color: white;
    font-size: 11px;
    margin-bottom: 6px;
    font-weight: bold;
}

.cb-step-note {
    font-size: 9px;
    font-weight: normal;
}

.cb-progress-bar {
    width: 100%;
    height: 6px;
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
    overflow: hidden;
}

.cb-progress-fill {
    height: 100%;
    width: 10%;
    background-color: #ffe680;
    border-radius: 3px;
    transition: width 0.3s ease;
}

#cb-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Message Bubbles */
.cb-msg {
    max-width: 90%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.cb-msg-bot {
    align-self: flex-start;
    background-color: #ffffff;
    border: 1px solid #f0e6da;
    color: #333;
    border-top-left-radius: 4px;
}

.cb-msg-user {
    align-self: flex-end;
    background-color: #d85c35;
    color: white;
    border-top-right-radius: 4px;
}

.cb-custom-block {
    align-self: flex-start;
    width: 100%;
    background-color: #fdf5ea;
    border: 1px solid #f0e6da;
    border-radius: 12px;
    padding: 15px;
    margin-top: 2px;
}

.cb-block-title {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 12px;
    color: #555;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cb-badge-required {
    background-color: #fbd6c6;
    color: #d85c35;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: normal;
}

/* Option Buttons (Sex, Num) */
.cb-party-options { flex-wrap: wrap; }
.cb-party-options [data-custom] { flex-basis: 100%; }
.cb-party-options + form { margin-top: 12px; }
.cb-party-options + form .cb-form-input { box-sizing: border-box; }
.cb-options-grid {
    display: flex;
    gap: 10px;
}

.cb-btn-large {
    flex: 1;
    padding: 15px 10px;
    background-color: white;
    border: 1px solid #d85c35;
    color: #d85c35;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: bold;
    transition: all 0.2s;
    text-align: center;
}

.cb-btn-large:hover,
.cb-btn-large.selected {
    background-color: #d85c35;
    color: white;
}

/* CALENDAR */
.cb-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 15px;
    color: #793c1b;
}

.cb-cal-nav {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: white;
    border: 1px solid #ddd;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.cb-calendar-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    text-align: center;
}

.cb-calendar-day-name {
    font-size: 11px;
    color: #d85c35;
    margin-bottom: 5px;
}

.cb-calendar-day {
    padding: 8px 0;
    font-size: 14px;
    cursor: pointer;
    border-radius: 6px;
    background-color: white;
    border: 1px solid #eee;
    color: #d85c35;
    font-weight: bold;
}

.cb-calendar-day:hover {
    border-color: #d85c35;
    background-color: #fdf2ef;
}

.cb-calendar-day.disabled {
    color: #ccc;
    border-color: transparent;
    background-color: transparent;
    cursor: not-allowed;
    font-weight: normal;
}

.cb-calendar-day span.dot {
    display: block;
    width: 4px;
    height: 4px;
    background-color: #d85c35;
    border-radius: 50%;
    margin: 2px auto 0;
}

/* TIME SLOTS */
.cb-time-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cb-time-slot {
    padding: 10px 0;
    text-align: center;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #555;
}

.cb-time-slot:hover {
    border-color: #d85c35;
    color: #d85c35;
}

/* FORM STYLES */
.cb-form-group {
    margin-bottom: 15px;
}

.cb-form-group label {
    display: block;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #555;
}

.cb-form-input {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}

.cb-form-input:focus {
    border-color: #d85c35;
}

.cb-form-submit {
    width: 100%;
    padding: 14px;
    background-color: #d85c35;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 5px;
}

.cb-form-submit:hover {
    background-color: #bf4a26;
}

/* Summary Info */
.cb-summary-box {
    background: white;
    border: 1px dashed #d85c35;
    border-radius: 8px;
    padding: 15px;
    font-size: 13px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 15px;
}

#cb-input-area {
    padding: 15px;
    background-color: white;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

#cb-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
}

#cb-send-btn {
    background-color: #d85c35;
    color: white;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

#cb-send-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Utilities */
.cb-hidden {
    display: none !important;
}

#cb-minimized-btn {
    position: relative;
    background: #d85c35;
    color: white;
    border: 3px solid white;
    border-radius: 50px;
    padding: 15px 40px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2), 0 5px 0 #b04322;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-family: sans-serif;
    transition: transform 0.1s, box-shadow 0.1s;
    user-select: none;
    z-index: 9999;
    margin: 20px;
}

#cb-minimized-btn:active {
    transform: translateY(4px);
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.2), 0 1px 0 #b04322;
}

.cb-min-top {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.cb-min-main {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 15px;
}

.cb-min-icon {
    font-size: 22px;
    line-height: 1;
    font-weight: 400;
}

#cb-minimized-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.4) 50%,
            rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    animation: cb-glass-shine 3s infinite;
}

@keyframes cb-glass-shine {
    0% {
        left: -150%;
    }

    20% {
        left: 200%;
    }

    100% {
        left: 200%;
    }
}

.cb-booking-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.cb-booking-slots .cb-time-slot {
    flex: 1 1 120px;
    font: inherit;
}

.cb-booking-slots .cb-time-slot:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.cb-form-submit:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.cb-branch-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cb-month-days {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.cb-month-label,
.cb-month-cell {
    flex: 0 0 calc((100% - 24px) / 7);
    min-width: 0;
    text-align: center;
    box-sizing: border-box;
}

.cb-month-label {
    font-size: 12px;
    padding: 4px 0;
}

button.cb-month-cell {
    min-height: 40px;
    border: 1px solid #d85c35;
    background: white;
    color: #9b3b1e;
    border-radius: 6px;
    cursor: pointer;
    font: inherit;
}

button.cb-month-cell:disabled {
    color: #767676;
    background: #eee;
    border-color: #ddd;
    cursor: not-allowed;
}

button.cb-month-cell:focus-visible,
.cb-time-slot:focus-visible {
    outline: 3px solid #793c1b;
    outline-offset: 1px;
}

.cb-calendar-status,
.cb-submit-status {
    font-size: 13px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.cb-cal-nav:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.cb-booking-slots .cb-time-slot {
    flex-basis: 130px;
    min-height: 44px;
}

.cb-summary-box,
.cb-msg {
    overflow-wrap: anywhere;
}

#cb-messages {
    min-height: 0;
    overscroll-behavior: contain;
}

#cb-input {
    min-width: 0;
}

#cb-header-wrapper,
#cb-input-area {
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .cb-form-input {
        font-size: 16px;
    }

    .cb-header-main {
        padding: 10px;
        gap: 8px;
    }

    .cb-header-actions {
        gap: 10px;
    }
}

@media (max-height: 520px) {

    .cb-header-top,
    .cb-header-progress {
        display: none;
    }

    .cb-header-main {
        padding: 6px 10px;
    }

    #cb-input-area {
        padding: 8px;
    }
}

.cb-privacy { padding: 5px 12px 8px; font-size: 10px; color: #59514c; }
.cb-privacy a { color: #793c1b; text-decoration: underline; }
