/* Copyright 2026 CLEALINK TECHNOLOGY CO.,LTD. All rights reserved. */

/* Home, booking, the reservations list, the personal room and the history. */

.join-box { display: flex; gap: 8px; align-items: center; position: relative; }
.join-box .join-code { width: 220px; font-variant-numeric: tabular-nums; }
.join-box .err { position: absolute; right: 0; top: calc(100% + 4px); white-space: nowrap; }
.home-body { flex: 1; display: flex; flex-direction: column; gap: 20px; min-height: 0; }

.home-card { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; min-height: 152px; }
.home-card h2 { font-size: var(--fs-15); font-weight: 700; margin: 0; }
.home-card .card-text { font-size: var(--fs-12); color: var(--muted); line-height: 1.6; }
.home-card .card-text b { color: var(--text); font-weight: 700; }
.home-card .card-actions { display: flex; gap: 8px; margin-top: auto; flex-wrap: wrap; }
.home-card .card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.home-card .card-line { font-size: var(--fs-12); color: var(--muted); display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.home-card .linkbox { flex: none; }

.home-lower { min-height: 320px; }
.today-list { display: flex; flex-direction: column; flex: 1; }
.today-row { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--line); font-size: var(--fs-13); min-height: 60px; outline: none; }
.today-row.next { background: var(--row-sel); }
.today-row:focus-visible { box-shadow: inset 0 0 0 2px var(--focus); }
.today-row .when { width: 92px; font-weight: 600; flex: none; white-space: nowrap; }
.today-row .what { flex: 1; min-width: 0; }
.today-row .what b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.today-row .what small { display: block; font-size: var(--fs-12); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.today-row .row-more { margin-left: -6px; margin-right: -8px; }
:root[data-density="compact"] .today-row .row-more { opacity: .55; }
:root[data-density="compact"] .today-row:hover .row-more, .today-row .row-more:focus-visible { opacity: 1; }
.today-foot { padding: 14px 18px; font-size: var(--fs-12); color: var(--muted); text-decoration: none; margin-top: auto; }
:root[data-hover="1"] .today-foot:hover { color: var(--text); }
.today-foot::after { content: " ›"; }

.pool-pane { padding: 14px 18px; }
.pool-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; gap: 12px; }
.pool-head h2 { font-size: var(--fs-14); font-weight: 700; margin: 0; }
.pool-head .side { font-size: var(--fs-12); color: var(--muted); }
.pool-note { margin-top: 14px; font-size: var(--fs-12); color: var(--muted); line-height: 1.7; }
.lanes { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 6px 8px; align-items: center; font-size: var(--fs-11); color: var(--muted); position: relative; }
.lane { position: relative; height: 26px; background: var(--fill); border-radius: var(--r-sm); overflow: hidden; }
.lane-reserve { background: repeating-linear-gradient(135deg, var(--fill) 0 6px, var(--stripe) 6px 12px); }
.slot { position: absolute; top: 3px; bottom: 3px; border-radius: var(--r-xs); font-size: var(--fs-10); color: var(--slot-text); padding: 0 6px; display: flex; align-items: center; white-space: nowrap; overflow: hidden; min-width: 3px; }
.slot-mine { background: var(--primary); color: var(--on-primary); }
.slot-other { background: var(--slot-other); }
.slot-past { background: var(--slot-past); }
.slot-now { background: var(--slot-now); }
.slot-released { background: var(--green-bg); color: var(--green-text); }
.slot-held { background: none; color: var(--muted); }
.lane-axis { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; }
.now-track { position: absolute; left: 28px; right: 0; top: -4px; bottom: 18px; pointer-events: none; }
.now-line { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--red); border-radius: 1px; }
:root[data-density="large"] .lane { height: 32px; }

/* ---------- booking ---------- */

.booking { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.booking .pane { padding: 18px 20px; }
.booking .pane h2 { margin: 0 0 12px; }
.booking .field { gap: 5px; }
.booking .field .input, .booking .field .select { height: calc(var(--ctl-h) + 2px); font-size: var(--fs-14); }
.booking .line { display: flex; align-items: center; gap: 12px; margin-top: 12px; font-size: var(--fs-13); flex-wrap: wrap; }
.booking .line .side { font-size: var(--fs-12); color: var(--muted); }
.booking .verdict { margin-top: 12px; }
.avail { margin-top: 8px; position: relative; height: 22px; background: var(--fill); border-radius: var(--r-xs); overflow: hidden; }
.avail i { position: absolute; top: 0; bottom: 0; display: block; }
.avail i.full { background: var(--slot-full); }
.avail i.busy { background: var(--stripe); }
.avail i.this { background: var(--primary); border-radius: var(--r-xs); }
.avail i.this.bad { background: var(--red); }
.avail-axis { display: flex; justify-content: space-between; font-size: var(--fs-11); color: var(--muted); margin-top: 4px; gap: 8px; font-variant-numeric: tabular-nums; }
.booking .sub-label { margin-top: 14px; font-size: var(--fs-12); color: var(--muted); display: block; margin-bottom: 6px; }
.booking .sub-label:first-of-type { margin-top: 0; }
.booking .link-row { display: flex; gap: 8px; align-items: center; }
.booking .checks-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.booking .custom-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.booking .custom-row .input { flex: 1; }
.booking .pass-row { display: flex; gap: 8px; margin-top: 8px; align-items: flex-start; }
.booking .pass-row .field { flex: 1; }
.booking .r { min-height: 0; padding: 7px 0; }
.token-add { background: none; border: 1px dashed var(--border-strong); color: var(--muted); }
@media (max-width: 1100px) { .booking { grid-template-columns: minmax(0, 1fr); } }


/* ---------- personal room ---------- */

.room-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.room-grid .pane { padding: 18px 20px; }
.url-edit { display: flex; align-items: center; gap: 0; }
.url-edit .prefix { background: var(--surface-2); border: 1px solid var(--border-strong); border-right: 0; border-radius: var(--r-md) 0 0 var(--r-md); height: var(--ctl-h); display: flex; align-items: center; padding: 0 10px; font-size: var(--fs-12); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60%; }
.url-edit .input { border-radius: 0 var(--r-md) var(--r-md) 0; }
@media (max-width: 1100px) { .room-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) {
  .join-box { width: 100%; }
  .join-box .join-code { flex: 1; width: auto; }
  .today-row { flex-wrap: wrap; gap: 8px 12px; padding: 12px 14px; }
  .today-row .what { flex-basis: calc(100% - 110px); }
}

/* ---------- fine tuning ---------- */
.booking .bk-when { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.2fr) minmax(0, 1fr); gap: 12px; margin-top: 12px; }
.booking .pane > .hint, .booking .tokens-field + .hint { margin-top: 6px; display: block; }
.booking .stack-checks { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.booking .custom-list:empty { display: none; }
.room-grid .form h2 { margin: 6px 0 0; }
.hours-editor { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.hours-editor .seg { align-self: flex-start; }
.week-details summary { cursor: pointer; font-size: var(--fs-12); }
.url-edit .prefix { direction: rtl; text-align: left; max-width: 62%; }
