/* ============================================================
   Mobule Web Chat — v2.5.11
   CSS variables scoped to #oc-chat-root to prevent theme bleed.
   Key colours use !important on background/color/border only.
   display/flex/position properties do NOT use !important so JS
   can override them (show/hide views, open/close widget).
   ============================================================ */

#oc-chat-root {
    isolation: isolate;
    position: relative;
    z-index: 2147483640;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}
/* Scoped reset — prevent theme font/box-sizing bleed, but NOT line-height or display */
#oc-chat-root * {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}
/* Prevent theme link/button styles bleeding in */
#oc-chat-root a      { text-decoration: none !important; }
#oc-chat-root button { -webkit-tap-highlight-color: transparent; }
#oc-chat-root input,
#oc-chat-root textarea,
#oc-chat-root select { -webkit-appearance: none; }

/* ── Launcher ── */
#oc-launcher {
    position: fixed !important;
    bottom: 24px;
    z-index: 2147483641 !important;
    width: 58px !important;
    height: 58px !important;
    border-radius: 50% !important;
    background: var(--oc-launcher-bg, var(--oc-brand, #0D7377)) !important;
    border: none !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .2s;
    padding: 0;
    margin: 0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.22) !important;
}
#oc-launcher:hover { transform: scale(1.08); }
#oc-launcher svg   { width: 26px; height: 26px; fill: var(--oc-header-text, #fff) !important; pointer-events: none; }

.oc-right-btn  { right: 24px; }
.oc-left-btn   { left: 24px; }
.oc-center-btn { left: 50%; transform: translateX(-50%); }

.oc-badge {
    position: absolute; top: -4px; right: -4px;
    background: #ef4444 !important; color: #fff !important;
    border-radius: 50%; width: 20px; height: 20px;
    font-size: 11px; font-weight: 700;
    display: none; align-items: center; justify-content: center;
    pointer-events: none;
}
.oc-badge-show { display: flex; }

/* ── Chat window ── */
#oc-window {
    position: fixed !important;
    bottom: 90px; z-index: 2147483640 !important;
    width: 420px; height: min(640px, calc(100vh - 110px));
    background: #fff !important;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18) !important;
    display: flex; flex-direction: column;
    opacity: 0; pointer-events: none;
    transform: scale(0.92) translateY(16px);
    transform-origin: bottom right;
    transition: opacity .22s ease, transform .22s ease;
    overflow: hidden; padding: 0; margin: 0;
}
#oc-window.oc-window-open {
    opacity: 1; pointer-events: all;
    transform: scale(1) translateY(0);
}
#oc-window.oc-left-win  { left: 24px; transform-origin: bottom left; }
#oc-window.oc-right-win { right: 24px; transform-origin: bottom right; }

/* ── Header ── */
.oc-header {
    background: var(--oc-header-bg, var(--oc-brand, #0D7377)) !important;
    padding: 14px 16px; display: flex; align-items: center;
    gap: 10px; flex-shrink: 0;
    border-radius: 16px 16px 0 0; margin: 0;
}
.oc-avatar {
    width: 36px; height: 36px; border-radius: 50% !important;
    background: rgba(255,255,255,0.25) !important;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 15px;
    color: var(--oc-header-text, #fff) !important; flex-shrink: 0;
}
.oc-bot-name    { color: var(--oc-header-text, #fff) !important; font-weight: 600; font-size: 14px; line-height: 1.3; }
.oc-status      { color: var(--oc-header-text, #fff) !important; font-size: 11px; opacity: 0.85; }
.oc-header-info { flex: 1; min-width: 0; }
.oc-close-btn {
    width: 32px; height: 32px; border-radius: 50% !important;
    background: rgba(255,255,255,0.2) !important; border: none !important;
    cursor: pointer; color: var(--oc-header-text, #fff) !important;
    font-size: 18px; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: background .15s; padding: 0;
}
.oc-close-btn:hover { background: rgba(255,255,255,0.35) !important; }

/* ── Language bar ── */
.oc-lang-bar {
    background: #f0fafa !important; border-bottom: 1px solid #e0f2f2 !important;
    padding: 6px 12px; display: flex; gap: 6px;
    align-items: center; flex-wrap: wrap; flex-shrink: 0;
}
.oc-lang-label { font-size: 11px; color: #888 !important; }
.oc-lang-btn {
    background: none !important; border: 1px solid #7ec8ca !important;
    border-radius: 20px; padding: 2px 10px; font-size: 11px; cursor: pointer;
    color: var(--oc-brand, #0D7377) !important; transition: all .15s;
}
.oc-lang-btn.active, .oc-lang-btn:hover {
    background: var(--oc-brand, #0D7377) !important;
    color: var(--oc-btn-text, #fff) !important;
    border-color: var(--oc-brand, #0D7377) !important;
}

/* ── Messages ── */
.oc-msgs {
    flex: 1; overflow-y: auto; overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 14px 14px 8px; display: flex; flex-direction: column;
    gap: 10px; min-height: 0; scroll-behavior: smooth;
    background: #fff !important;
}
.oc-msgs::-webkit-scrollbar       { width: 4px; }
.oc-msgs::-webkit-scrollbar-track { background: transparent; }
.oc-msgs::-webkit-scrollbar-thumb { background: var(--oc-brand, #0D7377) !important; border-radius: 4px; }

.oc-msg      { display: flex; gap: 8px; max-width: 90%; }
.oc-msg.user { align-self: flex-end; flex-direction: row-reverse; }
.oc-msg.bot  { align-self: flex-start; }

.oc-bubble {
    padding: 9px 13px; border-radius: 14px;
    font-size: 14px; line-height: 1.55;
    color: #222 !important; background: #f1f0f5 !important;
    white-space: pre-wrap; word-break: break-word; border: none !important;
}
/* Paragraph spacing within bot replies — renders \n\n as a visible gap */
.oc-bubble p.oc-para {
    margin: 8px 0 0 0;
    padding: 0;
    display: block;
}
.oc-bubble p.oc-para:first-child { margin-top: 0; }
.oc-msg.user .oc-bubble {
    background: var(--oc-user-bubble, var(--oc-brand, #0D7377)) !important;
    color: var(--oc-btn-text, #fff) !important;
    border-radius: 14px 14px 4px 14px;
}
.oc-msg.bot .oc-bubble { border-radius: 14px 14px 14px 4px; }
.oc-bubble a:not([style]) { color: var(--oc-brand, #0D7377) !important; text-decoration: underline !important; word-break: break-all; }
.oc-msg.user .oc-bubble a:not([style]) { color: rgba(255,255,255,0.9) !important; }

.oc-av {
    width: 26px; height: 26px; border-radius: 50% !important;
    background: var(--oc-brand, #0D7377) !important;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700;
    color: var(--oc-btn-text, #fff) !important; flex-shrink: 0; align-self: flex-end;
}
.oc-quote {
    padding: 10px 13px; border-radius: 12px; font-size: 12px; line-height: 1.6;
    background: #f0fafa !important; border: 1px solid #e0f2f2 !important;
    white-space: pre-wrap; max-height: 200px; overflow-y: auto;
    overscroll-behavior: contain; color: #333 !important;
}
.oc-dots { display: flex; gap: 4px; align-items: center; padding: 10px 14px; }
.oc-dots span {
    width: 7px; height: 7px; border-radius: 50%;
    background: #7ec8ca !important; animation: ocBounce 1.2s infinite; display: block;
}
.oc-dots span:nth-child(2) { animation-delay: .2s; }
.oc-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes ocBounce { 0%,60%,100%{transform:translateY(0)} 30%{transform:translateY(-5px)} }

/* ── Action buttons ── */
.oc-actions {
    padding: 8px 12px; display: flex; gap: 8px;
    border-top: 1px solid #f0f0f5 !important; flex-wrap: wrap; flex-shrink: 0;
    background: #fff !important;
}
.oc-act-btn {
    flex: 1; min-width: 110px; padding: 8px 10px;
    border-radius: 10px; border: 1.5px solid var(--oc-brand, #0D7377) !important;
    background: #fff !important; color: var(--oc-brand, #0D7377) !important;
    font-size: 12px; font-weight: 600; cursor: pointer; transition: all .15s;
}
.oc-act-btn:hover, .oc-act-btn.primary {
    background: var(--oc-brand, #0D7377) !important;
    color: var(--oc-btn-text, #fff) !important;
}

/* ── Input row ── */
.oc-input-row {
    padding: 10px 12px; border-top: 1px solid #f0f0f5 !important;
    display: flex; gap: 8px; align-items: flex-end; flex-shrink: 0;
    background: #fff !important;
}
.oc-input-row textarea {
    flex: 1; resize: none;
    border: 1.5px solid #e0ddf5 !important; border-radius: 10px;
    padding: 8px 12px; font-size: 14px;
    color: #222 !important; background: #fff !important;
    max-height: 80px; min-height: 38px; line-height: 1.4; transition: border .15s;
}
.oc-input-row textarea:focus { border-color: var(--oc-brand, #0D7377) !important; }
.oc-send {
    width: 38px; height: 38px; border-radius: 10px;
    background: var(--oc-brand, #0D7377) !important; border: none !important;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; padding: 0;
}
.oc-send:hover { opacity: .85; }
.oc-send svg { width: 18px; height: 18px; fill: var(--oc-btn-text, #fff) !important; pointer-events: none; }

/* ── View containers — NO !important on display so JS can toggle them ── */
#oc-view-chat { display: flex; flex-direction: column; flex: 1; min-height: 0; }
#oc-view-enq {
    display: none; flex-direction: column; flex: 1;
    overflow-y: auto; overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch; min-height: 0;
    background: #fff !important;
}
#oc-view-enq.active { display: flex; }

/* ── Enquiry form ── */
.oc-form {
    padding: 16px; display: flex; flex-direction: column; gap: 10px; flex: 1;
}
.oc-form-title { font-size: 15px; font-weight: 600; color: #333 !important; }
.oc-form-sub   { font-size: 12px; color: #888; margin-top: -4px; }

/* All form controls share the same shape */
.oc-form input,
.oc-form textarea,
.oc-form select {
    width: 100%; padding: 10px 12px;
    border: 1.5px solid #e0ddf5 !important; border-radius: 10px;
    font-size: 14px; color: #222 !important; background: #fff !important;
    line-height: 1.4; display: block; transition: border .15s;
}
.oc-form input:focus,
.oc-form textarea:focus,
.oc-form select:focus { border-color: var(--oc-brand, #0D7377) !important; outline: none; }
.oc-form input,
.oc-form select { min-height: 44px; }
.oc-form textarea {
    min-height: 76px; max-height: 140px; resize: vertical; line-height: 1.5;
}
.oc-enq-field-label { font-size: 12px; color: #666; margin-bottom: 2px; margin-top: 2px; }

.oc-form-submit {
    padding: 12px; border-radius: 10px;
    background: var(--oc-brand, #0D7377) !important;
    color: var(--oc-btn-text, #fff) !important; border: none !important;
    font-size: 14px; font-weight: 600; cursor: pointer; min-height: 46px;
    margin-top: auto; width: 100%;
}
.oc-form-submit:hover { opacity: .9; }
.oc-form-back {
    background: none !important; border: none !important; font-size: 12px;
    color: #888 !important; cursor: pointer; padding: 4px 0;
    text-align: center; width: 100%;
}
.oc-form-back:hover { color: var(--oc-brand, #0D7377) !important; }
.oc-err {
    font-size: 12px; color: #c00 !important; background: #fce8e6 !important;
    border-radius: 6px; padding: 8px 12px; display: none; border: none !important;
    font-weight: 500;
}

/* Children section */
/* ── Children travelling section ── */
/* ── Suppress ALL theme-injected pseudo-elements inside widget ── */
#oc-chat-root label::before,
#oc-chat-root label::after,
#oc-chat-root label *::before,
#oc-chat-root label *::after,
#oc-chat-root .oc-form label::before,
#oc-chat-root .oc-form label::after {
    display: none !important;
    content: '' !important;
    background: none !important;
    border: none !important;
    width: 0 !important;
    height: 0 !important;
    position: static !important;
    visibility: hidden !important;
    opacity: 0 !important;
}
#oc-children-section {
    border: 1.5px solid #e0ddf5 !important;
    border-radius: 10px !important;
    padding: 12px 14px !important;
    background: #fdfcff !important;
    margin-top: 2px;
}
#oc-children-section > label {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #333 !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.4 !important;
}
#oc-has-children {
    -webkit-appearance: checkbox !important;
    appearance: checkbox !important;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    border: 2px solid #7ec8ca !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    accent-color: var(--oc-brand, #0D7377) !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
}
#oc-child-details {
    margin-top: 14px !important;
    padding-top: 12px !important;
    border-top: 1px solid #e0f2f2 !important;
}
#oc-child-details > label {
    font-size: 12px !important;
    color: #666 !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.4px !important;
    display: block !important;
    margin-bottom: 8px !important;
}
/* +/- counter row */
#oc-child-details > div:first-of-type {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 14px !important;
}
#oc-child-minus, #oc-child-plus {
    width: 34px !important;
    height: 34px !important;
    border-radius: 50% !important;
    border: 1.5px solid var(--oc-brand, #0D7377) !important;
    background: #fff !important;
    color: var(--oc-brand, #0D7377) !important;
    font-size: 20px !important;
    font-weight: 400 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    transition: all .15s !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
}
#oc-child-minus:hover, #oc-child-plus:hover {
    background: var(--oc-brand, #0D7377) !important;
    color: #fff !important;
}
#oc-child-count {
    font-size: 16px !important;
    font-weight: 700 !important;
    min-width: 28px !important;
    text-align: center !important;
    color: #333 !important;
}
/* Individual child age rows */
#oc-child-ages > div {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 8px !important;
}
#oc-child-ages span:first-child {
    font-size: 13px !important;
    color: #555 !important;
    font-weight: 500 !important;
    min-width: 56px !important;
}
#oc-child-ages input[type="number"] {
    width: 80px !important;
    padding: 8px 10px !important;
    border: 1.5px solid #e0ddf5 !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #333 !important;
    background: #fff !important;
    text-align: center !important;
    -moz-appearance: textfield !important;
}
#oc-child-ages input[type="number"]:focus {
    border-color: var(--oc-brand, #0D7377) !important;
    outline: none !important;
}
#oc-child-ages input[type="number"]::-webkit-inner-spin-button,
#oc-child-ages input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none !important;
}
#oc-child-ages span:last-child {
    font-size: 13px !important;
    color: #888 !important;
}

/* ── Mobile ── */
@media (max-width: 520px) {
    #oc-window {
        position: fixed !important; top: 0; left: 0; right: 0; bottom: 0;
        width: 100%; height: 100%; max-height: 100%; border-radius: 0;
        transform: translateY(100%); transform-origin: bottom center;
        transition: opacity .25s ease, transform .25s ease;
    }
    #oc-window.oc-window-open { transform: translateY(0); opacity: 1; }
    .oc-header { border-radius: 0; padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top)); }
    .oc-close-btn  { width: 40px; height: 40px; font-size: 22px; }
    #oc-launcher   { bottom: max(16px, env(safe-area-inset-bottom)); }
    .oc-bubble             { font-size: 15px !important; }
    .oc-form input,
    .oc-form textarea      { font-size: 16px; }
    .oc-input-row textarea { font-size: 16px; }
}

/* Launcher hidden when chat open */
#oc-chat-root.oc-is-open #oc-launcher {
    display: none !important; visibility: hidden !important; pointer-events: none !important;
}
