/* =========================
   WIDGET BASE
========================= */

.ab-widget {
    font-family: Inter, Arial, sans-serif;
    color: #0f172a;
    width: 100%;
    max-width: 430px;
    margin: 28px auto !important;
    display: block;
}

.ab-widget * {
    box-sizing: border-box;
}
.ab-widget input,
.ab-widget select,
.ab-widget textarea {
    font-size: 16px !important; /* prevents iOS auto-zoom on focus */
}

/* =========================
   CARD
========================= */

.ab-card {
    background: #ffffff;
    border: 1px solid #e8edf3;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
    padding: 20px;
}

/* =========================
   TOP BAR
========================= */

.ab-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 18px;
}

.ab-kicker {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.ab-top h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
}

.ab-pill {
    background: #fff8dd;
    border: 1px solid #f1de97;
    color: #7a6200;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 12px;
}

/* =========================
   STEP SECTIONS
========================= */

.ab-step {
    margin-bottom: 16px;
}

.ab-step-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 10px;
}

.ab-hidden {
    display: none !important;
}

/* =========================
   INPUTS
========================= */

.ab-input,
.ab-date-input {
    width: 100%;
    height: 48px;
    border: 1px solid #d9e2ec;
    border-radius: 14px;
    padding: 0 14px;
    font-size: 14px;
    font-family: inherit;
    color: #0f172a;
    background: #fff;
    transition: border-color 0.15s;
}

.ab-input:focus,
.ab-date-input:focus {
    outline: none;
    border-color: #7aa7ff;
    box-shadow: 0 0 0 3px rgba(122, 167, 255, 0.15);
}

.ab-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* =========================
   TIME CHIPS
========================= */

.ab-time-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ab-time-chip {
    border: 1px solid #d9e2ec;
    background: #ffffff;
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.ab-time-chip:hover:not(:disabled) {
    border-color: #7aa7ff;
    background: #f0f5ff;
}

.ab-time-chip.is-active {
    background: #20395d;
    color: #fff;
    border-color: #20395d;
}

.ab-time-chip.is-full,
.ab-time-chip:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* No slots available message */
.ab-no-slots-msg {
    margin-top: 14px;
    font-size: 13px;
    font-weight: 500;
    padding: 12px 14px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    line-height: 1.5;
}

/* Availability notices */
.ab-capacity-notice {
    margin-top: 10px;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid transparent;
}

.ab-capacity-notice.is-full {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

.ab-capacity-notice.is-warning {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #c2410c;
}

/* =========================
   GUEST ROW
========================= */

.ab-guest-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.ab-guest-row + .ab-guest-row {
    border-top: 1px solid #eef2f7;
}

.ab-guest-copy strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
}

.ab-guest-copy span {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
    display: block;
}

/* Spots / min-guests notices */
.ab-spots-notice,
.ab-min-notice {
    font-size: 12px;
    color: #64748b;
    margin-top: 8px;
    padding: 6px 10px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

#ab-spots-text {
    font-weight: 600;
}

/* =========================
   STEPPER
========================= */

.ab-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 132px;
    height: 40px;
    padding: 4px;
    background: #f8fafc;
    border: 1px solid #dfe7f0;
    border-radius: 999px;
}

.ab-widget .ab-stepper-btn {
    all: unset;
    position: relative;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #f4c84d;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s;
    touch-action: manipulation;
}

.ab-widget .ab-stepper-btn:hover {
    background: #dfb42f;
}

.ab-widget .ab-stepper-btn.minus::before {
    content: "";
    position: absolute;
    width: 12px;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.ab-widget .ab-stepper-btn.plus::before {
    content: "";
    position: absolute;
    width: 12px;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.ab-widget .ab-stepper-btn.plus::after {
    content: "";
    position: absolute;
    width: 2px;
    height: 12px;
    background: #ffffff;
    border-radius: 2px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#ab-adults-count,
#ab-children-count {
    flex: 1;
    text-align: center;
    font-weight: 800;
    font-size: 16px;
}

/* =========================
   SUMMARY
========================= */

.ab-summary {
    border: 1px solid #e7edf4;
    border-radius: 18px;
    padding: 16px;
    margin-top: 10px;
}

.ab-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 14px;
}

.ab-summary-row + .ab-summary-row {
    border-top: 1px solid #f1f5f9;
}

.ab-summary-row.is-strong {
    font-weight: 700;
}

.ab-summary-row.is-strong strong {
    color: #20395d;
    font-size: 16px;
}

.ab-policy {
    font-size: 12px;
    color: #64748b;
    margin: 12px 0;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 10px;
    line-height: 1.5;
}

/* =========================
   CTA BUTTON
========================= */

.ab-cta {
    width: 100%;
    height: 52px;
    margin-top: 14px;
    border-radius: 16px;
    background: linear-gradient(180deg, #f8c83c, #f4b400);
    color: #1a1a1a;
    font-weight: 800;
    font-size: 15px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.15s, transform 0.1s;
    box-shadow: 0 4px 14px rgba(244, 180, 0, 0.35);
}

.ab-cta:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.ab-cta:active {
    transform: translateY(0);
}

/* =========================
   LOADER
========================= */

.ab-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
    font-size: 14px;
    color: #64748b;
    font-weight: 600;
}

.ab-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-top-color: #f4b400;
    border-radius: 50%;
    animation: ab-spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes ab-spin {
    to { transform: rotate(360deg); }
}

/* =========================
   ERROR
========================= */

.ab-error {
    margin-top: 12px;
    padding: 10px 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    color: #dc2626;
    font-size: 13px;
    font-weight: 600;
    display: none;
}

/* =========================
   SUCCESS STATE
========================= */

.ab-success {
    text-align: center;
    padding: 32px 20px;
}

.ab-success-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    margin: 0 auto 16px;
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.3);
}

.ab-success h3 {
    margin: 0 0 8px;
    font-size: 20px;
    color: #0f172a;
}

.ab-success p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

/* =========================
   COUPON
========================= */

.ab-coupon-wrap {
    margin-bottom: 14px;
}

.ab-coupon-row {
    display: flex;
    gap: 8px;
}

.ab-coupon-input {
    flex: 1;
    height: 44px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.ab-coupon-btn {
    flex-shrink: 0;
    height: 44px;
    padding: 0 18px;
    background: #f1f5f9;
    border: 1px solid #d9e2ec;
    border-radius: 14px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
}

.ab-coupon-btn:hover { background: #e2e8f0; }
.ab-coupon-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.ab-coupon-msg {
    margin-top: 7px;
    font-size: 13px;
    font-weight: 600;
}

.ab-coupon-msg--success { color: #16a34a; }
.ab-coupon-msg--error   { color: #dc2626; }

/* =========================
   PAYMENT CHOICE
========================= */

.ab-payment-choice {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 14px 0;
}

.ab-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 10px 14px;
    border: 1px solid #d9e2ec;
    border-radius: 12px;
    transition: border-color 0.15s, background 0.15s;
}

.ab-radio-label:has(input:checked) {
    border-color: #20395d;
    background: #f0f5ff;
}

.ab-radio-label input { accent-color: #20395d; }

/* =========================
   GROUP DISCOUNT
========================= */

.ab-group-notice {
    margin-top: 10px;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 12px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    color: #166534;
}

/* =========================
   NOTES TEXTAREA
========================= */

.ab-textarea {
    height: auto !important;
    padding: 12px 14px !important;
    resize: vertical;
    min-height: 80px;
}

/* =========================
   WAITLIST
========================= */

.ab-waitlist-header {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 6px;
}

.ab-waitlist-copy {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 14px;
}

.ab-cta-secondary {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    box-shadow: none !important;
    border: 1px solid #d9e2ec !important;
    margin-top: 10px;
}

.ab-cta-secondary:hover { background: #e2e8f0 !important; }

.ab-waitlist-msg {
    margin-top: 10px;
    font-size: 13px;
    font-weight: 600;
    display: none;
}

.ab-waitlist-success {
    color: #16a34a;
    display: block;
}

/* =========================
   DISCOUNT ROW
========================= */

.ab-discount-row strong {
    color: #16a34a !important;
}

/* =========================================
   Mobile overflow fix
   ========================================= */

.ab-widget {
    max-width: min(430px, 100%) !important;
    width: 100% !important;
}

@media (max-width: 480px) {
    .ab-widget {
        margin: 16px 0 !important;
    }
    .ab-card {
        border-radius: 16px !important;
    }
}

/* =========================================
   Custom inline calendar
   ========================================= */

.ab-cal-wrap { width: 100%; margin-top: 8px; }

.ab-cal {
    background: #ffffff;
    border: 1px solid #e8edf3;
    border-radius: 16px;
    overflow: hidden;
    width: 100%;
}

.ab-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 10px;
    border-bottom: 1px solid #f1f5f9;
}

.ab-cal-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    font-family: inherit;
}

.ab-cal-nav {
    all: unset;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #475569;
    transition: background .15s;
}

.ab-cal-nav:hover:not(:disabled) { background: #e2e8f0; }
.ab-cal-nav:disabled { opacity: 0.35; cursor: not-allowed; }

.ab-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    padding: 10px 12px 4px;
}

.ab-cal-wd {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 4px 0;
}

.ab-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    padding: 4px 12px 14px;
}

.ab-cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: default;
    transition: background .12s, color .12s;
    color: #0f172a;
    min-height: 36px;
    font-family: inherit;
}

.ab-cal-empty   { background: none; }
.ab-cal-disabled { color: #cbd5e1; }
.ab-cal-available { cursor: pointer; }
.ab-cal-available:hover { background: #e8f4fb; color: #1a7fa8; }
.ab-cal-today { border: 2px solid #3aadd4; color: #1a7fa8; font-weight: 700; }
.ab-cal-selected { background: #20395d !important; color: #fff !important; font-weight: 700 !important; }
.ab-cal-selected.ab-cal-today { border-color: #20395d !important; }

@media (max-width: 480px) {
    .ab-cal-day { min-height: 40px; font-size: 15px; border-radius: 8px; }
    .ab-cal-title { font-size: 16px; }
    .ab-cal-nav { width: 38px; height: 38px; }
    .ab-cal-days { gap: 3px; padding: 4px 8px 14px; }
    .ab-cal-weekdays { padding: 10px 8px 4px; }
}

/* =========================================
   Fix calendar columns being cut off on mobile
   Root cause: card padding + calendar padding
   eating into grid width, clipping last column
   ========================================= */

.ab-widget,
.ab-widget * {
    box-sizing: border-box !important;
}

.ab-widget {
    overflow: hidden !important;
}

.ab-cal {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

.ab-cal-days {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: 1px !important;
    padding: 4px 8px 12px !important;
}

.ab-cal-weekdays {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    padding: 8px 8px 4px !important;
}

.ab-cal-day {
    aspect-ratio: 1 !important;
    min-height: unset !important;
    width: 100% !important;
    font-size: 13px !important;
    border-radius: 8px !important;
}

.ab-cal-wd {
    font-size: 10px !important;
    text-align: center !important;
}

/* Tighten card padding on small screens so calendar has more room */
@media (max-width: 420px) {
    .ab-card {
        padding: 14px !important;
        border-radius: 18px !important;
    }
    .ab-cal-header {
        padding: 10px 12px 8px !important;
    }
    .ab-cal-title {
        font-size: 14px !important;
    }
    .ab-cal-nav {
        width: 30px !important;
        height: 30px !important;
    }
}

/* ── Duration selector ────────────────────────────────────────────────────── */

.ab-duration-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.ab-duration-chip {
    border: 1px solid #d9e2ec;
    background: #ffffff;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: #1e2d3d;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.ab-duration-chip:hover {
    border-color: #7aa7ff;
    background: #f0f5ff;
}

.ab-duration-chip.is-active {
    background: #20395d;
    color: #fff;
    border-color: #20395d;
}

.ab-duration-note {
    font-size: .85rem;
    color: #5a7080;
    margin-top: 8px;
    min-height: 1.2em;
}

/* Hour picker — same chip style but shows full range */
.ab-time-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
