:root {
    color-scheme: light;
    --bg: #eef6fb;
    --panel: #ffffff;
    --text: #142033;
    --muted: #66758a;
    --line: #dbe6ef;
    --blue: #2563eb;
    --blue-strong: #1d4ed8;
    --blue-soft: #eaf1ff;
    --green: #10b981;
    --gray-day: #e5eaf0;
    --danger: #b42318;
    --shadow: 0 22px 55px rgba(20, 32, 51, 0.14);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: linear-gradient(180deg, #eef6fb 0%, #f8fbfd 100%);
    color: var(--text);
}

button,
input {
    font: inherit;
}

.booking-shell {
    width: 100%;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 12px;
}

.booking-card {
    width: min(430px, 100%);
    min-height: min(760px, calc(100vh - 24px));
    display: flex;
    flex-direction: column;
    background: var(--panel);
    border: 1px solid rgba(219, 230, 239, 0.95);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 18px;
    overflow: hidden;
}

.booking-header {
    display: grid;
    grid-template-columns: 42px 1fr 22px;
    align-items: center;
    gap: 10px;
}

.back-button {
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--text);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease;
}

.back-button.visible {
    opacity: 1;
    pointer-events: auto;
}

.step-label {
    margin: 0 0 4px;
    color: var(--blue);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin: 0;
}

h1 {
    font-size: 22px;
    line-height: 1.1;
    letter-spacing: 0;
}

h2 {
    font-size: 28px;
    line-height: 1.08;
    letter-spacing: 0;
}

p {
    color: var(--muted);
    line-height: 1.5;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 7px rgba(16, 185, 129, 0.12);
}

.progress {
    height: 7px;
    margin: 18px 0 24px;
    overflow: hidden;
    border-radius: 999px;
    background: #e7edf4;
}

.progress-bar {
    display: block;
    width: 33.333%;
    height: 100%;
    border-radius: inherit;
    background: var(--blue);
    transition: width 220ms ease;
}

.step {
    display: none;
    flex: 1;
}

.step.active {
    display: flex;
    flex-direction: column;
}

.section-heading {
    margin-bottom: 20px;
}

.section-heading p {
    margin-top: 8px;
    font-size: 15px;
}

.month-nav {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.month-nav strong {
    text-align: center;
    font-size: 16px;
    text-transform: capitalize;
}

.month-nav button {
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font-size: 26px;
    cursor: pointer;
}

.calendar-weekdays,
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}

.calendar-weekdays {
    margin-bottom: 8px;
}

.calendar-weekdays span {
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.calendar-grid {
    align-content: start;
}

.calendar-empty {
    min-height: 44px;
}

.calendar-day {
    min-width: 0;
    min-height: 46px;
    border: 0;
    border-radius: 8px;
    color: #7b8795;
    background: var(--gray-day);
    font-weight: 800;
    cursor: not-allowed;
}

.calendar-day.available {
    color: #fff;
    background: var(--blue);
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.calendar-day.available:active,
.calendar-day.available.selected {
    background: var(--blue-strong);
    transform: translateY(1px);
}

.calendar-day span {
    display: block;
}

.loading,
.empty {
    grid-column: 1 / -1;
    display: grid;
    place-items: center;
    min-height: 180px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    color: var(--muted);
    text-align: center;
    padding: 18px;
}

.time-list {
    display: grid;
    gap: 10px;
}

.time-option {
    width: 100%;
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    padding: 12px 14px;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(20, 32, 51, 0.05);
}

.time-option span {
    font-size: 20px;
    font-weight: 850;
}

.time-option small {
    color: var(--blue);
    font-size: 13px;
    font-weight: 800;
}

.details-form {
    display: grid;
    gap: 11px;
}

label {
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

input {
    width: 100%;
    min-height: 50px;
    border: 1px solid #cbd8e6;
    border-radius: 8px;
    padding: 12px 13px;
    color: var(--text);
    outline: none;
    background: #fff;
}

input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

button[type="submit"],
#success-action {
    min-height: 52px;
    margin-top: 8px;
    border: 0;
    border-radius: 8px;
    background: var(--blue);
    color: white;
    font-weight: 850;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

button[type="submit"]:disabled {
    opacity: 0.58;
    cursor: not-allowed;
}

.fine-print {
    font-size: 12px;
}

.success-step {
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 14px;
}

.success-mark {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #dcfce7;
    color: #15803d;
    font-size: 36px;
    font-weight: 900;
}

.success-step p {
    max-width: 320px;
}

#success-action {
    width: 100%;
}

.message {
    min-height: 22px;
    margin-top: 14px;
    color: var(--blue-strong);
    font-size: 14px;
    font-weight: 800;
}

.message.error,
.error-text {
    color: var(--danger);
}

@media (min-width: 760px) {
    .booking-shell {
        padding: 24px;
    }

    .booking-card {
        min-height: 720px;
    }
}
