/* =========================================================
   Hotel Booking Plugin — Styles
   ========================================================= */

:root {
    --hb-primary:   #1a3c5e;
    --hb-accent:    #c8a96e;
    --hb-light:     #f0f6ff;
    --hb-text:      #2c2c2c;
    --hb-muted:     #6b7280;
    --hb-border:    #d1dce8;
    --hb-success:   #166534;
    --hb-error:     #b91c1c;
    --hb-available: #15803d;
    --hb-limited:   #b45309;
    --hb-full:      #991b1b;
    --hb-radius:    10px;
    --hb-shadow:    0 4px 24px rgba(0,0,0,.10);
}

/* ── Wrapper ─────────────────────────────────────────── */
.hb-wrapper {
    max-width: 740px;
    margin: 40px auto;
    background: #fff;
    border-radius: var(--hb-radius);
    box-shadow: var(--hb-shadow);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--hb-text);
}

/* ── Steps ───────────────────────────────────────────── */
.hb-step {
    display: none;
    padding: 40px;
    animation: hbFadeIn .3s ease;
}
.hb-step.hb-active { display: block; }

@keyframes hbFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Header ──────────────────────────────────────────── */
.hb-header {
    text-align: center;
    margin-bottom: 30px;
}
.hb-icon { font-size: 40px; margin-bottom: 8px; }
.hb-title {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 700;
    color: var(--hb-primary);
}
.hb-subtitle {
    margin: 0;
    color: var(--hb-muted);
    font-size: 15px;
}

/* ── Calendar nav ────────────────────────────────────── */
.hb-calendar-section {
    background: var(--hb-light);
    border-radius: var(--hb-radius);
    padding: 24px;
    margin-bottom: 24px;
}

.hb-calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.hb-nav-btn {
    background: #fff;
    border: 1px solid var(--hb-border);
    border-radius: 6px;
    width: 36px;
    height: 36px;
    font-size: 18px;
    cursor: pointer;
    transition: background .15s;
    color: var(--hb-primary);
}
.hb-nav-btn:hover { background: var(--hb-primary); color: #fff; }
.hb-month-label {
    font-weight: 700;
    font-size: 17px;
    color: var(--hb-primary);
}

/* ── Calendar grid ───────────────────────────────────── */
.hb-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.hb-day-header {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--hb-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 4px 0 8px;
}

.hb-calendar-days { margin-top: 0; }

.hb-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    position: relative;
    transition: all .15s;
    background: #fff;
    border: 1px solid transparent;
    user-select: none;
}

.hb-day:hover:not(.hb-day-past):not(.hb-day-empty):not(.hb-day-full) {
    background: var(--hb-primary);
    color: #fff;
    border-color: var(--hb-primary);
}
.hb-day-empty    { background: transparent; cursor: default; border: none; }
.hb-day-past     { color: #ccc; cursor: not-allowed; background: #f9f9f9; }
.hb-day-full     { background: #fee2e2; color: var(--hb-full); cursor: not-allowed; text-decoration: line-through; }
.hb-day-limited  { border-color: #fcd34d; }
.hb-day-limited::after {
    content: '';
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--hb-limited);
    position: absolute;
    bottom: 3px; left: 50%; transform: translateX(-50%);
}
.hb-day-check-in, .hb-day-check-out {
    background: var(--hb-primary) !important;
    color: #fff !important;
    border-color: var(--hb-primary) !important;
}
.hb-day-in-range {
    background: #dbeafe;
    border-radius: 0;
    border-color: transparent;
}
.hb-day-check-in  { border-radius: 6px 0 0 6px; }
.hb-day-check-out { border-radius: 0 6px 6px 0; }
.hb-day-check-in.hb-day-check-out { border-radius: 6px; }

/* ── Legend ──────────────────────────────────────────── */
.hb-legend {
    display: flex;
    gap: 16px;
    margin-top: 14px;
    justify-content: center;
}
.hb-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--hb-muted);
}
.hb-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.hb-dot-available { background: var(--hb-available); }
.hb-dot-limited   { background: var(--hb-limited); }
.hb-dot-full      { background: var(--hb-full); }

/* ── Selected dates bar ──────────────────────────────── */
.hb-selected-dates {
    background: var(--hb-light);
    border-radius: var(--hb-radius);
    padding: 16px 24px;
    margin-bottom: 24px;
}
.hb-date-display {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.hb-date-box {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 120px;
}
.hb-date-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--hb-muted);
    margin-bottom: 2px;
}
.hb-date-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--hb-primary);
}
.hb-arrow { font-size: 20px; color: var(--hb-muted); }
.hb-nights-box { background: var(--hb-primary); border-radius: 6px; padding: 8px 14px; }
.hb-nights-box .hb-date-label { color: rgba(255,255,255,.7); }
.hb-nights-box .hb-date-value { color: #fff; }

/* ── Form ────────────────────────────────────────────── */
.hb-form { display: flex; flex-direction: column; gap: 18px; }

.hb-field-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}
.hb-field-group { display: flex; flex-direction: column; gap: 6px; }

.hb-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--hb-text);
}
.hb-required { color: #e53e3e; }
.hb-optional { font-weight: 400; color: var(--hb-muted); font-size: 12px; }

.hb-input, .hb-textarea {
    border: 1.5px solid var(--hb-border);
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 15px;
    color: var(--hb-text);
    background: #fff;
    transition: border-color .15s;
    width: 100%;
    box-sizing: border-box;
}
.hb-input:focus, .hb-textarea:focus {
    outline: none;
    border-color: var(--hb-primary);
    box-shadow: 0 0 0 3px rgba(26,60,94,.12);
}

/* ── Counter ─────────────────────────────────────────── */
.hb-counter {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--hb-border);
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}
.hb-counter-btn {
    background: #f5f5f5;
    border: none;
    width: 38px;
    height: 42px;
    font-size: 20px;
    cursor: pointer;
    color: var(--hb-primary);
    font-weight: 600;
    transition: background .15s;
    flex-shrink: 0;
}
.hb-counter-btn:hover { background: var(--hb-primary); color: #fff; }
.hb-counter-input {
    flex: 1;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--hb-primary);
    padding: 0;
    -moz-appearance: textfield;
}
.hb-counter-input::-webkit-inner-spin-button,
.hb-counter-input::-webkit-outer-spin-button { -webkit-appearance: none; }

/* ── Stay summary ────────────────────────────────────── */
.hb-stay-summary {
    background: var(--hb-light);
    border-radius: 8px;
    padding: 14px 18px;
    font-size: 14px;
    color: var(--hb-primary);
    font-weight: 600;
    margin-bottom: 10px;
}

/* ── Buttons ─────────────────────────────────────────── */
.hb-step-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 10px;
}
.hb-btn {
    padding: 12px 28px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all .2s;
}
.hb-btn-primary {
    background: var(--hb-primary);
    color: #fff;
}
.hb-btn-primary:hover:not(:disabled) { background: #0f2a42; transform: translateY(-1px); }
.hb-btn-primary:disabled { background: #94a3b8; cursor: not-allowed; }
.hb-btn-secondary {
    background: #fff;
    color: var(--hb-primary);
    border: 1.5px solid var(--hb-border);
}
.hb-btn-secondary:hover { background: var(--hb-light); }

/* ── Error message ───────────────────────────────────── */
.hb-error-msg {
    background: #fee2e2;
    color: var(--hb-error);
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 14px;
    border: 1px solid #fca5a5;
}

/* ── Confirmation step ───────────────────────────────── */
#hb-step-3 { text-align: center; padding: 60px 40px; }
.hb-success-icon {
    width: 72px; height: 72px;
    background: #dcfce7;
    color: var(--hb-available);
    border-radius: 50%;
    font-size: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-weight: 700;
}
.hb-confirmation-card {
    background: var(--hb-light);
    border-radius: var(--hb-radius);
    padding: 20px 24px;
    margin: 24px auto;
    max-width: 420px;
    text-align: left;
}
.hb-confirmation-card table { width: 100%; font-size: 14px; }
.hb-confirmation-card td { padding: 5px 0; }
.hb-confirmation-card td:first-child { font-weight: 600; color: var(--hb-muted); width: 45%; }
.hb-confirmation-note {
    color: var(--hb-muted);
    font-size: 14px;
    line-height: 1.6;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 580px) {
    .hb-step { padding: 24px 16px; }
    .hb-day  { font-size: 11px; }
    .hb-field-row { grid-template-columns: 1fr; }
    .hb-step-actions { flex-direction: column-reverse; }
    .hb-btn { width: 100%; justify-content: center; }
    .hb-date-display { flex-direction: column; }
    .hb-arrow { transform: rotate(90deg); }
}
