/* ── 래퍼 ─────────────────────────────────────────────────────── */
.fvb-wrap { font-family: inherit; max-width: 860px; margin: 0 auto; }
.fvb-notice { padding: 12px 16px; background: #f8f8f8; border: 1px solid #ddd; border-radius: 4px; color: #555; }

/* ── 탭 ──────────────────────────────────────────────────────── */
.fvb-tabs { display: flex; border-bottom: 2px solid #ddd; margin-bottom: 0; }
.fvb-tab {
    padding: 10px 28px; font-size: 15px; font-weight: 500;
    background: #f5f5f5; border: none; border-bottom: none; cursor: pointer;
    color: #777; border-top: 2px solid transparent;
}
.fvb-tab.active { background: #fff; color: #1a7a5e; border-top-color: #1a7a5e; border-bottom-color: #fff; margin-bottom: -2px; }
.fvb-tab-content { padding: 24px 0; }

/* ── 폼 테이블 ───────────────────────────────────────────────── */
.fvb-form-table { width: 100%; border-collapse: collapse; }
.fvb-form-table th, .fvb-form-table td { padding: 12px 16px; border: 1px solid #e0e0e0; }
.fvb-form-table th { width: 160px; background: #f7f7f7; font-weight: 500; vertical-align: top; font-size: 14px; }
.fvb-form-table td { background: #fff; }
.fvb-required { color: #e84343; }

.fvb-form-table select,
.fvb-form-table input[type="text"],
.fvb-form-table input[type="tel"],
.fvb-form-table input[type="email"],
.fvb-form-table input[type="file"] {
    width: 100%; max-width: 400px; padding: 8px 10px;
    border: 1px solid #ccc; border-radius: 3px; font-size: 14px; box-sizing: border-box;
}
.fvb-textarea { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 3px; font-size: 14px; resize: vertical; }
.fvb-radio-label { margin-right: 16px; font-size: 14px; }

/* ── 캘린더 ──────────────────────────────────────────────────── */
#fvb-calendar-wrap { max-width: 340px; }
.fvb-cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.fvb-cal-header button { background: none; border: 1px solid #ccc; border-radius: 3px; padding: 4px 10px; cursor: pointer; }
#fvb-cal-title { font-weight: 500; font-size: 15px; }
.fvb-calendar { width: 100%; border-collapse: collapse; text-align: center; }
.fvb-calendar th { padding: 6px 0; font-size: 13px; font-weight: 500; color: #555; }
.fvb-calendar td { padding: 0; }
.fvb-cal-day { padding: 8px 0; cursor: pointer; border-radius: 3px; font-size: 14px; transition: background .15s; }
.fvb-cal-day:hover { background: #e8f5f0; }
.fvb-cal-day.today { border: 2px solid #1a7a5e; font-weight: 600; }
.fvb-cal-day.selected { background: #1a7a5e; color: #fff; font-weight: 600; }
.fvb-cal-day.past.disabled { color: #ddd; cursor: default; pointer-events: none; }
/* 예약 가능 */
.fvb-cal-day.available { color: #1a7a5e; font-weight: 500; }
.fvb-cal-day.available:hover { background: #e8f5f0; }
/* 슬롯 마감 — 클릭 가능, 슬롯 표시 */
.fvb-cal-day.full { color: #b06000; }
.fvb-cal-day.full:hover { background: #fff4e5; }
/* 예약 불가 요일 — 클릭 시 안내 메시지 */
.fvb-cal-day.unavailable { color: #bbb; }
.fvb-cal-day.unavailable:hover { background: #f5f5f5; }
.fvb-unavail-msg { font-size: 13px; color: #888; line-height: 1.7; }
.fvb-cal-empty { }
.fvb-notice-text { margin-top: 8px; font-size: 13px; color: #888; background: #fafafa; padding: 8px; border-left: 3px solid #1a7a5e; }

/* ── 시간 슬롯 ───────────────────────────────────────────────── */
.fvb-slots-label { font-size: 13px; font-weight: 500; color: #555; margin-bottom: 8px; }
#fvb-slots-list { display: flex; flex-wrap: wrap; gap: 8px; }
.fvb-time-chip {
    padding: 7px 14px; border: 1px solid #1a7a5e; border-radius: 20px;
    font-size: 13px; cursor: pointer; color: #1a7a5e; transition: all .15s;
}
.fvb-time-chip.selected { background: #1a7a5e; color: #fff; }
.fvb-time-chip.full { border-color: #ccc; color: #aaa; cursor: not-allowed; background: #f9f9f9; }
.fvb-no-slots { font-size: 13px; color: #999; }
.fvb-slot-notice {
    margin-top: 10px; padding: 10px 14px; font-size: 13px; color: #5a4000;
    background: #fffbea; border: 1px solid #f5d76e; border-radius: 4px; line-height: 1.5;
}
.fvb-cal-loading { text-align: center; padding: 12px; color: #aaa; font-size: 13px; }
.fvb-loading-text { font-size: 13px; color: #aaa; }

/* ── 제출 ────────────────────────────────────────────────────── */
.fvb-form-footer { text-align: right; margin-top: 16px; }
.fvb-btn-submit {
    background: #1a7a5e; color: #fff; border: none; padding: 12px 32px;
    font-size: 15px; font-weight: 500; border-radius: 4px; cursor: pointer;
}
.fvb-btn-submit:disabled { background: #aaa; cursor: not-allowed; }
.fvb-error { color: #c00; background: #fff3f3; border: 1px solid #f5c6c6; padding: 10px 14px; border-radius: 3px; margin-bottom: 10px; font-size: 14px; }
.fvb-loading { text-align: center; padding: 12px; color: #777; font-size: 14px; }

/* ── 예약 확인 ───────────────────────────────────────────────── */
.fvb-confirm-box { background: #e8f5f0; border: 1px solid #9fd9c5; padding: 24px; border-radius: 6px; text-align: center; }
.fvb-confirm-box h3 { color: #1a7a5e; font-size: 20px; margin-bottom: 12px; }

/* ── 내 예약 ─────────────────────────────────────────────────── */
.fvb-my-wrap { max-width: 760px; margin: 0 auto; }
.fvb-my-card { border: 1px solid #e0e0e0; border-radius: 6px; margin-bottom: 16px; overflow: hidden; }
.fvb-my-card-header {
    background: #f7f7f7; padding: 12px 16px;
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.fvb-my-number { font-size: 12px; color: #888; }
.fvb-my-status { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 10px; }
.fvb-my-status.pending   { background: #e8f5f0; color: #1a7a5e; }
.fvb-my-status.completed { background: #e8edf5; color: #2a5095; }
.fvb-my-status.cancelled { background: #f5e8e8; color: #952a2a; }
.fvb-my-status.expired   { background: #f0f0f0; color: #888; }
.fvb-my-type { font-weight: 500; font-size: 14px; }
.fvb-my-datetime { margin-left: auto; font-size: 13px; color: #555; }
.fvb-my-card-body { padding: 14px 16px; }
.fvb-my-field { display: flex; gap: 12px; padding: 5px 0; border-bottom: 1px solid #f0f0f0; font-size: 14px; }
.fvb-my-field:last-child { border-bottom: none; }
.fvb-my-field-label { width: 120px; flex-shrink: 0; color: #888; font-size: 13px; }
.fvb-my-field-value { color: #333; }
.fvb-admin-note .fvb-my-field-label { color: #1a7a5e; }
.fvb-my-card-actions { padding: 10px 16px; background: #fafafa; display: flex; gap: 8px; justify-content: flex-end; }
.fvb-btn-edit   { padding: 6px 16px; border: 1px solid #1a7a5e; color: #1a7a5e; background: #fff; border-radius: 3px; cursor: pointer; font-size: 13px; }
.fvb-btn-change { padding: 6px 16px; border: 1px solid #1a7a5e; color: #1a7a5e; background: #fff; border-radius: 3px; cursor: pointer; font-size: 13px; }
.fvb-btn-cancel { padding: 6px 16px; border: 1px solid #c00; color: #c00; background: #fff; border-radius: 3px; cursor: pointer; font-size: 13px; }
.fvb-btn-change:disabled, .fvb-btn-cancel:disabled { opacity: .5; cursor: default; }

/* ── 예약확인 서브탭 ──────────────────────────────────────── */
.fvb-subtabs { display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 2px solid #e0e0e0; }
.fvb-subtab { background: none; border: none; padding: 8px 16px; font-size: 14px; cursor: pointer; color: #888; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.fvb-subtab.active { color: #1a7a5e; border-bottom-color: #1a7a5e; font-weight: 600; }
.fvb-subtab-cnt { display: inline-block; background: #e0e0e0; color: #555; font-size: 11px; border-radius: 10px; padding: 0 6px; margin-left: 4px; }
.fvb-subtab.active .fvb-subtab-cnt { background: #1a7a5e; color: #fff; }

/* ── 날짜·시간 변경 폼 ────────────────────────────────────── */
.fvb-reschedule-form { border-top: 1px solid #e8e8e8; background: #f9f9f9; }
.fvb-reschedule-inner { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.fvb-reschedule-inner label { font-size: 13px; color: #555; display: flex; align-items: center; gap: 8px; }
.fvb-reschedule-inner input[type="date"] { padding: 4px 8px; border: 1px solid #ccc; border-radius: 3px; font-size: 13px; }
.fvb-reschedule-slot-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.fvb-reschedule-slot-grid .fvb-slot-chip { padding: 5px 12px; border: 1px solid #1a7a5e; border-radius: 20px; font-size: 13px; cursor: pointer; background: #fff; color: #1a7a5e; }
.fvb-reschedule-slot-grid .fvb-slot-chip.selected { background: #1a7a5e; color: #fff; }
.fvb-reschedule-actions { display: flex; gap: 8px; }
.fvb-reschedule-submit { padding: 6px 18px; background: #1a7a5e; color: #fff; border: none; border-radius: 3px; cursor: pointer; font-size: 13px; }
.fvb-reschedule-submit:disabled { opacity: .5; cursor: default; }
.fvb-reschedule-cancel-btn { padding: 6px 14px; border: 1px solid #bbb; background: #fff; color: #555; border-radius: 3px; cursor: pointer; font-size: 13px; }
.fvb-reschedule-field-row { margin-bottom: 10px; }
.fvb-reschedule-field-row label { display: block; font-size: 13px; color: #666; margin-bottom: 4px; }
.fvb-reschedule-field-row input:not([type=radio]):not([type=checkbox]),
.fvb-reschedule-field-row select,
.fvb-reschedule-field-row textarea { width: 100%; padding: 6px 8px; border: 1px solid #ccc; border-radius: 3px; font-size: 13px; box-sizing: border-box; }
.fvb-reschedule-field-row textarea { resize: vertical; min-height: 80px; }
.fvb-reschedule-date-label { font-size: 13px; color: #666; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }

/* ── textarea 말줄임 ──────────────────────────────────────── */
.fvb-expand-btn { background: none; border: none; color: #1a7a5e; font-size: 12px; cursor: pointer; padding: 0 2px; text-decoration: underline; }
.fvb-field-full { white-space: pre-wrap; word-break: break-word; }

/* ── 모달 ────────────────────────────────────────────────────── */
.fvb-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 9998; }
.fvb-modal, .fvb-admin-modal { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 9999; }
.fvb-modal-inner, .fvb-admin-modal-inner {
    background: #fff; border-radius: 6px; padding: 24px; max-width: 640px; width: 94%;
    max-height: 85vh; overflow-y: auto; position: relative;
}
.fvb-modal-close { position: absolute; top: 12px; right: 14px; background: none; border: none; font-size: 22px; cursor: pointer; color: #888; }

@media (max-width: 600px) {
    .fvb-form-table th { width: 100px; font-size: 13px; }
    .fvb-my-card-header { flex-direction: column; align-items: flex-start; }
    .fvb-my-datetime { margin-left: 0; }
}

/* ── 예약확인 탭 ─────────────────────────────────────────────── */
.fvb-empty-bookings {
    padding: 32px 0; text-align: center; color: #888; font-size: 14px;
}

/* ── 초기 숨김 — JS가 show()/hide()로 제어 ───────────────────── */
#fvb-staff          { display: none; margin-top: 8px; }
.fvb-row-datetime   { display: none; }
#fvb-cal-notice     { display: none; }
#fvb-slots-wrap     { display: none; margin-top: 12px; }
#fvb-slot-notice    { display: none; }
#fvb-tab-confirm    { display: none; }
#fvb-loading        { display: none; }
#fvb-form-error     { display: none; }

/* ── 약관 동의 필드 ─────────────────────────────────────────────── */
#fvb-terms-fields {
    margin: 16px 0;
}

.fvb-terms-field {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 12px;
    background: #fafafa;
}

.fvb-terms-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    color: #333;
}

.fvb-terms-body {
    margin-bottom: 10px;
}

.fvb-terms-content {
    max-height: 80px;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.6;
    color: #555;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    padding: 10px 12px;
    white-space: pre-wrap;
    transition: max-height 0.3s ease;
}

.fvb-terms-content.fvb-expanded {
    max-height: 400px;
    overflow-y: auto;
}

.fvb-terms-toggle {
    display: inline-block;
    margin-top: 6px;
    font-size: 12px;
    color: #666;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.fvb-terms-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    color: #333;
}

.fvb-terms-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
    margin: 0;
}
.fvb-field-pre { white-space: pre-wrap; }
