.order-form-page {
    max-width: 960px;
    margin: 48px auto;
    padding: 0 16px;
}

.order-form-page__title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 28px;
}

.order-form-layout {
    display: grid;
    grid-template-columns: 1.3fr 0.9fr;
    gap: 24px;
}

.order-form-card {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
}

.order-form-accom {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-bottom: 1px solid #f1f5f9;
}

.order-form-accom__img {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 12px;
    background: #eee;
    flex-shrink: 0;
}

.order-form-accom__name {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.order-form-accom__meta {
    font-size: 0.92rem;
    color: #6b7280;
    line-height: 1.6;
}

.order-form-body {
    padding: 24px 20px;
}

.order-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.order-info-box {
    border: 1px solid #eef2f7;
    background: #f8fafc;
    border-radius: 12px;
    padding: 14px 16px;
}

.order-info-box__label {
    font-size: 0.84rem;
    color: #64748b;
    margin-bottom: 6px;
}

.order-info-box__value {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
}

.calendar-card {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
    padding: 20px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.calendar-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.calendar-nav {
    display: flex;
    gap: 8px;
}

.calendar-nav button {
    width: 36px;
    height: 36px;
    border: 1px solid #d1d5db;
    background: #fff;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
}

.calendar-month-label {
    font-weight: 700;
    margin-bottom: 14px;
}

.calendar-weekdays,
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-weekdays {
    margin-bottom: 10px;
}

.calendar-weekday {
    text-align: center;
    font-size: 0.84rem;
    font-weight: 600;
    color: #64748b;
    padding: 6px 0;
}

/* 주말 요일 헤더 색상 */
.calendar-weekday:first-child { color: #dc2626; } /* 일 */
.calendar-weekday:last-child  { color: #2563eb; } /* 토 */

.calendar-day {
    min-height: 78px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 8px 6px;
    background: #fff;
    position: relative;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.calendar-day:hover {
    border-color: #111827;
}

.calendar-day.is-other-month {
    visibility: hidden;
}

.calendar-day.is-disabled {
    background: #f1f5f9;
    color: #94a3b8;          /* 대비 높임: #cbd5e1 → #94a3b8 */
    border-color: #e2e8f0;
    cursor: not-allowed;
}

/* 지난날: 숫자 취소선 + 전체 페이드 */
.calendar-day.is-past {
    opacity: 0.55;
}
.calendar-day.is-past .calendar-day__num {
    text-decoration: line-through;
    text-decoration-color: #94a3b8;
}
.calendar-day.is-past .calendar-day__badge {
    background: transparent;
    color: #b0bec5;
}

/* 비운영(과거 제외): 뱃지 대비 높임 */
.calendar-day.is-disabled:not(.is-past) .calendar-day__badge {
    background: #e2e8f0;
    color: #475569;
    font-weight: 600;
}

.calendar-day.is-soldout {
    background: #fff5f5;
    border-color: #fecaca;
    color: #b91c1c;
    cursor: not-allowed;
}

.calendar-day.is-selected,
.calendar-day.is-in-range {
    background: #111827;
    color: #fff;
    border-color: #111827;
}

.calendar-day.is-selected.is-today,
.calendar-day.is-in-range.is-today {
    background: #111827;
    color: #fff;
    border-color: #111827;
}

.calendar-day.is-in-range:not(.is-selected) {
    background: #e5e7eb;
    color: #111827;
    border-color: #d1d5db;
}

.calendar-day.is-preview {
    background: #eff6ff;
    color: #1e3a8a;
    border-color: #93c5fd;
}

/* 오늘 날짜 강조 */
.calendar-day.is-today {
    border: 2px solid #6366f1;
    background: #fafaff;
}
.calendar-day.is-today:hover {
    border-color: #4f46e5;
}
.calendar-day__num.is-today {
    color: #6366f1;
    font-weight: 900;
}
.calendar-day__num.is-today::after {
    content: '';
    display: block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #6366f1;
    margin: 2px auto 0;
}

/* 주말 날짜 숫자 색상 (선택·마감 상태 제외) */
.calendar-day.is-sunday:not(.is-selected):not(.is-soldout) .calendar-day__num { color: #dc2626; }
.calendar-day.is-saturday:not(.is-selected):not(.is-soldout) .calendar-day__num { color: #2563eb; }
/* is-today가 우선 */
.calendar-day.is-today .calendar-day__num { color: #6366f1; }
.calendar-day.is-selected .calendar-day__num,
.calendar-day.is-in-range .calendar-day__num,
.calendar-day.is-selected.is-today .calendar-day__num,
.calendar-day.is-in-range.is-today .calendar-day__num { color: #fff; }

.calendar-day__num {
    font-size: 0.94rem;
    font-weight: 700;
    align-self: center;
}

.calendar-day__badge {
    width: 100%;
    font-size: 0.68rem;
    text-align: center;
    padding: 3px 4px;
    border-radius: 999px;
    background: rgba(241, 245, 249, 0.85);
    line-height: 1.3;
    word-break: keep-all;
}

.calendar-day.is-selected .calendar-day__badge,
.calendar-day.is-in-range .calendar-day__badge,
.calendar-day.is-preview .calendar-day__badge {
    background: rgba(255, 255, 255, 0.25);
    color: inherit;
}

/* ── 예약가능여부 뱃지 ───────────────────────────────────────────── */
.availability-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #6b7280;
    background: #f1f5f9;
}

.availability-badge--available {
    background: #dcfce7;
    color: #166534;
}

.availability-badge--low-stock {
    background: #fff7ed;
    color: #ea580c;          /* 주황 통일 */
    border: 1px solid #fed7aa;
    font-weight: 700;
}

.availability-badge--rooms-left {
    background: #fff7ed;     /* 빨강 → 주황 */
    color: #ea580c;
    border: 1px solid #fed7aa;
    font-weight: 700;
}

.availability-badge--soldout {
    background: #fee2e2;
    color: #991b1b;
}

#summaryRemaining {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-end;
}

/* 운영일 뱃지: 예약가능(초록) */
.calendar-day__badge.is-available {
    background: #dcfce7;
    color: #166534;
    font-weight: 500;
}

/* 마감임박(주황) — 빨강은 진짜 마감에만 */
.calendar-day__badge.is-low-stock {
    background: #fff7ed;
    color: #ea580c;
    border: 1px solid #fed7aa;
    font-weight: 700;
}

/* 선택·범위 상태에서 뱃지 색 통일 */
.calendar-day.is-selected .calendar-day__badge.is-available,
.calendar-day.is-in-range .calendar-day__badge.is-available {
    background: rgba(220, 252, 231, 0.3);
    color: inherit;
}
.calendar-day.is-selected .calendar-day__badge.is-low-stock,
.calendar-day.is-in-range .calendar-day__badge.is-low-stock {
    background: rgba(255, 247, 237, 0.3);
    color: inherit;
}

.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
    padding: 12px 14px;
    background: #f8fafc;
    border-radius: 12px;
}

.calendar-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: #475569;
}

/* ── 범례 chip (캘린더 뱃지와 동일 스타일) ─── */
.calendar-legend__chip {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 600;
    background: rgba(241, 245, 249, 0.85);
    color: #64748b;
    border: 1px solid transparent;
}
.chip--available  { background: #dcfce7; color: #166534; }
.chip--low-stock  { background: #fff7ed; color: #ea580c; border-color: #fed7aa; }
.chip--soldout    { background: #fff5f5; color: #b91c1c; border-color: #fecaca; }
.chip--nonop      { background: #e2e8f0; color: #475569; }
.chip--past       { background: #f8fafc; color: #b0bec5; font-style: italic; text-decoration: line-through; }
.chip--today      { background: #fafaff; color: #6366f1; border-color: #6366f1; border-width: 2px; }
.chip--selected   { background: #111827; color: #fff; }

.selection-guide {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #f8fafc;
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.7;
}

.order-summary-card {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.order-summary-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 18px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.95rem;
}

.summary-row:last-of-type {
    border-bottom: none;
}

.summary-label {
    color: #6b7280;
}

.summary-value {
    font-weight: 600;
    text-align: right;
    color: #111827;
}

.order-form-group {
    margin-top: 18px;
}

.order-form-group label {
    display: block;
    font-size: 0.92rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #111827;
}

.order-form-group input[type="number"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 1rem;
    box-sizing: border-box;
}

.order-form-group input.error {
    border-color: #dc2626;
}

/* 성인 / 아동 나란히 배치 */
.guest-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.guest-input-box {
    flex: 1;
    min-width: 110px;
}

.guest-label {
    display: block;
    font-size: 0.82rem;
    color: #6b7280;
    margin-bottom: 4px;
}

.order-form-hint {
    font-size: 0.82rem;
    color: #6b7280;
    margin-top: 6px;
}

.order-form-hint.error {
    color: #dc2626;
}

.surcharge-guide {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 12px;
    padding: 10px 14px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    font-size: 0.82rem;
    color: #92400e;
    line-height: 1.6;
}

.surcharge-guide__icon {
    flex-shrink: 0;
    font-size: 0.88rem;
}

.order-form-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e5e7eb;
    font-size: 0.95rem;
    font-weight: 600;
    color: #374151;
}

/* 최종 합계 강조 */
.order-form-total--final {
    font-size: 1.08rem;
    font-weight: 800;
    color: #111827;
}

.order-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 22px;
    flex-wrap: nowrap;
}

.order-form-actions .btn-back,
.order-form-actions .btn-order {
    white-space: nowrap;
    min-width: 0;
}

.btn-order,
.btn-back {
    flex: 1;
    padding: 13px 10px;
    border-radius: 10px;
    font-size: 0.95rem; /* 살짝 줄임 */
    font-weight: 700;
    text-align: center;
    cursor: pointer;

    /* 잘림 방지 핵심 코드 */
    white-space: nowrap;  /* 한 줄로 표시 */
    display: flex;        /* 중앙 정렬을 위해 추가 */
    align-items: center;
    justify-content: center;
}

.btn-order {
    border: none;
    background: #111827;
    color: #fff;
}

.btn-order:hover {
    background: #000;
}

.btn-back {
    border: 1px solid #d1d5db;
    background: #fff;
    color: #374151;
}

.btn-order--edit {
    background: linear-gradient(135deg, #7b3ff2, #9258ff);
}
.btn-order--edit:hover {
    background: linear-gradient(135deg, #6d35d9, #8447ff);
}

@media (max-width: 900px) {
    .order-form-layout {
        grid-template-columns: 1fr;
    }

    .order-summary-card {
        position: static;
    }
}

@media (max-width: 680px) {
    .order-info-grid {
        grid-template-columns: 1fr;
    }

    .calendar-day {
        min-height: 72px;
    }

    .order-form-actions {
        flex-direction: column;
    }
}
