@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap');

.flavor-booking-widget {
    --bk-primary: #8B7356; --bk-primary-dark: #6B5B43; --bk-sidebar: #6B5B43;
    --bk-bg: #FFFFFF; --bk-surface: #FFFFFF;
    --bk-text: #1E1E1E; --bk-text2: #6B7280; --bk-border: #E5E7EB;
    --bk-error: #DC2626; --bk-success: #16A34A; --bk-radius: 12px;
    --bk-heading: 'DM Sans',sans-serif; --bk-body: 'DM Sans',sans-serif;
    font-family: var(--bk-body) !important; background: var(--bk-bg) !important; color: var(--bk-text) !important;
    width: 100%; max-width: 820px; margin: 0 auto; border-radius: 16px; overflow: hidden;
    border: 1px solid var(--bk-border); line-height: 1.6; font-size: 15px;
    box-sizing: border-box; -webkit-font-smoothing: antialiased;
    display: flex; min-height: 540px; box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}
.flavor-booking-widget *,.flavor-booking-widget *::before,.flavor-booking-widget *::after { box-sizing: border-box; margin: 0; padding: 0; }
.flavor-booking-widget h1,.flavor-booking-widget h2,.flavor-booking-widget h3,.flavor-booking-widget p,.flavor-booking-widget a { font-family: inherit !important; line-height: inherit !important; color: inherit !important; text-decoration: none; }

/* ═══ Sidebar ═══ */
.flb-sidebar { width: 260px; min-width: 260px; background: var(--bk-sidebar); color: #fff; display: flex; flex-direction: column; }
.flb-sidebar-steps { flex: 1; padding: 18px 14px; display: flex; flex-direction: column; gap: 6px; }
.flb-sidebar-item { padding: 12px 14px; border-radius: 10px; transition: all 0.2s; cursor: default; }
.flb-sidebar-item.active { background: rgba(255,255,255,0.18); }
.flb-sidebar-item.done { background: rgba(255,255,255,0.1); cursor: pointer; }
.flb-sidebar-item.done:hover { background: rgba(255,255,255,0.2); }
.flb-sidebar-head { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; opacity: 0.55; }
.flb-sidebar-item.active .flb-sidebar-head,.flb-sidebar-item.done .flb-sidebar-head { opacity: 1; }
.flb-sidebar-icon { width: 20px; text-align: center; font-size: 13px; flex-shrink: 0; }
.flb-sidebar-dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.25); display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; margin-left: auto; flex-shrink: 0; }
.flb-sidebar-item.active .flb-sidebar-dot { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.4); }
.flb-sidebar-item.done .flb-sidebar-dot { background: var(--bk-success); border-color: var(--bk-success); }
.flb-sidebar-detail { font-size: 11px; opacity: 0.65; margin-top: 3px; padding-left: 28px; line-height: 1.4; }
.flb-sidebar-footer { padding: 12px 14px; border-top: 1px solid rgba(255,255,255,0.08); font-size: 11px; opacity: 0.4; }

/* ═══ Content ═══ */
.flb-content { flex: 1; padding: 32px 36px; display: flex; flex-direction: column; min-width: 0; background: var(--bk-bg); overflow-y: auto; }
.flb-content-inner { flex: 1; animation: flbFade 0.3s ease; }
@keyframes flbFade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.flb-content-footer { padding-top: 20px; display: flex; justify-content: flex-end; gap: 10px; margin-top: auto; }

/* ═══ Typography ═══ */
.flb-step-title { font-family: var(--bk-heading) !important; font-size: 1.3em !important; font-weight: 700 !important; margin: 0 0 2px !important; }
.flb-step-sub { color: var(--bk-text2) !important; font-size: 0.85em !important; margin: 0 0 24px !important; }
.flb-field-label { font-size: 0.82em; font-weight: 500; color: var(--bk-text2); margin: 0 0 6px; }
.flb-req { color: var(--bk-error); margin-right: 2px; }

/* ═══ Custom Dropdown ═══ */
.flb-dropdown { position: relative; margin-bottom: 18px; }
.flb-dropdown-trigger { padding: 11px 16px; border: 1.5px solid var(--bk-border); border-radius: var(--bk-radius); background: var(--bk-surface); cursor: pointer; display: flex; align-items: center; justify-content: space-between; transition: border-color 0.2s; font-size: 0.92em; }
.flb-dropdown-trigger:hover { border-color: var(--bk-primary); }
.flb-dropdown-panel { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 100; background: var(--bk-surface); border: 1.5px solid var(--bk-border); border-radius: var(--bk-radius); box-shadow: 0 8px 32px rgba(0,0,0,0.12); overflow: hidden; }
.flb-drop-split { display: flex; min-height: 180px; max-height: 280px; }
.flb-drop-cats { width: 42%; border-right: 1px solid var(--bk-border); background: color-mix(in srgb, var(--bk-primary) 4%, var(--bk-surface)); overflow-y: auto; padding: 6px; }
.flb-drop-cat { padding: 10px 12px; border-radius: 8px; cursor: pointer; font-size: 0.88em; font-weight: 500; transition: background 0.15s; display: flex; justify-content: space-between; align-items: center; }
.flb-drop-cat:hover { background: color-mix(in srgb, var(--bk-primary) 10%, transparent); }
.flb-drop-cat.active { background: color-mix(in srgb, var(--bk-primary) 14%, transparent); color: var(--bk-primary); font-weight: 600; }
.flb-drop-cnt { font-size: 0.8em; opacity: 0.5; }
.flb-drop-services { flex: 1; overflow-y: auto; padding: 6px; }
.flb-drop-svc { padding: 10px 12px; border-radius: 8px; cursor: pointer; font-size: 0.88em; display: flex; justify-content: space-between; align-items: center; transition: background 0.15s; }
.flb-drop-svc:hover { background: color-mix(in srgb, var(--bk-primary) 8%, transparent); }
.flb-drop-svc.selected { background: color-mix(in srgb, var(--bk-primary) 12%, transparent); font-weight: 600; color: var(--bk-primary); }
.flb-drop-price { font-weight: 600; font-size: 0.85em; color: var(--bk-primary); }

/* ═══ Select ═══ */
.flb-select { width: 100%; padding: 11px 16px; border: 1.5px solid var(--bk-border); border-radius: var(--bk-radius); background: var(--bk-surface); color: var(--bk-text); font-family: var(--bk-body) !important; font-size: 0.92em; appearance: none; background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7280' fill='none' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; cursor: pointer; transition: border-color 0.2s; margin-bottom: 18px; }
.flb-select:focus { outline: none; border-color: var(--bk-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bk-primary) 10%, transparent); }
.flb-select-sm { width: auto; padding: 8px 32px 8px 12px; font-size: 0.82em; margin-bottom: 0; }

/* ═══ Calendar ═══ */
.flb-cal-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.flb-cal-selects { display: flex; gap: 8px; margin-bottom: 16px; }
.flb-btn-icon { width: 36px; height: 36px; border: 1.5px solid var(--bk-border); border-radius: 8px; background: var(--bk-surface); cursor: pointer; font-size: 18px; display: flex; align-items: center; justify-content: center; transition: all 0.15s; color: var(--bk-text); }
.flb-btn-icon:hover { border-color: var(--bk-primary); color: var(--bk-primary); }

.flb-cal-grid { margin-bottom: 16px; }
.flb-cal-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.flb-cal-wday { text-align: center; font-size: 0.72em; font-weight: 600; color: var(--bk-text2); padding: 4px 0 8px; text-transform: uppercase; letter-spacing: 0.5px; }

.flb-cal-day { position: relative; text-align: center; padding: 10px 4px 14px; border-radius: 8px; font-size: 0.88em; font-weight: 500; cursor: pointer; transition: all 0.15s; border: 1.5px solid transparent; background: color-mix(in srgb, var(--bk-primary) 4%, var(--bk-surface)); color: var(--bk-text); }
.flb-cal-day:hover:not(.disabled):not(.other) { border-color: var(--bk-primary); transform: translateY(-1px); }
.flb-cal-day.selected { background: var(--bk-primary) !important; color: #fff !important; border-color: var(--bk-primary); transform: translateY(-1px); box-shadow: 0 4px 12px color-mix(in srgb, var(--bk-primary) 35%, transparent); }
.flb-cal-day.selected .flb-cal-fill { background: rgba(255,255,255,0.5) !important; }
.flb-cal-day.disabled { opacity: 0.3; cursor: default; background: transparent; }
.flb-cal-day.other { opacity: 0.2; cursor: default; background: transparent; }
.flb-cal-day.weekend:not(.selected):not(.disabled) { color: var(--bk-text2); }

/* Capacity levels */
.flb-cal-day.lvl-high { background: color-mix(in srgb, var(--bk-success) 8%, var(--bk-surface)); }
.flb-cal-day.lvl-medium { background: color-mix(in srgb, #F59E0B 8%, var(--bk-surface)); }
.flb-cal-day.lvl-low { background: color-mix(in srgb, var(--bk-error) 6%, var(--bk-surface)); }
.flb-cal-day.lvl-full { background: color-mix(in srgb, var(--bk-error) 4%, var(--bk-surface)); opacity: 0.4; cursor: default; }

/* Capacity bar */
.flb-cal-bar { position: absolute; bottom: 3px; left: 20%; right: 20%; height: 3px; background: rgba(0,0,0,0.06); border-radius: 2px; overflow: hidden; }
.flb-cal-fill { height: 100%; border-radius: 2px; transition: width 0.3s; }
.flb-cal-day.lvl-high .flb-cal-fill { background: var(--bk-success); }
.flb-cal-day.lvl-medium .flb-cal-fill { background: #F59E0B; }
.flb-cal-day.lvl-low .flb-cal-fill { background: var(--bk-error); }

/* Legend */
.flb-cal-legend { display: flex; gap: 14px; margin-bottom: 20px; }
.flb-legend-item { display: flex; align-items: center; gap: 5px; font-size: 0.72em; color: var(--bk-text2); }
.flb-legend-dot { width: 10px; height: 10px; border-radius: 3px; }
.flb-legend-dot.lvl-high { background: color-mix(in srgb, var(--bk-success) 25%, var(--bk-surface)); border: 1px solid var(--bk-success); }
.flb-legend-dot.lvl-medium { background: color-mix(in srgb, #F59E0B 25%, var(--bk-surface)); border: 1px solid #F59E0B; }
.flb-legend-dot.lvl-low { background: color-mix(in srgb, var(--bk-error) 20%, var(--bk-surface)); border: 1px solid var(--bk-error); }

/* ═══ Time grid ═══ */
.flb-time-label { font-size: 0.82em; color: var(--bk-text2); margin: 4px 0 10px; font-weight: 600; }
.flb-time-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.flb-time-chip { padding: 10px; border-radius: 8px; border: 1.5px solid var(--bk-border); cursor: pointer; font-size: 0.88em; font-weight: 500; text-align: center; transition: all 0.15s; background: var(--bk-surface); }
.flb-time-chip:hover { border-color: var(--bk-primary); }
.flb-time-chip.selected { background: var(--bk-primary); border-color: var(--bk-primary); color: #fff; }

/* ═══ Buttons ═══ */
.flb-btn { padding: 11px 26px; border: none; cursor: pointer; font-family: var(--bk-heading) !important; font-weight: 600; font-size: 0.88em; transition: all 0.2s; display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--bk-primary); color: #fff; border-radius: 10px; line-height: 1; }
.flb-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.flb-btn:not(:disabled):hover { filter: brightness(1.08); transform: translateY(-1px); }
.flb-btn-sec { background: transparent !important; border: 1.5px solid var(--bk-border) !important; color: var(--bk-text2) !important; }
.flb-btn-sec:not(:disabled):hover { border-color: var(--bk-primary) !important; color: var(--bk-primary) !important; }

/* ═══ Inputs ═══ */
.flb-input { width: 100%; padding: 11px 16px; border-radius: var(--bk-radius); border: 1.5px solid var(--bk-border); background: var(--bk-surface); color: var(--bk-text); font-size: 0.9em; font-family: var(--bk-body) !important; outline: none; transition: border-color 0.2s; margin-bottom: 10px; }
.flb-input:focus { border-color: var(--bk-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bk-primary) 10%, transparent); }
.flb-input::placeholder { color: var(--bk-text2); }

/* ═══ Summary ═══ */
.flb-summary-card { background: var(--bk-surface); border: 1.5px solid var(--bk-border); border-radius: var(--bk-radius); padding: 18px; margin-bottom: 16px; }
.flb-summary-row { display: flex; justify-content: space-between; padding: 9px 0; font-size: 0.88em; align-items: center; }
.flb-summary-label { color: var(--bk-text2); }
.flb-summary-value { font-weight: 600; }
.flb-summary-divider { height: 1px; background: var(--bk-border); }
.flb-price { color: var(--bk-primary); font-size: 1.05em; }

/* ═══ Confirm ═══ */
.flb-confirm-check { width: 68px; height: 68px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; font-size: 30px; background: color-mix(in srgb, var(--bk-success) 12%, transparent); color: var(--bk-success); animation: flbPop 0.4s cubic-bezier(0.34,1.56,0.64,1); }
@keyframes flbPop { 0% { transform: scale(0); } 100% { transform: scale(1); } }
.flb-confirm-title { font-family: var(--bk-heading) !important; font-size: 1.3em !important; font-weight: 700 !important; text-align: center; margin-bottom: 4px !important; }
.flb-confirm-sub { color: var(--bk-text2); font-size: 0.85em; text-align: center; margin-bottom: 18px !important; }
.flb-confirm-code { font-weight: 700; font-family: monospace; letter-spacing: 1px; color: var(--bk-primary); }

/* ═══ Misc ═══ */
.flb-empty-state { padding: 36px 16px; text-align: center; color: var(--bk-text2); font-size: 0.88em; border: 2px dashed var(--bk-border); border-radius: var(--bk-radius); }
.flb-error { background: color-mix(in srgb, var(--bk-error) 8%, transparent); color: var(--bk-error); padding: 10px 14px; border-radius: 8px; font-size: 0.82em; margin-bottom: 10px; font-weight: 500; }
.flb-gdpr { font-size: 0.72em; color: var(--bk-text2); margin-top: 6px; line-height: 1.5; }
.flb-gdpr label { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.flb-gdpr input { margin-top: 3px; flex-shrink: 0; }
.flb-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 80px 20px; color: var(--bk-text2); font-size: 14px; width: 100%; }
.flb-spinner { width: 22px; height: 22px; border: 3px solid var(--bk-border); border-top-color: var(--bk-primary); border-radius: 50%; animation: flbSpin 0.6s linear infinite; }
@keyframes flbSpin { to { transform: rotate(360deg); } }

/* ═══ Responsive ═══ */
@media (max-width: 640px) {
    .flavor-booking-widget { flex-direction: column; min-height: auto; }
    .flb-sidebar { width: 100%; min-width: 100%; flex-direction: row; overflow-x: auto; }
    .flb-sidebar-steps { flex-direction: row; padding: 10px; gap: 4px; }
    .flb-sidebar-item { padding: 8px 12px; white-space: nowrap; }
    .flb-sidebar-detail,.flb-sidebar-footer { display: none; }
    .flb-content { padding: 20px 16px; }
    .flb-time-grid { grid-template-columns: repeat(3, 1fr); }
    .flb-drop-split { flex-direction: column; }
    .flb-drop-cats { width: 100%; border-right: none; border-bottom: 1px solid var(--bk-border); }
}

.flb-block-wrapper { width: 100%; }
.flb-block-wrapper--left { display: flex; justify-content: flex-start; }
.flb-block-wrapper--center { display: flex; justify-content: center; }
.flb-block-wrapper--right { display: flex; justify-content: flex-end; }
