/* Lifted verbatim from reference/original.html so the live view is pixel-identical. */

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; }
body { background: linear-gradient(160deg, #cde4f0 0%, #a8cfe0 100%); padding: 0 16px 40px; }
#app { display: flex; flex-direction: column; gap: 24px; align-items: center; padding-top: 20px; }

.cal-card { width: 800px; max-width: calc(100vw - 32px); background: white; border-radius: 20px; overflow: hidden; box-shadow: 0 8px 36px rgba(8,48,80,0.20); }
.cal-header { padding: 20px 66px 16px; color: white; position: relative; overflow: hidden; }
.cal-header::before { content: ''; position: absolute; bottom: -20px; right: -20px; width: 130px; height: 130px; border-radius: 50%; background: rgba(255,255,255,0.05); }
.brand-line { font-size: 10px; font-weight: 800; letter-spacing: 3.5px; text-transform: uppercase; color: rgba(255,255,255,0.55); margin-bottom: 4px; }
.month-year { font-size: 38px; font-weight: 800; letter-spacing: -1px; color: white; }
.month-year .yr { font-weight: 300; font-size: 24px; opacity: 0.62; margin-left: 6px; }
.sub-line { margin-top: 6px; font-size: 9.5px; opacity: 0.5; text-transform: uppercase; letter-spacing: 2.5px; font-weight: 600; }

.dow-strip { display: grid; grid-template-columns: repeat(7, 1fr); }
.dow-cell { text-align: center; padding: 9px 0 8px; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; color: rgba(255,255,255,0.4); }
.dow-cell.sc { color: #f2a63e; }

.cal-body { padding: 10px 12px 14px; background: #f2f7fb; display: flex; flex-direction: column; gap: 6px; }

.wk-row { display: grid; grid-template-columns: repeat(7, 1fr); background: white; border-radius: 10px; border: 1.5px solid #dde8f0; }
.d-cell { text-align: center; padding: 6px 2px 5px; display: flex; flex-direction: column; align-items: center; min-height: 44px; }
.dn { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13.5px; font-weight: 600; color: #2c3e50; }
.d-cell.sat .dn { color: #0a2a47; font-weight: 800; }
.d-cell.opm .dn { color: #b4c8d4; }

.avail-wrap { border-radius: 11px; overflow: hidden; }
.avail-wrap                           { border: 2.5px solid #0f6fb8; }
.avail-wrap .wk-row                   { border: none; border-radius: 0; background: linear-gradient(135deg, #dff0fc, #e8f5ff); }
.avail-wrap .d-cell.sat .dn           { background: #0a2a47; color: white; }
.avail-wrap.sale-only                 { border-color: #1a8f6b; }
.avail-wrap.sale-only .wk-row        { background: linear-gradient(135deg, #dcf5ec, #eafaf4); }
.avail-wrap.sale-only .d-cell.sat .dn { background: #0b3b2e; color: white; }
.avail-wrap.req-only                  { border-color: #e8a23c; }
.avail-wrap.req-only .wk-row         { background: linear-gradient(135deg, #fbead2, #fff6ea); }
.avail-wrap.req-only .d-cell.sat .dn { background: #6b3d0a; color: white; }

/* Week number: its own line above the date row (not sharing the row with
   the Saturday circle, so it stays legible in a tight layout), left-aligned
   and prominent since it's a key piece of info. */
.wk-label { text-align: left; padding: 7px 14px 1px; font-size: 13.5px; font-weight: 900; letter-spacing: 0.4px; text-transform: uppercase; color: #0a2a47; }
.avail-wrap.sale-only .wk-label { color: #0b3b2e; }
.avail-wrap.req-only .wk-label { color: #6b3d0a; }

/* Past weeks: check-in Saturday has arrived, listing is stale and hidden */
.past-wrap { border-radius: 11px; overflow: hidden; border: 1.5px solid #dde0e3; }
.past-wrap .wk-row { border: none; border-radius: 0; background: #ececee; }
.past-wrap .dn { color: #b8bcc0; }
.past-wrap .d-cell.sat .dn { background: #b8bcc0; color: #f4f4f5; font-weight: 800; }

.units-bar { padding: 8px 14px; display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.rent-bar  { background: linear-gradient(135deg, #0a2a47, #0f6fb8); }
.sale-bar  { background: linear-gradient(135deg, #0b3b2e, #1a8f6b); }
.req-bar   { background: linear-gradient(135deg, #6b3d0a, #e8a23c); }
.buy-bar   { background: linear-gradient(135deg, #2e1150, #7a46b8); }
.ub-lbl { font-size: 10px; font-weight: 600; color: rgba(255,255,255,0.60); margin-right: 6px; white-space: nowrap; flex-shrink: 0; }
.ub-lbl .wk-num { font-size: 13.5px; font-weight: 800; color: white; letter-spacing: -0.3px; margin-right: 2px; }

/* Two-line chip: same compact wrapping pill cloud as before, just taller.
   Top line = bed badge + unit number (+ price); bottom line = owner name,
   when set. */
.chip { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 4px 10px 5px; border-radius: 12px; font-size: 11.5px; font-weight: 700; line-height: 1; text-decoration: none; }
.chip-top { display: inline-flex; align-items: center; gap: 4px; }
.chip-badge { display: inline-block; width: 15px; height: 15px; border-radius: 50%; background: rgba(255,255,255,0.28); font-size: 8px; font-weight: 800; text-align: center; line-height: 15px; flex-shrink: 0; }
.chip-name { font-size: 9.5px; font-weight: 600; color: rgba(255,255,255,0.85); line-height: 1.3; padding-left: 19px; }
.c1 { background: #3aafa9; color: white; }
.c2 { background: #d95f34; color: white; }
.req-chip { background: rgba(255,255,255,0.14); color: white; }

/* Chips with an owner link double as a "message the owner" button. */
.chip-linked { cursor: pointer; box-shadow: 0 0 0 1.5px rgba(255,255,255,0.6) inset; }
.chip-linked:hover { filter: brightness(1.08); }
.chip-msg-icon { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 50%; background: white; margin-left: 2px; flex-shrink: 0; }
.chip-msg-icon svg { display: block; }
.chip-price { font-size: 10px; font-weight: 600; opacity: 0.85; margin-left: 4px; padding-left: 5px; border-left: 1px solid rgba(255,255,255,0.35); }

.req-count { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 800; color: white; background: rgba(255,255,255,0.18); white-space: nowrap; }

.cal-legend { display: flex; align-items: center; gap: 11px; padding: 10px 14px; background: white; border-top: 1.5px solid #dde8f0; flex-wrap: wrap; }
.leg-title  { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: #aaa; flex-shrink: 0; }
.leg-item   { display: flex; align-items: center; gap: 5px; font-size: 9.5px; color: #555; font-weight: 500; white-space: nowrap; }
.leg-sw     { width: 22px; height: 12px; border-radius: 6px; flex-shrink: 0; }
.leg-bar    { width: 28px; height: 12px; border-radius: 5px; flex-shrink: 0; }
.leg-sat    { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 9.5px; color: #555; font-weight: 500; }
.sat-circle { width: 25px; height: 25px; border-radius: 50%; background: #0a2a47; color: white; display: flex; align-items: center; justify-content: center; font-size: 7.5px; font-weight: 800; letter-spacing: 0.5px; flex-shrink: 0; }

.cal-footer { padding: 10px 20px; text-align: center; font-size: 9px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; color: rgba(255,255,255,0.52); }
.cal-footer a { color: rgba(255,255,255,0.85); text-decoration: underline; }

.preview-body { padding: 12px 14px 14px; background: #f2f7fb; display: flex; flex-direction: column; gap: 8px; }
.pm-label     { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 2px; color: #0a2a47; padding: 5px 2px 4px; border-bottom: 1.5px solid #c8d8e8; margin-bottom: 5px; }
.preview-wk   { background: white; border-radius: 10px; overflow: hidden; border: 1.5px solid #dde8f0; margin-bottom: 4px; }
.pw-hdr       { display: flex; align-items: center; gap: 10px; padding: 7px 12px 6px; }
.pw-wknum     { font-size: 12px; font-weight: 800; color: #0a2a47; }
.pw-dates     { font-size: 10.5px; color: #999; font-weight: 500; }

/* Carousel navigation */

/* Year tabs: a navy strip attached to the top of the card. The active year
   pops up as a white tab (folder-tab style, matching United's Book/Flight
   status/Check-in tabs); inactive years sit flat in the strip. */
.cal-carousel-group { display: flex; flex-direction: column; }
.yr-tabstrip { width: 800px; max-width: calc(100vw - 32px); margin: 0 auto; background: #0a2a47; border-radius: 18px 18px 0 0; padding: 10px 18px 0; display: flex; gap: 4px; }
.yr-tab { font-size: 16px; font-weight: 900; letter-spacing: 0.3px; padding: 9px 24px 11px; border: none; border-radius: 10px 10px 0 0; background: transparent; color: rgba(255,255,255,0.6); cursor: pointer; }
.yr-tab:hover:not(.active) { background: rgba(255,255,255,0.08); color: white; }
.yr-tab.active { background: white; color: #0a2a47; }

.cal-card-wrap { position: relative; width: 800px; max-width: calc(100vw - 32px); margin: 0 auto; }
.cal-card-wrap .cal-card { border-radius: 0 0 20px 20px; }
.cal-carousel-track { touch-action: pan-y; }

/* Arrows sit on top of the card's own header, flanking the month name,
   instead of duplicating it in a separate bar above the card. */
.nav-arrow {
  position: absolute; top: 58px; z-index: 5; width: 38px; height: 38px; border-radius: 50%;
  border: none; background: rgba(255,255,255,0.16); color: white; font-size: 19px; font-weight: 800;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.nav-arrow:hover:not(:disabled) { background: rgba(255,255,255,0.3); }
.nav-arrow:disabled { opacity: 0.25; cursor: default; }
.nav-arrow-left { left: 16px; }
.nav-arrow-right { right: 16px; }

@media (max-width: 640px) {
  body { padding: 0 8px 32px; }
  .month-year { font-size: 30px; }
  .month-year .yr { font-size: 19px; }
  .cal-header { padding: 16px 50px 12px; }
  .units-bar { padding: 7px 10px; }
  .cal-legend { gap: 8px; padding: 8px 10px; }
  .leg-sat { margin-left: 0; }
  .nav-arrow { width: 36px; height: 36px; top: 48px; font-size: 17px; }
  .nav-arrow-left { left: 10px; }
  .nav-arrow-right { right: 10px; }
}

/* Listings the owner hasn't confirmed lately. Muted and sunk, never hidden:
   an unconfirmed listing is usually still real, just unverified. */
.chip.chip-stale { opacity: 0.62; }
.chip-unconfirmed {
  display: inline-flex; align-items: center; justify-content: center;
  width: 13px; height: 13px; margin-left: 5px; border-radius: 50%;
  background: rgba(255,255,255,0.55); color: #6b4d18;
  font-size: 9px; font-weight: 800; line-height: 1;
}
