/* Online checkout: member page, result page and the admin payment list. */
.checkout .checkout-kinds{display:flex;gap:.5rem;margin:0 0 1rem;flex-wrap:wrap}
.checkout .checkout-kind{border:1px solid rgba(148,163,184,.4);color:inherit;min-height:44px;padding:.5rem 1rem}
.checkout .checkout-kind.active{background:#0a7a3c;border-color:#0a7a3c;color:#fff;font-weight:600}
.checkout-list{list-style:none;margin:0;padding:0;display:grid;gap:.5rem}
.checkout-row{display:flex;align-items:center;justify-content:space-between;gap:.75rem;flex-wrap:wrap;padding:.75rem;border:1px solid rgba(148,163,184,.3);border-radius:.5rem}
.checkout-row.selected{border-color:#2fbf71}
.checkout-pick{display:flex;align-items:center;gap:.75rem;margin:0;min-width:0;flex:1 1 14rem;cursor:pointer}
.checkout-pick input{flex:none;width:1.25rem;height:1.25rem;margin:0}
.checkout-pick>span{display:flex;flex-direction:column;min-width:0}
.checkout-pick small{opacity:.75;overflow-wrap:anywhere}
.checkout-title{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}
/* Renewal list: colour follows how near the lease end is, so a lease that does not need renewing yet is not picked by
   mistake. Every mark also says it in words; colour is never the only cue. */
.checkout-due{display:inline-block;padding:.1rem .55rem;border:1px solid transparent;border-radius:1rem;font-size:.8rem;font-weight:600;white-space:nowrap;font-variant-numeric:tabular-nums}
.checkout-due-overdue{background:rgba(239,68,68,.22);border-color:rgba(239,68,68,.6);color:#fecaca}
.checkout-due-urgent{background:rgba(249,115,22,.22);border-color:rgba(249,115,22,.6);color:#fed7aa}
.checkout-due-soon{background:rgba(234,179,8,.2);border-color:rgba(234,179,8,.55);color:#fef08a}
.checkout-due-normal{background:rgba(148,163,184,.18)}
.checkout-due-far{border-color:rgba(148,163,184,.4);font-weight:400}
.checkout-row-due{border-left-width:4px}
.checkout-row.checkout-row-overdue{border-left-color:#ef4444}
.checkout-row.checkout-row-urgent{border-left-color:#f97316}
.checkout-row.checkout-row-soon{border-left-color:#eab308}
.checkout-row-far:not(.selected) .checkout-pick{opacity:.6}
.checkout-far-note{flex:1 1 100%;margin:0;padding:.4rem .6rem;border-radius:.375rem;background:rgba(245,158,11,.12);font-size:.875rem}
.checkout-choice{flex:0 1 15rem;min-width:11rem}
.checkout-choice .form-select{min-height:44px}
.checkout-note,.checkout-hint,.checkout-empty,.checkout-sort{font-size:.875rem;opacity:.8}
.checkout-hint{margin:.75rem 0 0}
.checkout-empty,.checkout-sort{margin:0 0 .5rem}
.checkout-summary{width:100%;border-collapse:collapse}
.checkout-summary th,.checkout-summary td{padding:.5rem .25rem;border-bottom:1px solid rgba(148,163,184,.25);font-weight:400;font-variant-numeric:tabular-nums}
.checkout-summary tfoot th,.checkout-summary tfoot td{border-bottom:0;font-weight:600}
.checkout-total{font-size:1.25rem}
.checkout-agree{margin:1rem 0;display:flex;gap:.5rem;align-items:flex-start;padding-left:0}
.checkout-agree .form-check-input{flex:none;width:1.25rem;height:1.25rem;margin:.15rem 0 0}
.checkout-agree a,.checkout-merchant a,.checkout-waiver a{text-decoration:underline}
.checkout-agree+.checkout-agree{margin-top:-.25rem}
/* Must stay conspicuous: this notice is what excludes the seven-day withdrawal right. */
.checkout-waiver{margin:1rem 0 0;padding:.75rem 1rem;border:1px solid #f59e0b;border-left-width:4px;border-radius:.5rem;background:rgba(245,158,11,.1)}
.checkout-waiver>strong{display:block;font-size:1rem;margin-bottom:.25rem}
.checkout-waiver p{margin:0;font-size:.9rem;line-height:1.7}
/* Darker than the LINE brand green so white text keeps a 4.5:1 contrast; scoped to beat the member button defaults. */
.member-reservations .checkout-pay{background:#0a7a3c;border-color:#0a7a3c;color:#fff;font-weight:600;min-height:44px;padding:.6rem 1.25rem}
.member-reservations .checkout-pay:hover:not(:disabled),.member-reservations .checkout-pay:focus-visible{background:#0c8f46;color:#fff}
.member-reservations .checkout-pay:disabled{background:#3b424c;border-color:#3b424c;color:#c0c6ce;opacity:1}
.checkout-merchant{margin-top:1.5rem;padding:1rem;border:1px solid rgba(148,163,184,.3);border-radius:.5rem}
.checkout-merchant h2{font-size:1rem;margin:0 0 .5rem}
.checkout-merchant dl{display:grid;grid-template-columns:max-content 1fr;gap:.25rem 1rem;margin:0 0 .5rem}
.checkout-merchant dt{font-weight:400;opacity:.75}
.checkout-merchant dd{margin:0}
.checkout-status-fulfilled{background:rgba(6,199,85,.18)}
.checkout-status-review,.checkout-status-uncertain,.checkout-status-confirming,.checkout-status-paid{background:rgba(245,158,11,.22)}
.checkout-status-cancelled,.checkout-status-expired,.checkout-status-failed,.checkout-status-refunded{background:rgba(148,163,184,.22)}

.checkout-result{max-width:32rem;margin:10vh auto;padding:1.5rem;text-align:center;line-height:1.7}
.checkout-result h1{font-size:1.5rem;margin:1rem 0 .5rem}
.checkout-result .checkout-result-icon{font-size:3rem;line-height:1}
.checkout-result .checkout-result-amount{font-variant-numeric:tabular-nums;font-weight:600}
.checkout-result .checkout-result-actions{display:flex;gap:.75rem;justify-content:center;flex-wrap:wrap;margin-top:1.5rem}
.checkout-result .btn{min-height:44px}

.checkout-legal{max-width:44rem;margin:0 auto;padding:2rem 1rem;line-height:1.8}
.checkout-legal h1{font-size:1.5rem}
.checkout-legal .checkout-legal-date{opacity:.7;font-size:.9rem}
.checkout-legal .checkout-legal-company{display:grid;grid-template-columns:max-content 1fr;gap:.25rem 1rem;margin:0 0 .5rem}
.checkout-legal .checkout-legal-company dt{font-weight:400;opacity:.75}
.checkout-legal .checkout-legal-company dd{margin:0;overflow-wrap:anywhere}
.checkout-legal h2{font-size:1.05rem;margin:1.75rem 0 .5rem}
.checkout-legal ul{padding-left:1.25rem;margin-bottom:.5rem}
.checkout-legal a{text-decoration:underline}
.checkout-legal .checkout-formula{padding:.75rem 1rem;border:1px solid rgba(148,163,184,.3);border-radius:.5rem;font-weight:600}
.checkout-legal mark{background:#fde68a;color:#1f2937;padding:0 .2em;border-radius:.2em}
.checkout-legal .checkout-pending{padding:1rem;border:1px dashed rgba(148,163,184,.6);border-radius:.5rem}

.payment-admin .payment-filters{display:flex;gap:.5rem;flex-wrap:wrap;align-items:end;margin-bottom:1rem}
.payment-admin .payment-filters .form-select,.payment-admin .payment-filters .form-control{min-height:40px;width:auto}
.payment-admin table{font-variant-numeric:tabular-nums}
.payment-admin .payment-flag{display:inline-block;padding:.1rem .5rem;border-radius:1rem;font-size:.8rem;white-space:nowrap}
.payment-admin .payment-detail dl{display:grid;grid-template-columns:max-content 1fr;gap:.25rem 1rem;margin:0}
.payment-admin .payment-detail dd{margin:0;overflow-wrap:anywhere}

/* Payment history: an entry waiting for an ATM / store payment leads with its payment code. */
.checkout-item-code{margin:0 0 .25rem;font-size:.95rem;font-weight:600;color:#ffd166;overflow-wrap:anywhere}
/* Label on its own line; the number and copy button always share the next line, so the button sits in the same place on every payment. */
.checkout-code-label{display:block}
.checkout-code-line{display:flex;align-items:center;gap:.5rem;margin-top:.15rem}
.checkout-code-value{min-width:0;color:#fff;font-size:1.05rem;letter-spacing:.02em;user-select:all;-webkit-user-select:all}
/* Icon-only copy button; overrides the 44px member-page button size (owner asked for it smaller). */
#app .member-reservations .btn.checkout-copy{min-height:0;min-width:0;height:auto;flex:none;padding:.15rem .35rem;font-size:.85rem;line-height:1;border-radius:.3rem}
.checkout-transfer{flex-wrap:wrap;gap:.5rem}
.checkout-transfer-actions{display:inline-flex;flex-wrap:wrap;gap:.4rem;align-items:center}
#app .member-reservations .checkout-reference{width:7.5rem;min-height:0;letter-spacing:.12em}
/* Payment history: date and method under the amount; payments that ended without money are dimmed and fold away. */
/* The computer each payment is for stands out by colour and icon, not more words (owner, 2026-11-30: 電腦編號不明顯). */
.checkout-pc{display:inline-flex;align-items:center;gap:.35rem;margin-right:.2rem;padding:.15rem .55rem;border:1px solid rgba(56,189,248,.55);border-radius:.4rem;background:rgba(56,189,248,.16);color:#7dd3fc;font-weight:700;font-size:1.05rem;line-height:1.3;white-space:nowrap}
.checkout-item-meta{margin:.15rem 0 0;font-size:.8125rem;opacity:.75}
/* 時間紀錄: no time on the card; a small clock beside the status opens the payment's steps at the bottom of the card
   (owner, 2026-11-30). The main column keeps room for a 16-digit account and its copy button; when a long status
   leaves less, the status and clock move to the next line (as the status alone did before). */
.checkout-item-main{flex:1 1 12.5rem;min-width:0}
.checkout-item-side{display:flex;align-items:center;gap:.15rem;flex:none}
.checkout-timeline-toggle{display:inline-flex;align-items:center;justify-content:center;width:1.9rem;height:1.9rem;padding:0;border:0;border-radius:.4rem;background:none;color:#9aa4b1;font-size:1rem;line-height:1}
.checkout-timeline-toggle:hover,.checkout-timeline-toggle:focus-visible{color:#e2e8f0;background:rgba(255,255,255,.08)}
.checkout-timeline-toggle[aria-expanded="true"]{color:#7dd3fc;background:rgba(56,189,248,.14)}
.checkout-timeline{list-style:none;margin:0;padding:.55rem 0 .2rem;border-top:1px solid #41464e;font-size:.8125rem;font-variant-numeric:tabular-nums}
.checkout-timeline li{position:relative;display:flex;flex-wrap:wrap;justify-content:space-between;gap:0 .75rem;padding:.15rem 0 .15rem 1.15rem;color:#d7dde5}
.checkout-timeline li::before{content:'';position:absolute;left:.1rem;top:.5rem;width:.55rem;height:.55rem;border-radius:50%;background:#4ade80}
.checkout-timeline li::after{content:'';position:absolute;left:.36rem;top:1.1rem;bottom:-.45rem;width:1px;background:rgba(255,255,255,.18)}
.checkout-timeline li:last-child::after{display:none}
.checkout-timeline time{color:#9aa4b1;white-space:nowrap}
.checkout-timeline .is-current{color:#ffd166;font-weight:600}
.checkout-timeline .is-current::before{background:#ffd166}
.checkout-timeline .is-todo{color:#7c8794}
.checkout-timeline .is-todo::before{background:transparent;border:1px solid #7c8794}
.checkout-timeline .is-stop{color:#fca5a5}
.checkout-timeline .is-stop::before{background:#f87171}
.checkout-closed{opacity:.6}
.checkout-more{display:block;margin:1rem auto 0}
.checkout-flash.alert{display:flex;flex-wrap:wrap;gap:.5rem .75rem;align-items:center;background:rgba(6,199,85,.14);border:1px solid rgba(6,199,85,.5);color:#d9f7e5}
/* Cancel question inside the entry (instead of the browser's confirm dialog). */
.checkout-confirm{flex-wrap:wrap;gap:.5rem;border-top:1px solid rgba(245,158,11,.45);background:rgba(245,158,11,.08);border-radius:0 0 .5rem .5rem}
.checkout-confirm>span:first-child{flex:1 1 16rem;color:#fde3a7}
/* Payment history search bar (owner, 2026-11-30): 單號 and dates on the first row, status, method and the buttons on
   the second; on a phone 單號 and the buttons take a full row. */
.checkout-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem 1rem;align-items:end;margin:0 0 1.25rem;padding:1rem 1.25rem;border:1px solid #41464e;border-radius:.75rem;background:#292d33}
.member-reservations .checkout-filters .form-control{color:#e8ebf0;background-color:#24282e;border:1px solid #535b66;min-height:44px;font-size:.9rem}
.member-reservations .checkout-filters .form-control::placeholder{color:#8f99a6}
.checkout-filters input[type=date]{color-scheme:dark}
.checkout-filter-actions{display:flex;gap:.5rem}
.checkout-filter-actions .btn{flex:1 1 0;padding-left:.75rem;padding-right:.75rem}
.checkout-filter-error{grid-column:1/-1;margin:0;color:#fca5a5;font-size:.85rem}
@media (max-width:575px){
  .checkout-filters{grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem .5rem;padding:.75rem}
  /* Two selects side by side (phones keep 16px text so iOS does not zoom): a smaller arrow area so 「不含取消／逾時」
     fits on a 375px screen. */
  .member-reservations .checkout-filters .form-select{padding:.6rem 1.6rem .6rem .6rem;background-position:right .45rem center}
  .checkout-filter-q,.checkout-filter-actions{grid-column:1/-1}
}
/* Back from PAYUNi after taking a code: the order just made is marked (owner, 2026-11-30). */
.member-reservation-item.checkout-focus{border-color:#ffd166;box-shadow:0 0 0 1px #ffd166}
.checkout-focus-note{margin:-.5rem 0 .75rem;color:#c0c6ce;font-size:.85rem}
