/* HoldBooking – Frontend Booking CSS */

:root {
    --hb-primary:    #1e293b;
    --hb-accent:     #3b82f6;
    --hb-success:    #22c55e;
    --hb-danger:     #ef4444;
    --hb-border:     #e2e8f0;
    --hb-bg:         #f8fafc;
    --hb-text:       #0f172a;
    --hb-muted:      #64748b;
    --hb-radius:     10px;
    --hb-shadow:     0 2px 12px rgba(0,0,0,.08);
}

/* Wrap */
.hb-booking-wrap {
    max-width: 860px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--hb-text);
}

/* Steps */
.hb-step {
    background: #fff;
    border: 1px solid var(--hb-border);
    border-radius: var(--hb-radius);
    padding: 28px 32px;
    margin-bottom: 20px;
    transition: opacity .2s, box-shadow .2s;
}
.hb-step--locked {
    opacity: .45;
    pointer-events: none;
}
.hb-step--active {
    box-shadow: var(--hb-shadow);
    border-color: var(--hb-accent);
    opacity: 1;
    pointer-events: auto;
}
.hb-step--done {
    opacity: 1;
    pointer-events: auto;
    border-color: var(--hb-success);
}

.hb-step-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 20px;
    font-size: 18px;
    font-weight: 700;
}
.hb-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--hb-primary);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}
.hb-step--done .hb-step-num { background: var(--hb-success); }
.hb-step--active .hb-step-num { background: var(--hb-accent); }

/* Hold cards */
.hb-holds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}
.hb-hold-card {
    border: 2px solid var(--hb-border);
    border-radius: var(--hb-radius);
    overflow: hidden;
    cursor: pointer;
    transition: border-color .15s, transform .15s, box-shadow .15s;
}
.hb-hold-card:hover,
.hb-hold-card--selected {
    border-color: var(--hb-hold-color, var(--hb-accent));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,.1);
}
.hb-hold-card--selected { background: #f0f9ff; }
.hb-hold-thumb img { width: 100%; height: 160px; object-fit: cover; display: block; }
.hb-hold-info { padding: 16px; }
.hb-hold-info h4 { margin: 0 0 6px; font-size: 16px; }
.hb-hold-desc { font-size: 13px; color: var(--hb-muted); margin: 0 0 10px; }
.hb-hold-price { font-size: 18px; color: var(--hb-primary); }
.hb-hold-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }

/* Calendar */
.hb-step-content { display: flex; gap: 24px; flex-wrap: wrap; }
.hb-calendar-wrap { flex: 0 0 300px; }
.hb-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.hb-cal-nav {
    background: none; border: 1px solid var(--hb-border);
    border-radius: 6px;
    width: 32px; height: 32px;
    font-size: 18px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .1s;
}
.hb-cal-nav:hover { background: var(--hb-bg); }
#hb-cal-title { font-weight: 700; font-size: 15px; text-transform: capitalize; }

.hb-cal-day-names {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 6px;
}
.hb-cal-day-names span {
    font-size: 11px;
    font-weight: 700;
    color: var(--hb-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 4px 0;
}
.hb-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}
.hb-cal-day {
    aspect-ratio: 1;
    display: flex; align-items: center; justify-content: center;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all .1s;
    user-select: none;
}
.hb-cal-day:hover:not(.disabled):not(.past) {
    background: var(--hb-bg);
    border-color: var(--hb-accent);
}
.hb-cal-day.today { font-weight: 700; color: var(--hb-accent); }
.hb-cal-day.selected { background: var(--hb-accent); color: #fff; border-color: var(--hb-accent); }
.hb-cal-day.disabled,
.hb-cal-day.past { color: #cbd5e1; cursor: default; }
.hb-cal-day.closed { color: #cbd5e1; cursor: not-allowed; text-decoration: line-through; }
.hb-cal-day.has-slots { position: relative; }
.hb-cal-day.has-slots::after {
    content: '';
    position: absolute;
    bottom: 3px;
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--hb-success);
}

/* Slots */
.hb-slots-wrap { flex: 1; min-width: 200px; }
.hb-slots-wrap h4 { margin: 0 0 12px; font-size: 15px; }
.hb-slots-placeholder { color: var(--hb-muted); font-size: 14px; }
.hb-slots-list {
    display: flex; flex-wrap: wrap; gap: 8px;
}
.hb-slot {
    padding: 8px 16px;
    border: 2px solid var(--hb-border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    background: #fff;
    position: relative;
}
.hb-slot:hover:not(.full) { border-color: var(--hb-accent); color: var(--hb-accent); }
.hb-slot.selected { background: var(--hb-accent); border-color: var(--hb-accent); color: #fff; }
.hb-slot.full { background: #f1f5f9; color: #94a3b8; cursor: not-allowed; border-color: #e2e8f0; }
.hb-slot .hb-slot-avail { display: block; font-size: 10px; font-weight: 400; opacity: .8; }
.hb-slots-loading { color: var(--hb-muted); font-size: 14px; }

/* Form */
.hb-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.hb-form-field { display: flex; flex-direction: column; gap: 6px; }
.hb-form-field--full { grid-column: 1 / -1; }
.hb-form-field label { font-size: 13px; font-weight: 600; color: var(--hb-primary); }
.hb-required { color: var(--hb-danger); }
.hb-form-field input,
.hb-form-field textarea {
    padding: 10px 14px;
    border: 1.5px solid var(--hb-border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color .15s;
    outline: none;
}
.hb-form-field input:focus,
.hb-form-field textarea:focus { border-color: var(--hb-accent); }
.hb-form-field input.hb-invalid { border-color: var(--hb-danger); }

/* Summary */
.hb-summary {
    background: var(--hb-bg);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}
.hb-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--hb-border);
}
.hb-summary-row:last-child { border: none; font-weight: 700; font-size: 16px; }
.hb-summary-label { color: var(--hb-muted); }

/* Buttons */
.hb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid var(--hb-border);
    background: #fff;
    color: var(--hb-text);
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
    text-decoration: none;
}
.hb-btn:hover { border-color: var(--hb-primary); background: var(--hb-primary); color: #fff; }
.hb-btn--select-hold { width: 100%; margin-top: 8px; }
.hb-btn--primary {
    background: var(--hb-primary);
    border-color: var(--hb-primary);
    color: #fff;
}
.hb-btn--primary:hover { background: #0f172a; border-color: #0f172a; color: #fff; }
.hb-btn--primary:disabled { background: #94a3b8; border-color: #94a3b8; cursor: not-allowed; }
.hb-btn--large { padding: 14px 32px; font-size: 16px; width: 100%; }

/* Error */
.hb-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    padding: 12px 16px;
    color: #991b1b;
    font-size: 14px;
    margin-bottom: 16px;
}

/* Secure note */
.hb-secure-note {
    text-align: center;
    font-size: 12px;
    color: var(--hb-muted);
    margin-top: 10px;
}

/* Success */
.hb-success-msg {
    background: #fff;
    border: 2px solid var(--hb-success);
    border-radius: var(--hb-radius);
    padding: 48px 32px;
    text-align: center;
}
.hb-success-icon {
    width: 60px; height: 60px;
    background: var(--hb-success);
    color: #fff;
    font-size: 28px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
}
.hb-success-msg h3 { margin: 0 0 8px; font-size: 22px; }
.hb-success-msg p  { color: var(--hb-muted); }

/* Hold list */
.hb-hold-list-wrap { max-width: 860px; margin: 0 auto; }
.hb-hold-content { font-size: 14px; color: var(--hb-muted); margin: 8px 0; }

@media (max-width: 640px) {
    .hb-step { padding: 20px 16px; }
    .hb-step-content { flex-direction: column; }
    .hb-calendar-wrap { flex: none; width: 100%; }
    .hb-form-grid { grid-template-columns: 1fr; }
    .hb-holds-grid { grid-template-columns: 1fr; }
}
