/* Guided booking steps inside the chat widget. Must fit a 320px-wide phone
   without horizontal scrolling: every block shrinks, nothing has a fixed width. */
.gb-host {
    margin: 0 20px 16px;
    max-width: 100%;
    min-width: 0;
}
@media (max-width: 900px) {
    .gb-host { margin: 0 8px 14px; }
}
.gb-card {
    box-sizing: border-box;
    width: 100%;
    max-width: 420px;
    min-width: 0;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
    color: #1f2937;
    font-size: 14px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}
.gb-card *, .gb-card *::before, .gb-card *::after { box-sizing: border-box; }
.gb-card--done { opacity: 0.6; }
.gb-card--done .gb-footer { display: none; }
.gb-title { font-weight: 600; font-size: 15px; margin-bottom: 10px; }
.gb-note { margin: 8px 0 0; color: #4b5563; font-size: 13px; }
.gb-error { color: #b91c1c; }
.gb-error:empty { display: none; }
.gb-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.gb-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 12px; }

.gb-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; padding: 8px 14px; border-radius: 10px;
    border: 1px solid #d1d5db; background: #fff; color: #111827;
    font: inherit; font-weight: 500; cursor: pointer; text-decoration: none;
    max-width: 100%;
}
.gb-btn--primary { background: var(--gb-accent, #2563eb); border-color: transparent; color: var(--gb-accent-text, #fff); }
.gb-btn:disabled { cursor: default; opacity: 0.55; }
.gb-btn:focus-visible, .gb-service:focus-visible, .gb-day:focus-visible, .gb-nav:focus-visible, .gb-link:focus-visible {
    outline: 2px solid var(--gb-accent, #2563eb); outline-offset: 2px;
}
.gb-link {
    background: none; border: 0; padding: 6px 0; min-height: 32px;
    color: var(--gb-link, #1f2937); font: inherit; font-size: 13px;
    text-decoration: underline; cursor: pointer;
}
.gb-link:disabled { color: #9ca3af; cursor: default; }
.gb-selected { outline: 2px solid var(--gb-accent, #2563eb); outline-offset: -2px; }

.gb-services { display: flex; flex-direction: column; gap: 10px; }
.gb-service {
    display: flex; gap: 10px; align-items: stretch; width: 100%; min-width: 0;
    padding: 8px; border-radius: 12px; border: 1px solid #e5e7eb; background: #fff;
    text-align: left; font: inherit; color: inherit; cursor: pointer;
}
.gb-service:disabled { cursor: default; }
.gb-service-img { width: 76px; height: 76px; flex: 0 0 76px; object-fit: cover; border-radius: 8px; }
.gb-service-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.gb-service-name { font-weight: 600; }
.gb-service-meta { font-size: 13px; color: #374151; }
.gb-service-desc {
    font-size: 12px; color: #6b7280;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.gb-month { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.gb-month-label { font-weight: 600; text-transform: capitalize; }
.gb-nav {
    width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%;
    border: 1px solid #d1d5db; background: #fff; font: inherit; font-size: 18px; cursor: pointer;
}
.gb-nav:disabled { opacity: 0.4; cursor: default; }
.gb-calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.gb-weekday { text-align: center; font-size: 11px; color: #6b7280; padding-bottom: 2px; }
.gb-day {
    min-width: 0; height: 38px; border-radius: 8px; border: 1px solid #c7d2fe;
    background: #eef2ff; color: #1e3a8a; font: inherit; font-weight: 600; cursor: pointer; padding: 0;
}
.gb-day--closed { background: transparent; border-color: transparent; color: #9ca3af; font-weight: 400; text-decoration: line-through; }
.gb-day--blank { visibility: hidden; }

.gb-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.gb-counter { display: flex; align-items: center; justify-content: center; gap: 18px; }
.gb-count { font-size: 22px; font-weight: 600; min-width: 2ch; text-align: center; }

.gb-summary { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin: 0; }
.gb-summary dt { color: #6b7280; }
.gb-summary dd { margin: 0; font-weight: 500; }

.gb-form { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.gb-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #374151; }
.gb-field input, .gb-field textarea {
    width: 100%; min-width: 0; padding: 10px; border-radius: 8px; border: 1px solid #d1d5db;
    font: inherit; font-size: 16px; /* 16px stops iOS zooming into the field */
}
.gb-field textarea { min-height: 64px; resize: vertical; }

/* The widget page clears every background inside its body with
   `.chat-widget-body * { background-color: transparent !important }`;
   the booking steps need theirs back. */
.chat-messages .gb-card { background-color: rgba(255, 255, 255, 0.92) !important; }
.chat-messages .gb-btn, .chat-messages .gb-service, .chat-messages .gb-nav,
.chat-messages .gb-field input, .chat-messages .gb-field textarea { background-color: #fff !important; }
.chat-messages .gb-btn--primary { background-color: var(--gb-accent, #2563eb) !important; }
.chat-messages .gb-day { background-color: #eef2ff !important; }
.chat-messages .gb-day--closed, .chat-messages .gb-day--blank { background-color: transparent !important; }

/* In-chat payment (built-in bookings, test mode until released). Stripe
   renders its own fields in frames; these boxes only give them room. */
.gb-due { color: #111827 !important; font-weight: 600; font-size: 14px; }
.gb-test {
    display: inline-block; padding: 2px 8px; border-radius: 999px;
    background: #fef3c7 !important; color: #92400e !important; font-size: 12px;
}
.gb-express { margin-top: 12px; min-width: 0; }
.gb-express:empty { display: none; }
.gb-payment-element {
    margin-top: 12px; min-width: 0; min-height: 40px; padding: 10px;
    border-radius: 10px; background: #ffffff !important; border: 1px solid #e5e7eb;
}
