/* //JW 2026/11/07 依回饋修正Figma欄位、行數及手機modal，樣式限定活動頁。 */
#course-member { --course-red:#e60020; color:#333; font-size:14px; }
#course-member [hidden],.course-expanded[hidden],.course-section-body[hidden] { display:none!important; }
#course-member button,#course-member a,.course-modal button { touch-action:manipulation; }
#course-member button:focus-visible,#course-member a:focus-visible,.course-modal button:focus-visible { outline:2px solid #e60020; outline-offset:3px; }
.course-query { margin:32px 0; padding:30px 24px; border-radius:8px; background:#f5f5f5; }
.course-query-grid { display:grid; grid-template-columns:100px minmax(0,1fr) 70px minmax(0,1fr); gap:24px 20px; align-items:center; }
@media(min-width:1400px){
    .course-query-grid { grid-template-columns: minmax(0, 197px) minmax(0, 1fr) minmax(0, 197px) minmax(0, 1fr);}
}
.course-query label { margin:0; font-weight:normal; }
.course-hint { display:block; font-size:12px; color:#777; }
.course-query input:not([type=hidden]),.course-query select { border:1px solid transparent; border-radius:0; background:#fff; padding:8px 10px; min-width:0; width:100%; height:38px; color:#333; }
.course-dates { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); gap:9px; align-items:center; min-width:0; }
.course-date-field { position:relative; min-width:0; }
.course-date-field::before { content:'\f133'; font-family:'Font Awesome 5 Free'; font-weight:400; position:absolute; left:10px; top:8px; color:#555; pointer-events:none; }
.course-query .course-date-field input { padding-left:31px; }
.course-query .v4-mb-search-btn { margin-top:24px; width:100%; background:#e60020; }
.course-message { margin:20px 0; padding:16px 20px; background:#faf3f3; border-left:3px solid #e60020; }
.course-message:empty { display:none; }
.course-order-table,.course-session-table { width:100%; border-collapse:collapse; font-size:13px; }
.course-order-table th,.course-order-table td,.course-session-table th,.course-session-table td { padding:6px 12px; border-bottom:1px solid #cccccc; text-align:center; vertical-align:middle; font-weight:normal; overflow-wrap:break-word; }
.course-order-table td,.course-session-table th,.course-session-table td { padding:20px 12px; border-bottom:1px solid #cccccc; text-align:center; vertical-align:middle; font-weight:normal; overflow-wrap:break-word; }
.course-order-table th,.course-session-table th { background:#F5F5F5; border-top:1px solid #CCCCCC; color:#383838; }
.course-order-table>thead th:nth-child(2) { width:21%; }
.course-order-table>thead th:nth-child(3) { width:19%; }
.course-order-table>thead th:last-child { width:64px; white-space:nowrap; }
#course-member .course-order-link { color:#1875bb; text-decoration:underline; overflow-wrap:anywhere; }
.course-expand,.course-collapse { border:0; border-radius:50%; background:#f5f5f5; width:24px; height:24px; line-height:22px; color:#383838; cursor:pointer; padding:0 0 2px; font-size:18px; flex-shrink:0; }
.course-expanded>td { padding:0 0 16px; background:#f7f7f7; }
.course-session-table { table-layout:fixed; }
.course-session-table th { font-size:12px; padding:10px; line-height:1.6; }
.course-session-table th small { display:block; font-size:inherit; }
.course-session-table td { line-height:1.65; padding:20px 12px; }
.course-session-table th:first-child { width:15%; }
.course-session-table th:nth-child(2) { width:28%; }
.course-session-table th:nth-child(3) { width:25%; }
.course-session-table th:nth-child(4) { width:22%; }
.course-session-table th:last-child { width:10%; }
.course-redemption-cell .course-cell-content { display:flex; min-height:96px; flex-direction:column; justify-content:center; align-items:center; }
.course-qr,.course-qr img,.course-qr canvas { width:96px; height:96px; }
.course-qr { margin:0 auto; flex:0 0 96px; }
.course-redemption-cell .course-muted { text-align:center; }
.course-code { display:inline-block; color:#777; background:#eee; padding:0 5px; border-radius:2px; margin-top:3px; line-height:1.4; overflow-wrap:anywhere; }
.course-calendar { display:block; margin:5px auto 0; padding:0 48px; line-height:21px; border:1px solid #e60020; color:#e60020; font-size:13px; cursor:pointer; white-space:nowrap;border-radius:3px; }
.course-calendar {position: relative;isolation: isolate;overflow: hidden;transition: color 240ms ease, border-color 240ms ease;}
.course-calendar::before {content: "";position: absolute;inset: 0;z-index: -1;background: #e60020;transform: scaleX(0);transform-origin: left center;transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);pointer-events: none;}
@media (hover: hover) and (pointer: fine) {.course-calendar:not(:disabled):hover::before { transform: scaleX(1); }.course-calendar:not(:disabled):hover { color: #fff; }}
.course-calendar:focus-visible::before { transform: scaleX(1); }
.course-calendar:focus-visible { color: #fff; }
course-calendar:disabled {border-color: #ccc;color: #999;cursor: not-allowed;}
@media (prefers-reduced-motion: reduce) {.course-calendar,.course-calendar::before { transition: none !important; }}
.course-muted { color:#777; display:block; font-size:12px; line-height:1.6; }
.course-order-table .course-empty { padding:50px 15px; color:#777; }
.course-toolbar { display:flex; justify-content:flex-end; margin:10px 0 28px; }
#course-member .course-back,.course-modal .course-back { display:inline-block; border:1px solid #ddd; padding:8px 20px; border-radius:22px; color:#555; background:#fff; text-decoration:none; cursor:pointer; }
#course-member .course-toolbar .course-back { background:#e60020; color:#fff; border-color:#e60020; }
.course-section { margin:28px 0 40px; }
.course-section-heading { display:flex; align-items:center; justify-content:space-between; gap:15px; border-bottom:1px solid #ed8794; padding-bottom:12px; margin-bottom:16px; }
.course-section-heading h2 { font-size:21px; font-weight:500; margin:0; line-height:1.5; }
.course-order-number { color:#e60020; margin-left:15px; font-size:18px; overflow-wrap:anywhere; }
.course-info-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:0 40px; margin:0; }
.course-info-item { display:flex; align-items:baseline; min-height:42px; padding:11px 8px; border-bottom:1px dashed #ccc; gap:16px; }
.course-info-item dt { color:#777; font-size:13px; font-weight:normal; flex:0 0 80px; }
.course-info-item dd { margin:0; min-width:0; overflow-wrap:anywhere; }
.course-cancel-copy { font-size:12px; line-height:1.7; }
.course-cancel-copy a { color:#1875bb; }
.course-small-button,.course-primary { display:inline-block; padding:5px 15px; border:0; border-radius:3px; background:#e60020; color:#fff; cursor:pointer; font-size:12px; margin:0; white-space:nowrap; }
.course-small-button:disabled { color:#fff; background:#d0343d; cursor:not-allowed; opacity:1; }
.course-order-status .course-retry { margin-top:5px; }
.course-total { display:flex; justify-content:flex-end; gap:25px; margin-top:22px; font-size:13px; }
.course-total strong { color:#e60020; font-weight:normal; }
/* //JW 2026/11/07 共用modal含825px最小寬及下移50px，活動視窗須限定覆寫才能在viewport真正置中。 */
.course-modal .modal-dialog { min-width:0!important; width:calc(100% - 32px); max-width:540px!important; margin:20px auto!important; min-height:calc(100% - 40px); transform:none!important; }
.course-modal .modal-content { width:100%; border:0; border-radius:6px; max-height:calc(100vh - 40px); overflow:hidden; color:#333; background:#fff; }
.course-modal-heading { position:relative; flex:0 0 auto; text-align:center; padding:24px 44px 16px; }
.course-modal-heading h2 { font-size:21px; margin:0; color:#222; line-height:1.5; }
.course-modal-close { position:absolute; top:12px; right:12px; width:28px; height:28px; line-height:24px; font-size:26px; background:#111; color:white; border:0; padding:0; cursor:pointer; }
.course-modal-body { padding:0 24px 24px; overflow-y:auto; min-height:0; }
.course-modal form p { font-size:14px; line-height:1.7; }
.course-modal label { display:block; margin:16px 0; font-size:14px; }
.course-modal textarea,.course-modal select { display:block; width:100%; margin-top:8px; padding:10px; border:1px solid #ccc; }
.course-modal .course-agree { display:flex; gap:10px; align-items:flex-start; }
/* //JW 2026/11/07 全域checkbox偽元素top:-15px使確認框上移，只在活動視窗還原原生核取框。 */
.course-modal .course-agree input[type=checkbox] { appearance:auto; -webkit-appearance:checkbox; position:static; float:none; margin:3px 0 0; width:18px; height:18px; flex:0 0 18px; }
.course-modal .course-agree input[type=checkbox]::after { display:none; }
.course-modal .course-agree span { flex:1; min-width:0; line-height:1.6; }
.course-dialog-actions { display:flex; justify-content:flex-end; gap:15px; }
.course-modal .course-primary { border-radius:22px; padding:8px 20px; font-size:14px; }
.course-modal .course-primary:disabled { background:#999; }
.course-error { color:#c90020; font-size:14px; }
.course-modal-fallback { position:fixed; inset:0; z-index:1050; display:flex!important; align-items:center; justify-content:center; background:#0007; opacity:1!important; }
.course-modal-fallback .modal-dialog { width:540px; min-height:0; }
.course-modal-open { overflow:hidden; }
@media(max-width:991px) {
.course-query-grid { grid-template-columns:80px minmax(0,1fr); gap:18px 14px; }
.course-query { padding:24px; }
.course-info-grid { gap:0 20px; }
}
@media(max-width:767px) {
#course-member { font-size:13px; }
.course-query { margin:24px 0; padding:20px 16px; }
.course-query-grid { grid-template-columns:1fr; gap:9px; }
.course-query-grid>label { margin-top:6px; }
.course-hint { display:inline; }
.course-order-table,.course-order-table>tbody { display:block; }
.course-order-table>thead { display:none; }
.course-order-row { display:block; margin:0 0 20px; padding:18px 16px; border:1px solid #ccc; border-radius:8px; }
.course-order-table .course-order-row>td { display:flex; align-items:flex-start; gap:10px; border:0; padding:6px 0; text-align:left; min-width:0; }
.course-order-row>td::before { content:attr(data-label); width:66px; flex:0 0 66px; font-size:12px; color:#8B8B8B; line-height:1.7; }
.course-order-row>td:nth-child(2),.course-order-row>td:nth-child(3) { overflow-wrap:anywhere; }
.course-order-row>td:nth-child(5) { flex-wrap:wrap; column-gap:10px; row-gap:0; }
.course-order-row>td:nth-child(5) small { display:block; margin-left:76px; width:calc(100% - 76px); }
.course-order-status .course-status-text { flex:1; min-width:0; }
.course-order-status .course-retry { align-self:center; margin:0; padding:8px 12px; }
.course-order-row>td:last-child { align-items:center; }
.course-order-row>td:last-child .course-expand { margin-left:0; }
.course-order-table>tbody>tr.course-expanded { display:none; }
.course-order-table .course-empty { display:block; }
.course-info-grid { grid-template-columns:1fr; }
.course-info-item { padding:10px 0; gap:14px; }
.course-info-item dt { flex-basis:75px; font-size:12px; }
.course-section-heading h2 { font-size:18px; }
.course-order-number { margin-left:8px; font-size:14px; }
.course-total { flex-wrap:wrap; font-size:12px; gap:15px; }
.course-modal .modal-dialog { max-width:calc(100% - 32px)!important; margin:16px auto!important; min-height:calc(100% - 32px); }
.course-modal .modal-content { max-height:calc(100vh - 32px); border-radius:0; }
.course-modal-heading { padding:24px 40px 14px; }
.course-modal-heading h2 { font-size:18px; }
.course-modal-body { padding:0 12px 18px; }
.course-session-table,.course-session-table tbody { display:block; }
.course-session-table thead { display:none; }
.course-session-table tr { display:block; background:#f5f5f5; border:0; border-radius:5px; padding:14px 12px; margin-bottom:16px; }
.course-session-table td { display:grid; grid-template-columns:58px minmax(0,1fr); gap:8px; border:0; border-bottom:1px solid #ddd; padding:12px 0; text-align:left; font-size:12px; }
.course-session-table td::before { content:attr(data-label); white-space:pre-line; font-size:11px; color:#888; align-self:center; }
.course-session-table .course-redemption-cell { padding-top:0; }
.course-redemption-cell .course-cell-content { min-height:96px; align-items:flex-start; }
.course-qr { margin-left:0; }
.course-session-table td:last-child { border:0; padding-bottom:0; }
.course-session-name .course-code { font-size:10px; }
.course-session-when .course-cell-content { display:flex; align-items:center; gap:8px; }
.course-session-when .course-time-text { flex:1; }
.course-session-when .course-calendar { margin:0; padding:3px 12px; font-size:13px; display:flex;align-items:center;}
}
