/**
 * 全系統通用 Material Design 原裝時鐘選擇器樣式 (SysTimePicker)
 * 維持原裝經典架構，顏色統一採用系統主題配色 (天藍 / 蔚藍 primary)
 */
.sys-clock-picker {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100010;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sys-clock-picker.active {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

/* 背景半透明遮罩 */
.sys-clock-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.54);
}

/* 彈窗主體卡片 */
.sys-clock-dialog {
    position: relative;
    width: 290px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    transform: scale(0.92);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.sys-clock-picker.active .sys-clock-dialog {
    transform: scale(1);
}

/* 頂部 Header：統一採用系統主色 (天藍 / 蔚藍) */
.sys-clock-header {
    background: linear-gradient(135deg, #0284c7, #0ea5e9);
    color: #ffffff;
    padding: 18px 24px;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}

.sys-clock-digit {
    font-size: 3rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65);
    cursor: pointer;
    line-height: 1;
    transition: color 0.15s ease;
    padding: 0 4px;
}

.sys-clock-digit:hover {
    color: rgba(255, 255, 255, 0.9);
}

.sys-clock-digit.active {
    color: #ffffff;
    font-weight: 600;
}

.sys-clock-colon {
    font-size: 2.6rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1;
}

.sys-clock-ampm-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-left: 10px;
}

.sys-clock-ampm-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    transition: all 0.15s;
    text-align: left;
}

.sys-clock-ampm-btn.active {
    color: #ffffff;
}

/* 圓盤主體區 */
.sys-clock-body {
    padding: 20px;
    background: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 圓盤底座：清爽淺灰底 (Slate 100) */
.sys-clock-plate {
    position: relative;
    width: 250px;
    height: 250px;
    background: #f1f5f9;
    border-radius: 50%;
    touch-action: none;
}

/* 圓心樞軸點：系統主色 */
.sys-clock-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: #0284c7;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
}

/* 指針 (Hand)：長度精準對齊刻度半徑 95px，中心軸完美校正 */
.sys-clock-hand {
    position: absolute;
    bottom: 50%;
    left: calc(50% - 1px);
    width: 2px;
    height: 95px;
    background: #0284c7;
    transform-origin: center bottom;
    z-index: 4;
    pointer-events: none;
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 指針端點圓圈：正中心與指針頂端重合，精準套在刻度數字上 */
.sys-clock-hand-end {
    position: absolute;
    top: -16px;
    left: 1px;
    width: 32px;
    height: 32px;
    background: #0284c7;
    border-radius: 50%;
    transform: translateX(-50%);
}

/* 刻度數字 */
.sys-clock-ticks {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.sys-clock-tick {
    position: absolute;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.92rem;
    font-weight: 500;
    color: #334155;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    transition: color 0.15s ease;
    transform: translate(-50%, -50%);
    z-index: 6;
}

.sys-clock-tick:hover {
    color: #0f172a;
}

.sys-clock-tick.active {
    color: #ffffff !important;
    font-weight: 600;
}

/* 底部按鈕欄：統一採用系統色調 */
.sys-clock-footer {
    padding: 10px 16px 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
}

.sys-clock-btn {
    background: transparent;
    border: none;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s ease;
    color: #0284c7;
    letter-spacing: 0.5px;
}

.sys-clock-btn:hover {
    background: rgba(2, 132, 199, 0.08);
}

.sys-clock-btn.cancel {
    color: #64748b;
}

.sys-clock-btn.cancel:hover {
    background: rgba(100, 116, 139, 0.08);
}

.sys-clock-btn.clear {
    color: #ef4444;
}

.sys-clock-btn.clear:hover {
    background: rgba(239, 68, 68, 0.08);
}
