/* ============================================================
   Handyman Booking – Frontend  v2.0
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

.hb-app {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    color: #222;
    background: #f5f7fb;
    min-height: 100vh;
}

/* ── Screens ────────────────────────────────────────────── */
.hb-screen { display: none; }
.hb-screen--active { display: block; }
.hb-screen--two-col {
    display: none;
    grid-template-columns: 1fr 360px;
    gap: 28px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 20px 60px;
    align-items: start;
}
.hb-screen--two-col.hb-screen--active { display: grid; }

/* ── Hero ───────────────────────────────────────────────── */
.hb-hero {
    text-align: center;
    padding: 60px 20px 40px;
}
.hb-hero__title {
    font-size: clamp(1.7rem, 4vw, 2.5rem);
    font-weight: 800;
    color: #1a2742;
    margin-bottom: 10px;
    line-height: 1.2;
}
.hb-hero__sub { font-size: 1.05rem; color: #777; }

/* ── Search ─────────────────────────────────────────────── */
.hb-search-wrap { max-width: 620px; margin: 0 auto 40px; padding: 0 20px; }
.hb-search-box { position: relative; }

.hb-search-input {
    width: 100%;
    padding: 16px 44px 16px 48px;
    border: 1.5px solid #dde3f0;
    border-radius: 10px;
    font-size: 1rem;
    background: #fff;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    color: #222;
}
.hb-search-input:focus { border-color: #2271b1; box-shadow: 0 0 0 3px rgba(34,113,177,.1); }
.hb-search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #aaa; pointer-events: none; }
.hb-search-clear { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); background: none; border: none; color: #aaa; cursor: pointer; font-size: 1rem; }

/* Dropdown */
.hb-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: #fff;
    border: 1px solid #dde3f0;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,.12);
    z-index: 200;
    max-height: 340px;
    overflow-y: auto;
}
.hb-dropdown-category {
    padding: 10px 18px 4px;
    font-weight: 700;
    font-size: 0.88rem;
    color: #1a2742;
    border-bottom: 1px solid #f0f2f8;
}
.hb-dropdown-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    cursor: pointer;
    transition: background .15s;
    border-bottom: 1px solid #f5f6fb;
}
.hb-dropdown-item:hover { background: #f0f4ff; }
.hb-dropdown-item-icon {
    width: 36px; height: 36px;
    background: #f0f2f8;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 1.2rem;
}
.hb-dropdown-item-name { font-weight: 600; font-size: 0.95rem; }
.hb-dropdown-item-cat  { font-size: 0.8rem; color: #888; }

/* ── Popular Chips ──────────────────────────────────────── */
.hb-popular { text-align: center; padding: 0 20px 50px; }
.hb-popular__label { font-size: 0.85rem; color: #999; margin-bottom: 16px; }
.hb-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.hb-chip {
    padding: 10px 22px;
    border: 1.5px solid #dde3f0;
    border-radius: 50px;
    background: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all .2s;
    color: #333;
}
.hb-chip:hover { border-color: #2271b1; color: #2271b1; background: #f0f4ff; }

/* ── Postcode Screen ────────────────────────────────────── */
.hb-center-screen { text-align: center; max-width: 600px; margin: 0 auto; padding: 70px 20px; }
.hb-screen__title { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 800; color: #1a2742; margin-bottom: 32px; }
.hb-postcode-row { display: flex; gap: 12px; justify-content: center; margin-bottom: 14px; }
.hb-postcode-input-wrap {
    position: relative;
    flex: 1; max-width: 320px;
}
.hb-postcode-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); }
.hb-postcode-field {
    width: 100%; padding: 14px 14px 14px 42px;
    border: 1.5px solid #dde3f0; border-radius: 10px;
    font-size: 1rem; outline: none;
    transition: border-color .2s;
}
.hb-postcode-field:focus { border-color: #2271b1; }
.hb-postcode-hint { font-size: 0.88rem; color: #888; }
.hb-postcode-error { color: #c0392b; font-size: 0.9rem; margin-top: 8px; }

/* ── Panel (steps inside two-col) ───────────────────────── */
.hb-panel { background: #fff; border-radius: 12px; padding: 32px; margin-bottom: 20px; }
.hb-panel__title { font-size: 1.25rem; font-weight: 800; color: #1a2742; margin-bottom: 24px; line-height: 1.35; }
.hb-panel__sub { color: #777; font-size: 0.92rem; margin-bottom: 20px; line-height: 1.5; }
.hb-highlight { color: #e91e8c; }
.hb-panel__footer { margin-top: 28px; display: flex; gap: 12px; }

/* ── Radio List ─────────────────────────────────────────── */
.hb-radio-list { display: flex; flex-direction: column; }
.hb-radio-item {
    display: flex; align-items: flex-start; gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid #f0f2f8;
    cursor: pointer;
}
.hb-radio-item:last-child { border-bottom: none; }
.hb-radio-item input[type="radio"] { margin-top: 3px; accent-color: #2271b1; width: 18px; height: 18px; cursor: pointer; flex-shrink: 0; }
.hb-radio-item-content { flex: 1; }
.hb-radio-item-name { font-weight: 600; }
.hb-radio-item-desc { font-size: 0.85rem; color: #888; margin-top: 2px; }

/* ── Room Counters ──────────────────────────────────────── */
.hb-room-counters { margin-top: 20px; }
.hb-room-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid #f0f2f8;
}
.hb-room-row:last-child { border-bottom: none; }
.hb-room-name { font-size: 0.95rem; color: #444; }
.hb-counter { display: flex; align-items: center; gap: 16px; }
.hb-counter-btn {
    width: 28px; height: 28px;
    background: none; border: none;
    color: #2271b1; font-size: 1.3rem; font-weight: 700;
    cursor: pointer; border-radius: 50%; line-height: 1;
    transition: background .15s;
}
.hb-counter-btn:hover { background: #f0f4ff; }
.hb-counter-btn:disabled { color: #ccc; cursor: not-allowed; }
.hb-counter-val { font-size: 0.95rem; font-weight: 600; min-width: 20px; text-align: center; }

/* ── Check List ─────────────────────────────────────────── */
.hb-check-list { display: flex; flex-direction: column; }
.hb-check-item {
    display: flex; align-items: flex-start; gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid #f0f2f8;
    cursor: pointer;
}
.hb-check-item:last-child { border-bottom: none; }
.hb-check-item input[type="checkbox"] { margin-top: 3px; accent-color: #2271b1; width: 18px; height: 18px; cursor: pointer; flex-shrink: 0; }
.hb-check-icon {
    width: 40px; height: 40px; background: #f5f7fb;
    border-radius: 8px; display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 1.3rem;
}
.hb-check-content { flex: 1; }
.hb-check-name { font-weight: 600; }
.hb-check-desc { font-size: 0.82rem; color: #888; margin-top: 3px; line-height: 1.4; }
.hb-check-warning .hb-check-desc { color: #c0392b; }
.hb-check-price { font-weight: 600; font-size: 0.9rem; color: #333; margin-left: auto; flex-shrink: 0; }

/* ── Upsell ─────────────────────────────────────────────── */
.hb-upsell-search-wrap { position: relative; margin-bottom: 16px; }
.hb-upsell-suggestions {
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border: 1px solid #dde3f0; border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
    z-index: 100;
}
.hb-upsell-option {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f5f6fb;
    font-size: 0.92rem;
    transition: background .15s;
}
.hb-upsell-option:hover { background: #f0f4ff; }

.hb-upsell-selected { display: flex; flex-direction: column; gap: 0; }
.hb-upsell-row {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 0; border-bottom: 1px solid #f0f2f8;
}
.hb-upsell-remove { background: none; border: none; color: #aaa; cursor: pointer; font-size: 1.1rem; }
.hb-upsell-name { flex: 1; }
.hb-upsell-name span { display: block; font-size: 0.8rem; color: #888; }

/* ── Date Strip ─────────────────────────────────────────── */
.hb-date-strip-header {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 16px;
}
.hb-date-month { font-weight: 700; font-size: 1rem; color: #1a2742; }
.hb-date-nav {
    background: none; border: 1px solid #dde3f0; border-radius: 6px;
    width: 32px; height: 32px; cursor: pointer; font-size: 1.2rem; color: #2271b1;
    display: flex; align-items: center; justify-content: center;
}
.hb-date-nav:hover { background: #f0f4ff; }

.hb-date-strip {
    display: flex; gap: 8px; overflow-x: auto;
    padding-bottom: 12px; margin-bottom: 24px;
    scrollbar-width: thin;
}
.hb-date-btn {
    display: flex; flex-direction: column; align-items: center;
    padding: 12px 14px; border: 1.5px solid #dde3f0; border-radius: 10px;
    background: #fff; cursor: pointer; min-width: 72px;
    transition: all .2s; flex-shrink: 0;
}
.hb-date-btn:hover:not(.hb-date-btn--unavailable) { border-color: #2271b1; }
.hb-date-btn.selected { background: #2271b1; border-color: #2271b1; color: #fff; }
.hb-date-btn.selected .hb-date-num { color: #fff; }
.hb-date-btn.selected .hb-date-price { color: #fff; }
.hb-date-btn--unavailable { opacity: .55; cursor: not-allowed; }
.hb-date-day { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; color: #888; }
.hb-date-num { font-size: 1.35rem; font-weight: 800; color: #1a2742; line-height: 1.2; }
.hb-date-price { font-size: 0.78rem; color: #2271b1; font-weight: 600; }
.hb-date-btn.selected .hb-date-day { color: rgba(255,255,255,.8); }

/* ── Time Slots ─────────────────────────────────────────── */
.hb-time-header {
    display: flex; justify-content: space-between;
    font-size: 0.85rem; color: #888; padding-bottom: 8px;
    border-bottom: 1px solid #f0f2f8; margin-bottom: 8px;
}
.hb-time-slots { display: flex; flex-direction: column; gap: 0; }
.hb-time-slot {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #f0f2f8;
    cursor: pointer; transition: background .15s;
    border-radius: 0;
}
.hb-time-slot:hover:not(.hb-time-slot--booked) { background: #f0f4ff; }
.hb-time-slot.selected { background: #2271b1; color: #fff; border-radius: 8px; }
.hb-time-slot.selected .hb-slot-price { color: #fff; }
.hb-time-slot--booked { cursor: not-allowed; }
.hb-slot-time { font-weight: 600; font-size: 0.95rem; }
.hb-slot-price { font-weight: 700; color: #1a2742; }
.hb-slot-booked { color: #bbb; font-size: 0.88rem; }

/* ── Crosssell Cards ────────────────────────────────────── */
.hb-crosssell-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-bottom: 8px; }
.hb-crosssell-card {
    background: #fff; border: 1.5px solid #dde3f0; border-radius: 12px;
    overflow: hidden; transition: border-color .2s;
}
.hb-crosssell-card:hover { border-color: #2271b1; }
.hb-crosssell-card-img { width: 100%; height: 110px; object-fit: cover; background: #e8ecf5; display: flex; align-items: center; justify-content: center; color: #aaa; font-size: 0.85rem; }
.hb-crosssell-card-img img { width: 100%; height: 110px; object-fit: cover; }
.hb-crosssell-card-body { padding: 12px; }
.hb-crosssell-card-name { font-weight: 700; font-size: 0.92rem; margin-bottom: 4px; }
.hb-crosssell-card-desc { font-size: 0.8rem; color: #888; margin-bottom: 8px; }
.hb-crosssell-card-price { font-weight: 700; margin-bottom: 10px; }
.hb-crosssell-card-actions { display: flex; gap: 8px; align-items: center; }
.hb-add-btn {
    padding: 7px 14px; border: 1.5px solid #2271b1;
    border-radius: 6px; background: #fff; color: #2271b1;
    font-weight: 700; font-size: 0.85rem; cursor: pointer;
    transition: all .2s;
}
.hb-add-btn:hover, .hb-add-btn.added { background: #2271b1; color: #fff; }
.hb-details-link { font-size: 0.82rem; color: #2271b1; text-decoration: none; }

/* ── Contact Form ───────────────────────────────────────── */
.hb-contact-section-label {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.88rem; font-weight: 600; color: #2271b1;
    margin: 20px 0 10px;
}
.hb-contact-section-label:first-child { margin-top: 0; }
.hb-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 4px; }
.hb-input {
    width: 100%; padding: 12px 14px;
    border: 1.5px solid #dde3f0; border-radius: 8px;
    font-size: 0.95rem; outline: none; background: #fff;
    transition: border-color .2s; color: #222;
}
.hb-input:focus { border-color: #2271b1; }
.hb-input--full { grid-column: 1 / -1; }
.hb-input--small { width: 160px; }
.hb-textarea { resize: vertical; min-height: 90px; }

.hb-phone-row { display: flex; border: 1.5px solid #dde3f0; border-radius: 8px; overflow: hidden; margin-bottom: 4px; }
.hb-phone-prefix { display: flex; align-items: center; gap: 6px; padding: 0 12px; background: #f8f9fb; border-right: 1px solid #dde3f0; font-size: 0.9rem; font-weight: 600; flex-shrink: 0; }
.hb-input--phone { border: none; border-radius: 0; flex: 1; }
.hb-input--phone:focus { box-shadow: none; }

.hb-postcode-display { position: relative; }
.hb-postcode-tick { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); }

.hb-notes-label { font-size: 0.9rem; font-weight: 600; color: #555; margin: 16px 0 8px; }

.hb-file-upload { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.hb-file-label {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 18px; border: 1.5px solid #dde3f0; border-radius: 8px;
    cursor: pointer; font-size: 0.88rem; font-weight: 600; background: #fff;
    transition: border-color .2s;
}
.hb-file-label:hover { border-color: #2271b1; color: #2271b1; }
.hb-file-hint { font-size: 0.78rem; color: #aaa; margin-top: 6px; }

/* ── Payment ─────────────────────────────────────────────── */
.hb-payment-notice {
    display: flex; align-items: center; gap: 10px;
    background: #d1ecf1; color: #0c5460;
    padding: 12px 16px; border-radius: 8px; font-size: 0.88rem;
    margin-bottom: 20px;
}
.hb-card-brands { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; font-size: 0.88rem; color: #555; flex-wrap: wrap; }
.hb-powered-stripe { font-size: 0.75rem; color: #888; }
.hb-stripe-input {
    border: 1.5px solid #dde3f0; border-radius: 8px; padding: 12px 14px;
    margin-bottom: 12px; background: #fff;
}
.hb-card-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hb-secure-badge { font-size: 1.3rem; margin-bottom: 16px; }
.hb-no-stripe { background: #fff8e1; border: 1px solid #ffe082; padding: 14px; border-radius: 8px; font-size: 0.9rem; }
.hb-terms-row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; font-size: 0.88rem; }
.hb-terms-row a { color: #2271b1; }
.hb-marketing-row { font-size: 0.88rem; margin-bottom: 20px; }
.hb-marketing-row label { margin-right: 16px; cursor: pointer; }
.hb-total-row { display: flex; justify-content: space-between; font-size: 1.2rem; font-weight: 700; margin-bottom: 6px; padding-top: 12px; border-top: 2px solid #f0f2f8; }
.hb-payment-note { font-size: 0.78rem; color: #888; text-align: center; margin-bottom: 16px; }

/* ── Buttons ─────────────────────────────────────────────── */
.hb-btn {
    padding: 13px 28px; border: none; border-radius: 8px;
    font-size: 0.95rem; font-weight: 700; cursor: pointer;
    transition: all .2s; display: inline-flex; align-items: center; gap: 8px;
}
.hb-btn--primary { background: #1c3b7a; color: #fff; }
.hb-btn--primary:hover { background: #162e60; }
.hb-btn--primary:disabled { opacity: .55; cursor: not-allowed; }
.hb-btn--outline { background: #fff; border: 2px solid #1c3b7a; color: #1c3b7a; }
.hb-btn--outline:hover { background: #f0f4ff; }
.hb-btn--ghost { background: none; color: #888; font-weight: 500; padding: 13px 16px; }
.hb-btn--ghost:hover { color: #333; }
.hb-btn--large { padding: 15px 40px; font-size: 1rem; width: 100%; justify-content: center; }
.hb-btn--sm { padding: 8px 14px; font-size: 0.85rem; }
.hb-spinner {
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff; border-radius: 50%;
    animation: hbSpin .7s linear infinite;
}
@keyframes hbSpin { to { transform: rotate(360deg); } }
.hb-error { background: #ffeef0; border: 1px solid #f5c6cb; color: #c0392b; padding: 12px 16px; border-radius: 8px; font-size: 0.9rem; margin-top: 12px; }

/* ── Sidebar ─────────────────────────────────────────────── */
.hb-sidebar { position: sticky; top: 24px; }
.hb-sidebar-card {
    background: #fff; border-radius: 12px;
    border: 1px solid #e8ecf5;
    margin-bottom: 12px; overflow: hidden;
}
.hb-sidebar-card--plain { padding: 0; }
.hb-sidebar-img-wrap { position: relative; height: 160px; background: #e8ecf5; }
.hb-sidebar-img-wrap img { width: 100%; height: 160px; object-fit: cover; }
.hb-sidebar-no-img { width: 100%; height: 160px; background: linear-gradient(135deg, #1c3b7a 0%, #2271b1 100%); }
.hb-guarantee-badge {
    position: absolute; top: 10px; right: 10px;
    background: linear-gradient(135deg, #e91e8c, #ff5722);
    color: #fff; font-size: 0.6rem; font-weight: 800; text-align: center;
    line-height: 1.3; padding: 6px 8px; border-radius: 50%;
    width: 56px; height: 56px; display: flex; align-items: center; justify-content: center;
    text-transform: uppercase;
}
.hb-sidebar-service-name { padding: 14px 16px 4px; font-weight: 800; font-size: 0.95rem; text-transform: uppercase; color: #1a2742; }
.hb-sidebar-row { display: flex; align-items: center; gap: 8px; padding: 4px 16px; font-size: 0.88rem; color: #666; }

.hb-sidebar-accordion-btn {
    width: 100%; display: flex; align-items: center; gap: 8px;
    padding: 12px 16px; background: none; border: none; border-top: 1px solid #f0f2f8;
    font-size: 0.88rem; font-weight: 600; cursor: pointer; color: #333; text-align: left;
}
.hb-accordion-toggle { margin-left: auto; font-size: 1.1rem; color: #888; }

.hb-sidebar-details { padding: 0 16px 12px; }
.hb-detail-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid #f5f6fb; font-size: 0.85rem; }
.hb-detail-row:last-child { border-bottom: none; }
.hb-detail-edit { color: #2271b1; font-size: 0.8rem; text-decoration: none; cursor: pointer; }

.hb-sidebar-promo { padding: 12px 16px; border-top: 1px solid #f0f2f8; }
.hb-promo-btn { background: none; border: none; color: #2271b1; font-size: 0.88rem; cursor: pointer; font-weight: 600; }
.hb-promo-row { display: flex; gap: 8px; margin-top: 10px; }

.hb-sidebar-price { padding: 12px 16px 16px; border-top: 1px solid #f0f2f8; }
.hb-price-row { display: flex; justify-content: space-between; font-size: 0.9rem; margin-bottom: 6px; }
.hb-price-row--total { font-weight: 800; font-size: 1rem; padding-top: 6px; border-top: 1px solid #f0f2f8; }

.hb-about-content { padding: 10px 16px 14px; font-size: 0.83rem; color: #555; line-height: 1.6; border-top: 1px solid #f0f2f8; }
.hb-about-content ul { padding-left: 16px; }
.hb-about-content li { margin-bottom: 4px; }

.hb-sidebar-cancel { padding: 10px 16px; display: flex; align-items: center; gap: 8px; font-size: 0.85rem; }
.hb-sidebar-cancel a { color: #2271b1; }

/* ── Success ─────────────────────────────────────────────── */
.hb-success { text-align: center; max-width: 500px; margin: 0 auto; padding: 80px 20px; }
.hb-success__icon {
    width: 72px; height: 72px; border-radius: 50%;
    background: #1c3b7a; color: #fff; font-size: 2.2rem;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
}
.hb-success__title { font-size: 2rem; font-weight: 800; color: #1a2742; margin-bottom: 16px; }
.hb-success p { color: #666; margin-bottom: 10px; }
.hb-success a { color: #2271b1; font-weight: 600; }

/* ── Back nav ────────────────────────────────────────────── */
.hb-back-nav { margin-bottom: 16px; }
.hb-back-nav button { background: none; border: none; color: #888; cursor: pointer; font-size: 0.9rem; }
.hb-back-nav button:hover { color: #1c3b7a; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 800px) {
    .hb-screen--two-col { grid-template-columns: 1fr; }
    .hb-sidebar { position: static; order: -1; }
    .hb-fields { grid-template-columns: 1fr; }
    .hb-fields .hb-input--full { grid-column: 1; }
}
@media (max-width: 480px) {
    .hb-postcode-row { flex-direction: column; align-items: center; }
    .hb-crosssell-cards { grid-template-columns: 1fr 1fr; }
}
