/* =============================================
   WB Bookings — Frontend v2.2
   Brand: #ED194E  |  Mobile-first
   ============================================= */
:root {
    --brand: #ED194E;
    --brand-dk: #c4153f;
    --brand-lt: #fff5f7;
    --brand-ring: rgba(237, 25, 78, .18);
    --text: #1a1d2e;
    --muted: #6b7280;
    --border: #e5e7eb;
    --bg: #f9fafb;
    --radius: 10px;
}

.wbbm-form-wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 4px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
}

.wbbm-form-wrap * {
    box-sizing: border-box;
}

/* ---- Front-end modal ---- */
.wbbm-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .52);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s;
}

.wbbm-modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.wbbm-front-modal-box {
    background: #fff;
    border-radius: 16px;
    padding: 36px 28px;
    text-align: center;
    max-width: 360px;
    width: 100%;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .2);
    transform: scale(.94);
    transition: transform .22s;
}

.wbbm-modal-overlay.open .wbbm-front-modal-box {
    transform: scale(1);
}

.wbbm-front-modal-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.wbbm-front-modal-icon.success {
    background: #d1fae5;
    color: #065f46;
}

.wbbm-front-modal-icon.error {
    background: #fee2e2;
    color: #991b1b;
}

#wbbm-modal-msg {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 6px;
}

#wbbm-modal-sub {
    font-size: 13px;
    color: var(--muted);
    margin: 0 0 18px;
    line-height: 1.5;
}

.wbbm-front-modal-close {
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 26px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}

.wbbm-front-modal-close:hover {
    background: var(--brand-dk);
}

/* ---- Step indicators ---- */
.wbbm-steps {
    display: flex;
    align-items: center;
    margin-bottom: 28px;
    overflow-x: auto;
    /* allow scroll on tiny screens */
    scrollbar-width: none;
}

.wbbm-steps::-webkit-scrollbar {
    display: none;
}

.wbbm-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.wbbm-step-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    transition: all .18s;
}

.wbbm-step-label {
    font-size: 10px;
    color: var(--muted);
    white-space: nowrap;
    font-weight: 500;
}

.wbbm-step.active .wbbm-step-circle {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.wbbm-step.active .wbbm-step-label {
    color: var(--brand);
    font-weight: 600;
}

.wbbm-step.done .wbbm-step-circle::after {
    content: '✓';
    font-size: 13px;
    color: var(--brand);
}

.wbbm-step.done .wbbm-step-circle {
    background: var(--brand-lt);
    border-color: var(--brand);
}

.wbbm-step.done .wbbm-step-circle span {
    display: none;
}

.wbbm-step-connector {
    flex: 1;
    height: 2px;
    background: var(--border);
    margin-bottom: 18px;
    min-width: 16px;
    transition: background .2s;
}

.wbbm-step-connector.done {
    background: var(--brand);
}

/* ---- Panels ---- */
.wbbm-step-panel {
    display: none;
}

.wbbm-step-panel.active {
    display: block;
}

.wbbm-panel-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 18px;
}

/* ---- Category select ---- */
.wbbm-input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.wbbm-input-group label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: .4px;
}

.wbbm-req {
    color: var(--brand);
}

/* ---- Service cards ---- */
.wbbm-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.wbbm-service-card {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    cursor: pointer;
    transition: all .15s;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: #fff;
}

.wbbm-service-card:hover {
    border-color: var(--brand);
    box-shadow: 0 3px 10px var(--brand-ring);
}

.wbbm-service-card.selected {
    border-color: var(--brand);
    background: var(--brand-lt);
}

.wbbm-service-accent {
    width: 4px;
    border-radius: 2px;
    min-height: 44px;
    flex-shrink: 0;
}

.wbbm-service-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.wbbm-service-meta {
    display: flex;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--brand);
}

/* Duration badge — no "min" label */
.wbbm-service-dur {
    font-size: 11px;
    color: var(--muted);
    font-weight: 400;
}

.wbbm-service-desc {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
    line-height: 1.5;
}

.wbbm-service-time {
    font-size: 12px;
    color: var(--brand);
    font-weight: 600;
    margin-top: 2px;
}

/* ---- Calendar + slots layout ---- */
.wbbm-datetime-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 16px;
    align-items: start;
}

/* Mobile: stack calendar above slots */
@media (max-width: 580px) {
    .wbbm-datetime-wrap {
        grid-template-columns: 1fr;
    }
}

.wbbm-calendar-picker {
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
}

.wbbm-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: var(--brand);
    color: #fff;
}

.wbbm-cal-month-label {
    font-weight: 600;
    font-size: 14px;
}

.wbbm-cal-nav {
    background: rgba(255, 255, 255, .2);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    font-size: 17px;
    cursor: pointer;
    transition: background .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wbbm-cal-nav:hover {
    background: rgba(255, 255, 255, .35);
}

.wbbm-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #fde8ed;
    padding: 4px 6px 0;
}

.wbbm-cal-weekdays span {
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    color: var(--brand);
    text-transform: uppercase;
    padding: 4px 0;
}

.wbbm-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    padding: 6px;
}

.wbbm-cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all .12s;
    color: var(--text);
    border: 2px solid transparent;
    min-width: 0;
}

.wbbm-cal-day:hover:not(.disabled):not(.empty) {
    background: var(--brand-lt);
    color: var(--brand);
}

.wbbm-cal-day.today {
    font-weight: 700;
    color: var(--brand);
}

.wbbm-cal-day.selected {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

.wbbm-cal-day.disabled {
    color: #d1d5db;
    cursor: not-allowed;
}

.wbbm-cal-day.empty {
    cursor: default;
}

/* ---- Time slots ---- */
.wbbm-slots-panel {
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    padding: 14px;
    display: flex;
    flex-direction: column;
}

.wbbm-slots-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    color: #d1d5db;
    text-align: center;
}

.wbbm-slots-placeholder p {
    font-size: 12px;
    margin: 7px 0 0;
}

.wbbm-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
    gap: 7px;
    max-height: 260px;
    overflow-y: auto;
}

.wbbm-slot {
    padding: 9px 4px;
    border: 1.5px solid var(--border);
    border-radius: 9px;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all .12s;
    color: var(--text);
}

.wbbm-slot:hover {
    border-color: var(--brand);
    color: var(--brand);
    background: var(--brand-lt);
}

.wbbm-slot.selected {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.wbbm-slots-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.wbbm-no-slots {
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    padding: 16px 0;
}

.wbbm-slots-loading {
    text-align: center;
    padding: 24px;
    color: var(--muted);
    font-size: 12px;
}

/* ---- Details form ---- */
.wbbm-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

@media (max-width: 480px) {
    .wbbm-details-grid {
        grid-template-columns: 1fr;
    }
}

.wbbm-full {
    grid-column: 1 / -1;
}

.wbbm-input.wbbm-input,
.wbbm-textarea {
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 12px;
    font-size: 14px;
    color: var(--text);
    outline: none;
    transition: border .15s;
    width: 100%;
    font-family: inherit;
}

.wbbm-input:focus,
.wbbm-textarea:focus {
    border-color: var(--brand);
}

.wbbm-textarea {
    min-height: 76px;
    resize: vertical;
}

/* ---- Summary ---- */
.wbbm-summary-card {
    background: var(--brand-lt);
    border: 1.5px solid #fecdd3;
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 16px;
}

.wbbm-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 13px;
    color: var(--text);
    border-bottom: 1px solid #fecdd3;
}

.wbbm-summary-row:last-child {
    border: none;
}

.wbbm-summary-total {
    font-weight: 700;
    font-size: 15px;
}

.wbbm-summary-total strong {
    color: var(--brand);
}

/* ---- Payment methods ---- */
.wbbm-payment-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 8px;
    color: var(--text);
}

.wbbm-payment-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.wbbm-pay-option {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
    cursor: pointer;
    transition: all .15s;
    position: relative;
}

.wbbm-pay-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.wbbm-pay-option.selected {
    border-color: var(--brand);
    background: var(--brand-lt);
}

.wbbm-pay-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.wbbm-pay-info {
    flex: 1;
    min-width: 0;
}

.wbbm-pay-info strong {
    display: block;
    font-size: 14px;
    color: var(--text);
}

.wbbm-pay-info small {
    font-size: 11px;
    color: var(--muted);
}

.wbbm-pay-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity .15s;
}

.wbbm-pay-option.selected .wbbm-pay-check {
    opacity: 1;
}

/* ---- Navigation buttons ---- */
.wbbm-step-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    gap: 10px;
    /* Always stay in the current step panel */
    position: relative;
}

.wbbm-nav-btn {
    padding: 11px 24px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all .15s;
    font-family: inherit;
    flex-shrink: 0;
}

.wbbm-nav-back {
    background: transparent;
    color: var(--muted);
    border: 1.5px solid var(--border);
}

.wbbm-nav-back:hover {
    background: var(--brand-lt);
    border-color: var(--brand);
    color: var(--brand);
}

.wbbm-nav-next {
    background: var(--brand);
    color: #fff;
    margin-left: auto;
}

.wbbm-nav-next:hover:not(:disabled) {
    background: var(--brand-dk);
}

.wbbm-nav-next:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
}

.wbbm-nav-submit {
    background: var(--brand);
    color: #fff;
}

.wbbm-nav-submit:hover:not(:disabled) {
    background: var(--brand-dk);
}

.wbbm-nav-submit:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
}

/* ---- Confirmation billing summary ---- */
.wbbm-confirm-billing {
    margin: 18px auto 0;
    text-align: left;
}

.wbbm-billing-card {
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.wbbm-billing-title {
    background: var(--brand);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
    padding: 9px 14px;
}

.wbbm-billing-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.wbbm-billing-row:last-child {
    border-bottom: none;
}

.wbbm-billing-row span {
    color: var(--muted);
}

.wbbm-billing-row strong {
    color: var(--text);
    text-align: right;
    max-width: 60%;
}

.wbbm-billing-total {
    background: var(--brand-lt);
}

.wbbm-billing-total span {
    font-weight: 700;
    color: var(--text);
}

.wbbm-billing-total strong {
    color: var(--brand);
    font-size: 15px;
}

.wbbm-confirmation {
    text-align: center;
    padding: 36px 16px;
}

.wbbm-confirm-icon {
    width: 68px;
    height: 68px;
    background: #d1fae5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: #065f46;
    margin: 0 auto 18px;
}

.wbbm-confirmation h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 6px;
}

.wbbm-confirmation p {
    font-size: 14px;
    color: var(--muted);
}

/* ---- Bank instructions ---- */
.wbbm-bank-box {
    background: var(--bg);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px;
    text-align: left;
    margin-top: 18px;
}

.wbbm-bank-box h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    margin: 0 0 12px;
}

.wbbm-bank-ref-box {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
}

.wbbm-bank-amount {
    font-weight: 700;
    color: var(--brand);
    font-size: 15px;
}

.wbbm-bank-note {
    background: #ed2d4e0f;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 12px;
    color: #713f12;
    margin-bottom: 12px;
}

.wbbm-bank-account {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    padding: 12px;
    margin-bottom: 8px;
}

.wbbm-bank-account-name {
    font-weight: 700;
    font-size: 13px;
    color: #0f172a;
    margin-bottom: 8px;
}

.wbbm-bank-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
}

@media (max-width: 480px) {
    .wbbm-bank-fields {
        grid-template-columns: 1fr;
    }
}

.wbbm-bank-field span:first-child {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #64748b;
}

.wbbm-bank-field strong {
    font-size: 13px;
    color: #0f172a;
}

.wbbm-bank-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #64748b;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}

/* Loading */
.wbbm-loading {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: wbbm-spin .5s linear infinite;
    margin-right: 6px;
    vertical-align: middle;
}

@keyframes wbbm-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================================
   RESPONSIVE — mobile
   ============================================================ */
@media (max-width: 520px) {
    .wbbm-form-wrap {
        padding: 0;
    }

    .wbbm-panel-title {
        font-size: 16px;
    }

    .wbbm-steps {
        gap: 0;
    }

    .wbbm-step-connector {
        min-width: 10px;
    }

    .wbbm-step-circle {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .wbbm-services-grid {
        grid-template-columns: 1fr;
    }

    /* Nav buttons: full width, stacked */
    .wbbm-step-nav {
        flex-wrap: wrap;
    }

    .wbbm-nav-back,
    .wbbm-nav-next,
    .wbbm-nav-submit {
        flex: 1;
        min-width: 120px;
        text-align: center;
        justify-content: center;
    }

    .wbbm-nav-next {
        margin-left: 0;
    }

    /* Summary responsive */
    .wbbm-summary-row {
        font-size: 12px;
    }
}

@media (max-width: 360px) {
    .wbbm-cal-day {
        font-size: 11px;
    }

    .wbbm-cal-weekdays span {
        font-size: 9px;
    }
}

/* =============================================
   WBB Services List — [wbbm_services] shortcode
   ============================================= */
.wbbm-services-list {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.wbbm-sl-cat-title {
    font-size: 17px;
    font-weight: 700;
    color: #1a1d2e;
    margin: 28px 0 14px;
    padding-left: 10px;
    border-left: 3px solid var(--brand, #ED194E);
}

.wbbm-services-empty {
    color: #9ca3af;
    font-size: 14px;
}

/* Grid — 1/2/3/4 col variants */
.wbbm-sl-grid {
    display: grid;
    gap: 16px;
}

.wbbm-sl-cols-1 {
    grid-template-columns: 1fr;
}

.wbbm-sl-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.wbbm-sl-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.wbbm-sl-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {
    .wbbm-sl-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {

    .wbbm-sl-cols-3,
    .wbbm-sl-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {

    .wbbm-sl-cols-2,
    .wbbm-sl-cols-3,
    .wbbm-sl-cols-4 {
        grid-template-columns: 1fr;
    }
}

/* Card */
.wbbm-sl-card {
    display: flex;
    gap: 0;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    transition: box-shadow .15s, transform .15s;
}

.wbbm-sl-card:hover {
    box-shadow: 0 4px 16px rgba(237, 25, 78, .12);
    transform: translateY(-2px);
}

.wbbm-sl-accent {
    width: 5px;
    flex-shrink: 0;
}

.wbbm-sl-body {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.wbbm-sl-name {
    font-size: 15px;
    font-weight: 700;
    color: #1a1d2e;
    line-height: 1.3;
}

.wbbm-sl-time {
    font-size: 12px;
    font-weight: 600;
    color: #ED194E;
}

.wbbm-sl-desc {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.55;
    flex: 1;
}

.wbbm-sl-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
}

.wbbm-sl-price {
    font-size: 16px;
    font-weight: 700;
    color: #ED194E;
    white-space: nowrap;
}

.wbbm-sl-btn {
    display: inline-flex;
    align-items: center;
    background: #ED194E;
    color: #fff;
    padding: 7px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s;
    white-space: nowrap;
}

.wbbm-sl-btn:hover {
    background: #c4153f;
    color: #fff;
}