/* IPhealth Reservation System - redesigned booking UI */

.iphealth-reservation-wrapper,
.iphealth-dashboard {
    max-width: 1480px;
    margin: 20px auto;
    padding: 0 16px;
    box-sizing: border-box;
}

.iphealth-booking-shell {
    display: flex;
    min-height: 760px;
    background: #f2f4f8;
    border: 1px solid #dfe3ea;
    border-radius: 10px;
    overflow: hidden;
}

.iphealth-booking-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: #f0f2f6;
}

.iphealth-booking-header {
    padding: 26px 36px;
    border-bottom: 1px solid #d8dde6;
    background: #f9fafc;
}

.iphealth-booking-header h2 {
    margin: 0;
    font-size: 26px; /* 右侧主标题：26px */
    line-height: 1.15;
    color: #1f2329;
    font-weight: 700;
}

#iphealth-reservation-form {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.iphealth-step {
    display: none;
    margin: 0;
    padding: 26px 34px;
    border: none;
    border-radius: 0;
    background: transparent;
    flex: 1;
    overflow-y: auto;
}

.iphealth-step.is-active {
    display: block;
}

.iphealth-step h3 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 26px; /* 每一步的小标题：26px */
    color: #20242a;
}

.iphealth-grid {
    display: grid;
    gap: 18px;
}

.iphealth-grid-span-2 {
    grid-column: span 2;
}

.iphealth-date-picker-wide {
    width: 100%;
}

.iphealth-date-field {
    position: relative;
    width: 100%;
}

.iphealth-date-native {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
    pointer-events: none;
}

.iphealth-date-display {
    position: relative;
    z-index: 2;
    cursor: pointer;
}


.iphealth-flatpickr-wide {
    width: 630px !important;
    box-sizing: border-box;
}

.iphealth-flatpickr-wide .flatpickr-months,
.iphealth-flatpickr-wide .flatpickr-month,
.iphealth-flatpickr-wide .flatpickr-weekdays,
.iphealth-flatpickr-wide .flatpickr-weekdaycontainer,
.iphealth-flatpickr-wide .flatpickr-days,
.iphealth-flatpickr-wide .dayContainer,
.iphealth-flatpickr-wide .flatpickr-rContainer,
.iphealth-flatpickr-wide .flatpickr-innerContainer,
.iphealth-flatpickr-wide .flatpickr-weekdaysContainer {
    width: 100% !important;
    box-sizing: border-box;
}

.iphealth-flatpickr-wide .flatpickr-month {
    flex: 1 1 0;
}

.iphealth-flatpickr-wide .flatpickr-months,
.iphealth-flatpickr-wide .flatpickr-weekdays,
.iphealth-flatpickr-wide .flatpickr-days,
.iphealth-flatpickr-wide .flatpickr-innerContainer,
.iphealth-flatpickr-wide .flatpickr-rContainer {
    width: 100% !important;
    max-width: 630px;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

.iphealth-flatpickr-wide .flatpickr-months {
    justify-content: space-between;
}

.iphealth-flatpickr-wide .flatpickr-month {
    width: 100% !important;
    flex: 1 1 0;
}

.iphealth-flatpickr-wide .flatpickr-weekdaycontainer,
.iphealth-flatpickr-wide .dayContainer {
    width: 100% !important;
    padding: 0 14px;
    margin: 0;
    display: flex;
    justify-content: space-between;
    box-sizing: border-box;
}

.iphealth-flatpickr-wide .flatpickr-weekdays,
.iphealth-flatpickr-wide .flatpickr-days {
    padding: 0;
    margin: 0;
}

.iphealth-flatpickr-wide .flatpickr-weekday,
.iphealth-flatpickr-wide .flatpickr-day {
    max-width: none;
    width: calc(100% / 7);
    flex: 0 0 calc(100% / 7);
}

.iphealth-flatpickr-wide .flatpickr-prev-month,
.iphealth-flatpickr-wide .flatpickr-next-month {
    top: 12px;
}

.iphealth-flatpickr-wide .flatpickr-prev-month {
    left: 14px;
}

.iphealth-flatpickr-wide .flatpickr-next-month {
    right: 14px;
}

.iphealth-reservation-wrapper #insurance_gender,
.iphealth-reservation-wrapper #relation_to_patient {
    font-size: 16px;
    background-size: 12px 24px;
}


/* 第四步医生选择：纵向列表 */
.iphealth-doctor-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.iphealth-select-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.iphealth-select-card {
    position: relative;
    display: block;
}

.iphealth-card-body {
    display: flex;
    flex-direction: column;
    min-height: 290px;
    border: 1px solid #dce1e7;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    cursor: pointer;
    transition: all .2s ease;
}

.iphealth-card-cover {
    height: 140px;
    background-color: #fff;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

.iphealth-card-cover-placeholder {
    background-image: linear-gradient(135deg, #f3f5f9 0%, #e8edf5 100%);
}

.iphealth-card-content {
    display: block;
    padding: 14px 16px 18px;
    text-align: center;
}

.iphealth-card-content strong {
    display: block;
    font-size: 22px; /* 诊所/服务/医生等主要内容：22px */
    color: #242a31;
    line-height: 1.3;
}

.iphealth-card-content small {
    display: block;
    margin-top: 6px;
    color: #808b97;
    font-size: 22px; /* 辅助说明统一为 22px */
    line-height: 1.3;
}

.iphealth-select-card input[type="radio"]:checked + .iphealth-card-body {
    border-color: #5b6fed;
    box-shadow: 0 0 0 2px rgba(91, 111, 237, 0.2);
    transform: translateY(-1px);
}

.iphealth-extras-grid {
    align-items: stretch;
}

.iphealth-checkbox-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 14px 16px;
    border: 1px solid #d4dbe6;
    border-radius: 8px;
    background: #fff;
    color: #2a3038;
    font-size: 22px; /* 复选内容也视为主要内容：22px */
    box-sizing: border-box;
}

.iphealth-checkbox-card input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
}

.iphealth-field-label {
    display: block;
    margin-bottom: 8px;
    color: #333a44;
    font-size: 22px; /* 表单标签：22px */
    font-weight: 600;
}

.iphealth-reservation-wrapper select,
.iphealth-reservation-wrapper input[type="text"],
.iphealth-reservation-wrapper input[type="email"],
.iphealth-reservation-wrapper input[type="datetime-local"],
.iphealth-reservation-wrapper input[type="date"],
.iphealth-reservation-wrapper textarea {
    width: 100%;
    max-width: 100%;
    padding: 11px 12px;
    border-radius: 8px;
    border: 1px solid #d3dae4;
    background: #fff;
    box-sizing: border-box;
    font-size: 22px; /* 输入内容：22px */
}

.iphealth-step-5 input[type="text"],
.iphealth-step-5 input[type="email"] {
    padding-top: 16px;
    padding-bottom: 16px;
}

.iphealth-reservation-wrapper select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

#iphealth-insurance-fields select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='M4 7l6 6 6-6' stroke='%236b7280' stroke-width='2.4' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat;
    background-size: 20px 20px !important;
    background-position: left 16px center !important;
    padding-left: 54px;
    padding-right: 16px;
    background-color: #fff;
    background-clip: padding-box;
}

#iphealth-insurance-fields select::-ms-expand {
    display: none;
}

#iphealth-insurance-fields select::-webkit-calendar-picker-indicator {
    display: none;
}



.iphealth-reservation-wrapper .iphealth-input-invalid {
    border-color: #dc2626;
}

.iphealth-reservation-wrapper .iphealth-input-error {
    margin-top: 6px;
    font-size: 14px;
    color: #dc2626;
}

.iphealth-paypal-fields {
    margin-top: 18px;
    display: none;
}

.iphealth-paypal-fields.iphealth-paypal-ready .iphealth-paypal-error {
    display: block;
}

.iphealth-paypal-card {
    background: #fff;
    border: 1px solid #dfe3ea;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(18, 28, 45, 0.08);
}

.iphealth-paypal-header {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1f2329;
}

.iphealth-paypal-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.iphealth-paypal-option {
    border: 1px solid #e3e7ef;
    border-radius: 10px;
    padding: 12px;
    background: #f8f9fc;
}

.iphealth-paypal-option-label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1f2329;
}

.iphealth-paypal-button {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.iphealth-paypal-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    color: #8a94a6;
    font-size: 16px;
}

.iphealth-paypal-divider::before,
.iphealth-paypal-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e3e7ef;
}

.iphealth-paypal-card-fields {
    display: grid;
    gap: 12px;
}

.iphealth-card-field {
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid #d3dae4;
    border-radius: 8px;
    background: #fff;
}

.iphealth-card-submit {
    width: 100%;
}

.iphealth-paypal-error {
    margin-top: 6px;
    color: #d14343;
    font-size: 14px;
    display: none;
}

.iphealth-visually-hidden {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
}

.iphealth-time-wheel {
    position: relative;
    height: 340px;
    border: 1px solid #d3dae4;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.iphealth-time-wheels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.iphealth-time-slots {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 340px;
    overflow-y: auto;
    padding-right: 30px; /* 留出右侧滚动条空间，避免遮挡文字 */
}

/* 自定义时间段列表右侧滚动条样式（PC + 支持的手机浏览器） */
.iphealth-time-slots {
    scrollbar-width: thin;
    scrollbar-color: #74AFF6 rgba(0, 0, 0, 0.04);
}

.iphealth-time-slots::-webkit-scrollbar {
    width: 30px;
}

.iphealth-time-slots::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 999px;
}

.iphealth-time-slots::-webkit-scrollbar-thumb {
    background-color: #74AFF6;
    border-radius: 999px;
    border: 8px solid transparent;
    background-clip: content-box;
}

.iphealth-time-slot {
    display: block;
}

.iphealth-time-slot input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.iphealth-time-slot-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    box-sizing: border-box;
    min-height: 70px;
    transition: all .15s ease;
}

.iphealth-time-slot-body span:first-child {
    font-weight: 700;
}

.iphealth-time-slot-body span:last-child {
    margin-top: 4px;
}

.iphealth-time-slot input[type="radio"]:checked + .iphealth-time-slot-body {
    box-shadow: 0 0 0 2px transparent;
}

.iphealth-wheel-list {
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: y mandatory;
    padding: 90px 0; /* allow center highlight */
    box-sizing: border-box;
}

.iphealth-wheel-item {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px; /* 时间滚轮项：22px */
    color: #4a5564;
    scroll-snap-align: center;
    cursor: pointer;
    user-select: none;
}

.iphealth-wheel-item.is-selected {
    font-size: 22px;
    font-weight: 700;
    color: #1f2329;
}

.iphealth-wheel-highlight {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 50%;
    height: 44px;
    transform: translateY(-50%);
    border-radius: 10px;
    background: rgba(91, 111, 237, 0.10);
    outline: 2px solid rgba(91, 111, 237, 0.18);
    pointer-events: none;
}

.iphealth-time-hint {
    margin: 10px 0 0;
    color: #6b7786;
    font-size: 18px; /* 时间下方提示：18px */
}

.iphealth-calendar {
    background: #fff;
    border: 1px solid #d3dae4;
    border-radius: 12px;
    overflow: hidden;
}

.iphealth-calendar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid #eef1f6;
}

.iphealth-cal-title {
    font-weight: 700;
    color: #1f2329;
}

.iphealth-cal-nav {
    border: 1px solid #d3dae4;
    background: #fff;
    border-radius: 10px;
    width: 40px;
    height: 34px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px; /* 箭头再加大一倍（从32px到64px） */
    line-height: 1;
}

.iphealth-cal-week {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0;
    padding: 10px 10px 6px;
    color: #6b7786;
    font-size: 12px;
    font-weight: 600;
}

.iphealth-cal-week span {
    text-align: center;
}

.iphealth-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
}

.iphealth-cal-day {
    border: 1px solid transparent;
    background: transparent !important;
    border-radius: 10px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    font-weight: 600;
    min-width: 0;
    box-sizing: border-box;
}

.iphealth-cal-day.is-out {
    opacity: 0.35;
}

.iphealth-cal-day.is-past {
    background: #e3e7ef !important;
    color: #9aa3af;
    border-color: #d0d6e0;
    cursor: not-allowed;
}

.iphealth-cal-day.is-past:hover {
    box-shadow: none;
}

.iphealth-cal-day.is-selected {
    box-shadow: 0 0 0 2px transparent;
}

.iphealth-notice {
    margin: 12px 34px 18px;
    padding: 16px;
    border: 1px solid #c8d7ff;
    background: #eef4ff;
    border-radius: 10px;
}

.iphealth-notice.iphealth-summary-card {
    background: #fff;
    border-color: #dce1e7;
}

.iphealth-notice-actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.iphealth-btn-secondary {
    background: #6b7280;
}

.iphealth-payment-block {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 20px 0;
}

.iphealth-payment-block label {
    font-size: 15px;
    color: #2a3038;
}

#iphealth-insurance-fields {
    margin-top: 4px;
}

#iphealth-insurance-fields input[type="text"],
#iphealth-insurance-fields input[type="email"],
#iphealth-insurance-fields input[type="date"],
#iphealth-insurance-fields select,
#iphealth-insurance-fields textarea {
    height: 70px;
}

.iphealth-summary-card {
    background: #fff;
    border: 1px solid #dce1e7;
    border-radius: 10px;
    padding: 16px;
}

.iphealth-summary-card p {
    font-size: 18px; /* 右侧底部说明文案：18px */
}

#iphealth-signature-pad {
    width: 100%;
    height: 190px;
    background: #fff;
    border: 1px dashed #cfd7e3;
    border-radius: 8px;
}

.iphealth-sign-actions {
    margin-top: 12px;
}

#iphealth-signature-clear {
    padding: 8px 12px;
    border: 1px solid #d3dae4;
    background: #fff;
    color: #333a44;
    border-radius: 8px;
    cursor: pointer;
}

.iphealth-step-actions {
    border-top: 1px solid #d8dde6;
    background: #f9fafc;
    padding: 16px 34px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.iphealth-list-pagination {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}

.iphealth-list-pagination .iphealth-page-btn {
    border: 1px solid #d3dae4;
    background: #fff;
    color: #1f2329;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
}

.iphealth-list-pagination .iphealth-page-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.iphealth-list-pagination .iphealth-page-indicator {
    font-size: 16px;
    color: #6b7280;
}

.iphealth-btn {
    border: none;
    border-radius: 999px;
    line-height: 1;
    cursor: pointer;
}

.iphealth-btn-secondary,
.iphealth-btn-primary,
.iphealth-btn-submit,
.iphealth-copy-submit {
    background: #0057B8;
    color: #fff;
    border: none;
}

.iphealth-btn-submit,
.iphealth-btn-submit-legacy {
    display: none;
}

.iphealth-empty {
    margin: 0;
    padding: 12px;
}

.iphealth-step-7 {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.iphealth-confirm-success-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.iphealth-confirm-success-icon {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: #19c37d;
    color: #fff;
    font-size: 36px;
    line-height: 66px;
    text-align: center;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(25, 195, 125, 0.28);
}

.iphealth-step-7 h3 {
    margin: 0;
    font-size: 28px;
    text-align: center;
}

#iphealth-confirmation-card {
    width: 100%;
    max-width: none;
    border-radius: 14px;
    padding: 16px 18px;
    box-sizing: border-box;
}

.iphealth-confirm-row {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #eef1f6;
}

.iphealth-confirm-row:last-child {
    border-bottom: none;
}

.iphealth-confirm-row strong {
    color: #253040;
    white-space: nowrap;
}

.iphealth-confirm-row span {
    color: #4b5566;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.iphealth-confirm-divider {
    height: 1px;
    background: #e4e9f2;
    margin: 14px 0 16px;
}

.iphealth-confirm-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.iphealth-confirm-submit-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
}

.iphealth-confirm-link-row {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: nowrap;
}

.iphealth-confirm-actions .iphealth-btn {
    width: 300px;
    height: 70px;
    max-width: 100%;
    margin: 0;
    text-align: center;
    text-decoration: none;
    border-radius: 999px;
    padding: 0 18px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* 登录弹窗（用于未登录用户在第 5 步显示 ARMember 登录窗） */
.iphealth-login-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.iphealth-login-modal.is-open {
    display: flex;
}

.iphealth-login-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.iphealth-login-dialog {
    position: relative;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.35);
    padding: 24px;
    z-index: 1;
}

.iphealth-login-close {
    position: absolute;
    top: 10px;
    right: 14px;
    border: none;
    background: transparent;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.iphealth-offline-pay {
    display: flex;
    justify-content: center;
    padding: 40px 16px;
}

.iphealth-offline-pay-card {
    width: 100%;
    max-width: 720px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 28px 30px 34px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.iphealth-offline-pay-header h2 {
    margin: 0;
    font-size: 22px;
    color: #0f172a;
}

.iphealth-offline-pay-header p {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 14px;
}

.iphealth-offline-pay-alert {
    margin: 18px 0;
    padding: 12px 14px;
    background: #fee2e2;
    color: #b91c1c;
    border-radius: 10px;
    font-size: 14px;
}

.iphealth-offline-pay-form {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.iphealth-offline-fee-tip {
    margin: -6px 0 4px;
    font-size: 13px;
    color: #6b7280;
}

.iphealth-offline-label {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.iphealth-offline-input {
    height: 46px;
    border-radius: 10px;
    border: 1px solid #cbd5f5;
    background: #fff;
    padding: 0 12px;
    font-size: 15px;
}

.iphealth-offline-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.iphealth-offline-card-placeholder {
    height: 52px;
    border-radius: 10px;
    border: 1px solid #cbd5f5;
    background: #fff;
    display: flex;
    align-items: center;
    padding: 0 12px;
    color: #94a3b8;
}

.iphealth-offline-wallets {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}

.iphealth-offline-wallet {
    min-height: 44px;
}

.iphealth-offline-stripe-btn {
    margin-top: 12px;
    height: 52px;
    border-radius: 10px;
    border: none;
    background: #635BFF;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
}

.iphealth-offline-stripe-btn:hover {
    background: #4f46e5;
}

@media (max-width: 600px) {
    .iphealth-offline-pay-card {
        padding: 24px 20px;
    }

    .iphealth-offline-row {
        grid-template-columns: 1fr;
    }
}
