/* HookBook v1.2.1 — Public Form Styles */
.hb-form-wrap {
    --hb-brand: #2563eb;
    --hb-radius: 10px;
    --hb-gap: 14px;
    --hb-bg: #fff;
    --hb-border: #e5e7eb;
    --hb-text: #1f2937;
    --hb-muted: #6b7280;
    max-width: 580px;
    margin: 0 auto;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--hb-text);
    line-height: 1.5;
}

/* ── Progress ──────────────────────────────────────── */
.hb-progress { display: flex; justify-content: space-between; margin-bottom: 24px; position: relative; }
.hb-progress::before { content: ''; position: absolute; top: 15px; left: 24px; right: 24px; height: 2px; background: var(--hb-border); z-index: 0; }
.hb-step-indicator { display: flex; flex-direction: column; align-items: center; gap: 5px; position: relative; z-index: 1; flex: 1; }
.hb-step-dot { width: 30px; height: 30px; border-radius: 50%; background: #f3f4f6; color: var(--hb-muted); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; transition: all 0.3s; border: 2px solid var(--hb-border); }
.hb-step-indicator.active .hb-step-dot, .hb-step-indicator.completed .hb-step-dot { background: var(--hb-brand); color: #fff; border-color: var(--hb-brand); }
.hb-step-label { font-size: 11px; color: var(--hb-muted); text-align: center; font-weight: 600; }
.hb-step-indicator.active .hb-step-label { color: var(--hb-brand); font-weight: 700; }

/* ── Sections ──────────────────────────────────────── */
.hb-form-section { display: none; animation: hbFadeIn 0.25s ease; }
.hb-form-section.active { display: block; }
@keyframes hbFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── Fields ────────────────────────────────────────── */
.hb-field { margin-bottom: var(--hb-gap); }
.hb-field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 5px; color: var(--hb-text); }
.hb-field input, .hb-field select, .hb-field textarea {
    width: 100%; padding: 10px 12px; border: 1.5px solid var(--hb-border); border-radius: var(--hb-radius);
    font-size: 14px; font-family: inherit; transition: border-color 0.2s, box-shadow 0.2s; box-sizing: border-box; background: var(--hb-bg);
}
.hb-field input:focus, .hb-field select:focus, .hb-field textarea:focus { outline: none; border-color: var(--hb-brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--hb-brand) 12%, transparent); }
.hb-field textarea { resize: vertical; min-height: 70px; }
.hb-field .hb-error { color: #dc2626; font-size: 12px; margin-top: 3px; font-weight: 500; }

/* intl-tel-input — prevent overlap */
.iti { width: 100% !important; display: block !important; }
.iti input { width: 100% !important; box-sizing: border-box !important; }
.iti--separate-dial-code .iti__selected-dial-code { font-size: 13px; }
.iti--separate-dial-code input,
.iti--show-flags input { padding-left: 90px !important; }
.iti__country-container { pointer-events: auto; }

/* ── Type selector ─────────────────────────────────── */
.hb-type-selector { display: flex; gap: 10px; margin-bottom: var(--hb-gap); }
.hb-type-btn { flex: 1; padding: 16px 12px; border: 2px solid var(--hb-border); border-radius: var(--hb-radius); background: var(--hb-bg); cursor: pointer; text-align: center; font-weight: 700; font-size: 14px; transition: all 0.2s; }
.hb-type-btn:hover { border-color: var(--hb-brand); }
.hb-type-btn.active { border-color: var(--hb-brand); background: color-mix(in srgb, var(--hb-brand) 6%, white); color: var(--hb-brand); }

/* ── Service cards ─────────────────────────────────── */
.hb-services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-bottom: var(--hb-gap); }
.hb-service-card { border: 2px solid var(--hb-border); border-radius: var(--hb-radius); padding: 14px; cursor: pointer; transition: all 0.2s; background: var(--hb-bg); }
.hb-service-card:hover { border-color: var(--hb-brand); box-shadow: 0 2px 8px color-mix(in srgb, var(--hb-brand) 10%, transparent); }
.hb-service-card.selected { border-color: var(--hb-brand); background: color-mix(in srgb, var(--hb-brand) 5%, white); }
.hb-service-card .name { font-weight: 700; font-size: 15px; margin-bottom: 2px; }
.hb-service-card .price { color: var(--hb-brand); font-weight: 800; font-size: 18px; }
.hb-service-card .duration { color: var(--hb-muted); font-size: 12px; }

/* ── Calendar ──────────────────────────────────────── */
.hb-calendar-wrap { margin-bottom: var(--hb-gap); }
.hb-cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.hb-cal-title { font-weight: 700; font-size: 15px; }
.hb-cal-nav { background: none; border: 1.5px solid var(--hb-border); border-radius: 8px; width: 34px; height: 34px; cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; transition: all 0.2s; font-family: inherit; }
.hb-cal-nav:hover { border-color: var(--hb-brand); color: var(--hb-brand); }
.hb-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.hb-cal-dow { text-align: center; font-size: 11px; font-weight: 700; color: var(--hb-muted); padding: 6px 0; text-transform: uppercase; letter-spacing: 0.5px; }
.hb-cal-day { text-align: center; padding: 9px 2px; border-radius: 8px; font-size: 13px; font-weight: 500; transition: all 0.15s; }
.hb-cal-day.empty { pointer-events: none; }
.hb-cal-day.disabled { color: #d1d5db; cursor: not-allowed; }
.hb-cal-day.available { cursor: pointer; color: var(--hb-text); background: color-mix(in srgb, var(--hb-brand) 8%, white); font-weight: 600; }
.hb-cal-day.available:hover { background: color-mix(in srgb, var(--hb-brand) 18%, white); }
.hb-cal-day.available.selected { background: var(--hb-brand); color: #fff; }

/* ── Time slots ────────────────────────────────────── */
.hb-slots-wrap { min-height: 40px; }
.hb-time-slots { display: flex; flex-wrap: wrap; gap: 6px; }
.hb-time-slot { padding: 8px 16px; border: 1.5px solid var(--hb-border); border-radius: var(--hb-radius); background: var(--hb-bg); cursor: pointer; font-size: 13px; font-weight: 600; font-family: inherit; transition: all 0.2s; }
.hb-time-slot:hover { border-color: var(--hb-brand); }
.hb-time-slot.selected { background: var(--hb-brand); color: #fff; border-color: var(--hb-brand); }

/* ── Contact method ────────────────────────────────── */
.hb-contact-methods { display: flex; flex-wrap: wrap; gap: 8px; margin: var(--hb-gap) 0; }
.hb-contact-btn { display: flex; align-items: center; gap: 6px; padding: 10px 16px; border: 1.5px solid var(--hb-border); border-radius: var(--hb-radius); background: var(--hb-bg); cursor: pointer; font-size: 13px; font-weight: 600; font-family: inherit; transition: all 0.2s; color: var(--hb-text); }
.hb-contact-btn:hover { border-color: var(--hb-brand); }
.hb-contact-btn.selected { border-color: var(--hb-brand); background: color-mix(in srgb, var(--hb-brand) 8%, white); color: var(--hb-brand); }
.hb-contact-btn svg, .hb-contact-btn img { width: 18px; height: 18px; flex-shrink: 0; }
.hb-cm-icon-whatsapp { color: #25D366; }
.hb-cm-icon-viber { color: #7360F2; }

/* ── GDPR checkbox ─────────────────────────────────── */
.hb-gdpr { margin: var(--hb-gap) 0; }
.hb-gdpr label { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--hb-muted); cursor: pointer; line-height: 1.4; }
.hb-gdpr input[type="checkbox"] { width: 16px; height: 16px; margin-top: 1px; flex-shrink: 0; accent-color: var(--hb-brand); }
.hb-gdpr a { color: var(--hb-brand); }

/* ── Review table ──────────────────────────────────── */
.hb-review-table { width: 100%; border-collapse: collapse; margin-bottom: var(--hb-gap); }
.hb-review-table td { padding: 8px 10px; border-bottom: 1px solid #f3f4f6; font-size: 13px; }
.hb-review-table td:first-child { font-weight: 600; color: var(--hb-muted); width: 35%; }

/* ── Buttons ───────────────────────────────────────── */
.hb-btn-row { display: flex; gap: 10px; justify-content: space-between; margin-top: 24px; }
.hb-btn { display: inline-flex; align-items: center; gap: 5px; padding: 12px 28px; border: none; border-radius: var(--hb-radius); font-size: 14px; font-weight: 700; font-family: inherit; cursor: pointer; transition: all 0.2s; }
.hb-btn-primary { background: var(--hb-brand); color: #fff; box-shadow: 0 2px 6px color-mix(in srgb, var(--hb-brand) 30%, transparent); }
.hb-btn-primary:hover { filter: brightness(0.9); }
.hb-btn-secondary { background: #f3f4f6; color: #374151; }
.hb-btn-secondary:hover { background: #e5e7eb; }
.hb-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Success ───────────────────────────────────────── */
.hb-success { text-align: center; padding: 44px 20px; animation: hbFadeIn 0.35s ease; }
.hb-success-icon { width: 64px; height: 64px; border-radius: 50%; background: color-mix(in srgb, var(--hb-brand) 15%, white); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; font-size: 28px; color: var(--hb-brand); }
.hb-success h3 { font-size: 18px; color: var(--hb-brand); margin: 0; }

/* ── Honeypot ──────────────────────────────────────── */
.hb-hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; overflow: hidden; }

/* ── Single mode ───────────────────────────────────── */
.hb-form-wrap[data-mode="single"] .hb-progress { display: none; }
.hb-form-wrap[data-mode="single"] .hb-form-section { display: block; }

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 480px) {
    .hb-type-selector { flex-direction: column; }
    .hb-services-grid { grid-template-columns: 1fr; }
    .hb-contact-methods { flex-direction: column; }
}
