/* ---------- 页面容器 ---------- */
.booking-wrap {
    max-width: 1100px;
    margin: 24px auto 80px;
    padding: 0 20px;
}

body.no-scroll {
    overflow: hidden;
}

/* ---------- 分段卡片 ---------- */
.card-section {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
    padding: 24px;
    margin-bottom: 20px;
}

.section-title {
    margin: 0 0 16px;
    font-size: 1.6rem;
}

/* ---------- 表单基础 ---------- */
.field-row {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
}

.field-label {
    min-width: 160px;
    font-weight: 600;
}

.input {
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 1rem;
    outline: none;
    background: #fafafa;
}

    .input:focus {
        border-color: #999;
    }

    .input.sm {
        padding: 8px 10px;
    }

.field-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit,minmax(260px,1fr));
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.choice-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

    .choice-group .choice {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 10px 14px;
        border: 1px solid #ddd;
        border-radius: 999px;
        background: #fff;
        cursor: pointer;
        transition: border-color .2s ease, background-color .2s ease, color .2s ease;
    }

        .choice-group .choice:hover {
            border-color: #111;
        }

        .choice-group .choice:focus-within {
            border-color: #111;
            box-shadow: 0 0 0 2px rgba(17,17,17,0.12);
        }

        .choice-group .choice input {
            accent-color: #111;
        }

            .choice-group .choice input:checked + span {
                font-weight: 600;
                color: #111;
            }

.field.has-error .choice-group .choice {
    border-color: #b10000;
}

.address-grid {
    margin-top: 12px;
}

/* ---------- 计数器 ---------- */
.counter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.counter-input {
    width: 64px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px;
    background: #fff;
}

.btn-ghost {
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
}

    .btn-ghost:hover {
        background: #f3f3f3;
    }

/* ---------- Toggle ---------- */
.toggle-group {
    display: inline-flex;
    gap: 8px;
}

.toggle {
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 999px;
    padding: 8px 14px;
    cursor: pointer;
}

    .toggle.is-active {
        background: #111;
        color: #fff;
        border-color: #111;
    }

/* ---------- 选项卡（正方/近似方） ---------- */
.card-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.option-card {
    position: relative;
    background: #f7f6f3;
    border: 1px solid rgba(0,0,0,.06);
    border-radius: 12px;
    padding: 16px;
    min-height: 140px;
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    align-items: start;
    text-align: left;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

    .option-card .icon {
        font-size: 24px;
        line-height: 1;
    }

    .option-card .title {
        font-weight: 700;
        margin-top: 8px;
    }

    .option-card .desc {
        color: #555;
        margin-top: 6px;
        font-size: .95rem;
    }

    /* ---- option card basics ---- */
    .option-card .price {
        margin-top: 10px;
        font-weight: 700;
        font-size: 1.05rem;
    }

    .option-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 14px rgba(0,0,0,.08);
    }

    .option-card.selected {
        border-color: #111;
        box-shadow: 0 6px 16px rgba(0,0,0,.12);
    }

    /* ---- add-ons with bottom control bar ---- */
    .option-card.with-control {
        padding: 0; /* 头部信息和控制条分区 */
        display: grid;
        grid-template-rows: auto auto; /* header + control */
    }

    .option-card .card-click {
        padding: 16px;
    }

    .option-card .card-control {
        display: flex;
        align-items: center;
        gap: 10px;
        border-top: 1px solid rgba(0,0,0,.06);
        padding: 12px 16px;
        background: #fff;
    }

    /* 单行：「标签 + 计数器」；小屏可换行 */
    .option-card.with-control .card-control .control-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        width: 100%;
        flex-wrap: nowrap;
    }

    .option-card.with-control .card-control .label,
    .option-card .card-control .room-name {
        font-weight: 600;
        margin-right: 8px;
        flex: 0 0 auto;
    }

    /* 控制条内的输入宽度统一（如 select/input.sm 也不会过长） */
    .option-card.with-control .card-control .input.sm,
    .option-card.with-control .card-control select.input.sm {
        box-sizing: border-box;
        width: 140px;
        max-width: 45%;
    }

/* 计数器尺寸统一，防止被拉伸 */
.counter-input {
    width: 64px;
    min-width: 64px;
    text-align: center;
}

/* Basic Information 面板里的小输入与上面保持一致 */
.room-item .input.sm {
    width: 140px;
}

/* 窄屏时允许换行，避免溢出 */
@media (max-width: 640px) {
    .option-card.with-control .card-control .control-row {
        flex-wrap: wrap;
    }
}


/* ---------- 区域面板 ---------- */
.sub-panel {
    margin-top: 14px;
    padding-top: 6px;
    border-top: 1px dashed #ddd;
}

.sub-title {
    margin: 6px 0 12px;
    font-size: 1.15rem;
}

.room-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.room-item {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.room-name {
    font-weight: 600;
}

.summary-trigger {
    display: flex;
    justify-content: flex-end;
}

.summary-continue {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}

    .summary-continue .btn-primary {
        min-width: 200px;
    }

.summary-step {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .3s ease, transform .3s ease;
}

    .summary-step.is-visible {
        opacity: 1;
        transform: translateY(0);
    }

    .summary-step[hidden] {
        display: none !important;
    }

.summary-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ---------- 结算摘要（占位） ---------- */
.summary {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 16px;
}

.summary-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
}

.summary-price {
    font-size: 1.4rem;
}

.btn-primary {
    background: #111;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 12px 18px;
    cursor: pointer;
    opacity: 1;
    transition: opacity .2s ease, transform .2s ease, box-shadow .2s ease;
}

    .btn-primary:hover {
        transform: translateY(-1px);
        box-shadow: 0 8px 18px rgba(0,0,0,.12);
    }

    .btn-primary:disabled {
        cursor: not-allowed;
        opacity: .6;
        box-shadow: none;
        transform: none;
        pointer-events: none;
    }

    .btn-primary.is-ready {
        box-shadow: 0 10px 20px rgba(0,0,0,.16);
    }

    .btn-primary.is-busy {
        cursor: wait;
        opacity: .7;
    }

.customer-info {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .3s ease, transform .3s ease;
}

    .customer-info.is-visible {
        opacity: 1;
        transform: translateY(0);
    }

    .customer-info[hidden] {
        display: none !important;
    }

    .customer-info .field-grid {
        margin-top: 12px;
    }

.field-wide {
    grid-column: span 2;
}

.input-textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.45;
    width: 100%;
}

.field-error {
    color: #b10000;
    font-size: 0.9rem;
    margin-top: 4px;
    min-height: 1.2em;
}

.input.has-error {
    border-color: #b10000;
    background: #fff7f7;
}

.form-actions {
    margin-top: 24px;
    display: flex;
    justify-content: flex-end;
}

    .form-actions .btn-primary {
        min-width: 180px;
    }

/* ---------- 预约确认遮罩 ---------- */
.confirmation-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 17, 17, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .28s ease, visibility .28s ease;
}

    .confirmation-overlay.is-visible {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .confirmation-overlay .overlay-card {
        background: #ffffff;
        border-radius: 20px;
        padding: 36px 32px;
        max-width: 460px;
        width: 100%;
        text-align: center;
        color: #111;
        box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
        opacity: 0;
        transform: translateY(18px);
        transition: opacity .28s ease, transform .28s ease;
    }

    .confirmation-overlay.is-visible .overlay-card {
        opacity: 1;
        transform: translateY(0);
    }

.overlay-title {
    font-size: 2rem;
    margin: 0 0 12px;
}

.overlay-message {
    font-size: 1.1rem;
    margin: 0 0 24px;
    line-height: 1.6;
}

.confirmation-overlay .overlay-home-btn {
    width: 100%;
}

/* ---------- 响应式微调 ---------- */
@media (max-width:640px) {
    .field-row {
        flex-direction: column;
        align-items: stretch;
    }

    .field-label {
        min-width: auto;
    }

    .field-wide {
        grid-column: span 1;
    }

    .summary-continue {
        justify-content: center;
    }

        .summary-continue .btn-primary {
            width: 100%;
        }
}
