/* 拖拽实时时间/时长提示气泡（appt_drag_time_hint.js，全预约页共用） */
.appt-drag-hint {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 10000;
    pointer-events: none;
    background: rgba(33, 37, 41, 0.92);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8125rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: none;
}

/* 预约日历色块：主标题 + 随宽高显示电话/保险/备注 */
.appt-calendar-blocks .fc-event,
#calendar.appt-calendar-blocks .fc-event {
    cursor: pointer;
    font-weight: normal;
    font-size: 0.75rem;
}
.appt-calendar-blocks .fc-event .appt-event-inner,
#calendar.appt-calendar-blocks .fc-event .appt-event-inner {
    line-height: 1.2;
    overflow: hidden;
}
.appt-calendar-blocks .fc-event .appt-event-main,
#calendar.appt-calendar-blocks .fc-event .appt-event-main {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.appt-event-marks {
    display: inline;
    white-space: nowrap;
    vertical-align: baseline;
}
.appt-event-marks .zi {
    font-size: 0.8125rem;
    line-height: 1;
    vertical-align: -0.08em;
}
.appt-event-marks .zi.appt-mark-pending,
.appt-event-marks .zi.appt-mark-confirmed {
    font-weight: normal;
}
.zi.appt-mark-pending.appt-mark-patient,
.zi.appt-mark-confirmed.appt-mark-patient {
    color: #fff;
}
.appt-mark-pending { color: #e0a800; font-weight: bold; }
.appt-mark-pending.zi { font-weight: normal; }
.appt-mark-confirmed { color: #28a745; font-weight: bold; }
.appt-mark-confirmed.zi { font-weight: normal; }
.appt-list-mark .zi.appt-mark-patient,
.appt-confirm-line .zi.appt-mark-patient,
.text-muted .zi.appt-mark-patient {
    -webkit-text-stroke: 1px rgba(0, 0, 0, 0.4);
    paint-order: stroke fill;
}
.appt-calendar-blocks .fc-event .appt-event-phone,
.appt-calendar-blocks .fc-event .appt-event-note,
.appt-calendar-blocks .fc-event .appt-event-insurance,
#calendar.appt-calendar-blocks .fc-event .appt-event-phone,
#calendar.appt-calendar-blocks .fc-event .appt-event-note,
#calendar.appt-calendar-blocks .fc-event .appt-event-insurance {
    display: none;
    font-size: 0.625rem;
    font-weight: 400;
    line-height: 1.2;
    margin-top: 1px;
    opacity: 0.92;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.appt-calendar-blocks .appt-event-insurance .appt-event-consent-flag,
#calendar.appt-calendar-blocks .appt-event-insurance .appt-event-consent-flag {
    display: inline;
    color: #d81e06;
    font-size: 0.625rem;
    margin-left: 4px;
}
.appt-remind-icons {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-right: 3px;
    vertical-align: middle;
}
.appt-remind-icon {
    font-size: 0.7rem;
    line-height: 1;
}
.appt-remind-success { color: #28a745; }
.appt-remind-pending { color: #e0a800; }
.appt-remind-fail { color: #dc3545; }
.appt-remind-cancelled { color: #6c757d; }
.appt-calendar-blocks .appt-event-inner.appt-event-show-phone .appt-event-phone,
#calendar.appt-calendar-blocks .appt-event-inner.appt-event-show-phone .appt-event-phone {
    display: block;
}
.appt-calendar-blocks .appt-event-inner.appt-event-show-insurance .appt-event-insurance,
#calendar.appt-calendar-blocks .appt-event-inner.appt-event-show-insurance .appt-event-insurance {
    display: block;
}
.appt-calendar-blocks .appt-event-inner.appt-event-show-note .appt-event-note,
#calendar.appt-calendar-blocks .appt-event-inner.appt-event-show-note .appt-event-note {
    display: block;
}
.appt-calendar-blocks .fc-timegrid-event.fc-timegrid-event-short .appt-event-phone,
.appt-calendar-blocks .fc-timegrid-event.fc-timegrid-event-short .appt-event-note,
.appt-calendar-blocks .fc-timegrid-event.fc-timegrid-event-short .appt-event-insurance,
#calendar.appt-calendar-blocks .fc-timegrid-event.fc-timegrid-event-short .appt-event-phone,
#calendar.appt-calendar-blocks .fc-timegrid-event.fc-timegrid-event-short .appt-event-note,
#calendar.appt-calendar-blocks .fc-timegrid-event.fc-timegrid-event-short .appt-event-insurance {
    display: none !important;
}
.fc-event.appt-event-blocked,
.appt-calendar-blocks .fc-event.appt-event-blocked,
#calendar.appt-calendar-blocks .fc-event.appt-event-blocked {
    cursor: default;
}

/* 已过去或正在进行中的预约：保留原色，仅禁用点击/拖动 */
#calendar.appt-inperson-cal .fc-event.appt-event-frozen {
    cursor: default !important;
}
#calendar.appt-calendar-blocks .fc-event.appt-avail-region,
.appt-calendar-blocks .fc-event.appt-avail-region {
    cursor: pointer;
}

/* 日历通用颜色图例 */
.appt-cal-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 18px;
    padding: 8px 4px 4px;
    line-height: 1.4;
}
.appt-cal-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.appt-cal-legend-swatch {
    display: inline-block;
    width: 22px;
    height: 14px;
    border-radius: 3px;
    flex-shrink: 0;
    box-sizing: border-box;
}
.appt-cal-legend-swatch-bh {
    border: 1px solid var(--fc-non-business-color, rgba(0,0,0,0.1));
    background: var(--fc-non-business-bg, rgba(0,0,0,0.03));
}
.appt-cal-legend-swatch-avail {
    border: 1px dashed #28a745;
    background: rgba(40, 167, 69, 0.07);
}
.appt-cal-legend-swatch-room {
    border: 1px solid rgba(0, 0, 0, 0.12);
}
.appt-cal-legend-item .zi {
    font-size: 0.875rem;
    line-height: 1;
}

/* 日历悬浮时间提示气泡 */
#apptSlotHoverTip {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.78);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
    display: none;
    font-variant-numeric: tabular-nums;
}

/* 手机端隐藏日历标题中的日期范围文字 */
@media (max-width: 576px) {
    .fc .fc-toolbar-title {
        display: none !important;
    }
}
