/* Demo component styles */

/* Calendar */
.cal { font-family: var(--font-sans); width: 100%; height: 100%; display: flex; flex-direction: column; }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.cal-title { display: flex; gap: 10px; align-items: baseline; flex-wrap: nowrap; white-space: nowrap; }
.cal-day { font-family: var(--font-serif); font-style: italic; font-size: 22px; }
.cal-date { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.cal-tabs { display: flex; gap: 4px; padding: 3px; background: var(--cream); border: 1px solid var(--line); border-radius: 999px; }
.cal-tabs button { padding: 5px 14px; border-radius: 999px; font-size: 12px; font-weight: 500; color: var(--muted); }
.cal-tabs button.active { background: var(--ink); color: var(--cream); }
.cal-grid { display: grid; grid-template-columns: 32px 1fr 1fr 1fr; flex: 1; gap: 6px; min-height: 0; }
.cal-times { display: flex; flex-direction: column; padding-top: 33px; }
.cal-hour { height: 30px; font-family: var(--font-mono); font-size: 9px; color: var(--muted-2); position: relative; padding-top: 2px; }
.cal-hour span { display: block; }
.cal-col { display: flex; flex-direction: column; min-width: 0; }
.cal-staff { display: flex; align-items: center; gap: 8px; height: 32px; font-size: 12px; font-weight: 600; }
.cal-avatar { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--cream); font-size: 11px; font-weight: 600; }
.cal-track { position: relative; flex: 1; border: 1px solid var(--line); border-radius: 10px; background: var(--cream); overflow: hidden; }
.cal-slot-bg { height: 30px; border-bottom: 1px dashed color-mix(in oklab, var(--line) 60%, transparent); }
.cal-slot-bg:last-child { border-bottom: none; }
.cal-event { position: absolute; left: 4px; right: 4px; border-radius: 6px; padding: 6px 8px; border-left: 3px solid; cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; overflow: hidden; }
.cal-event:hover, .cal-event.sel { transform: translateY(-1px); box-shadow: 0 4px 12px -4px rgba(0,0,0,0.2); }
.cal-event-client { font-size: 11px; font-weight: 600; letter-spacing: -0.005em; }
.cal-event-svc { font-size: 10px; color: var(--ink-2); opacity: 0.7; margin-top: 1px; }

/* WhatsApp */
.wa { font-family: var(--font-sans); height: 100%; display: flex; flex-direction: column; background: var(--cream); border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.wa-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--paper); border-bottom: 1px solid var(--line); }
.wa-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--cream); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.wa-meta { flex: 1; }
.wa-name { font-size: 13px; font-weight: 600; }
.wa-status { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.wa-dot { width: 6px; height: 6px; border-radius: 50%; background: #4caf50; box-shadow: 0 0 0 2px color-mix(in oklab, #4caf50 30%, transparent); }
.wa-icon { color: var(--muted); }
.wa-body { flex: 1; padding: 14px; overflow: hidden; display: flex; flex-direction: column; gap: 8px; background: var(--cream); }
.wa-msg { display: flex; }
.wa-msg.client { justify-content: flex-end; }
.wa-bubble { max-width: 78%; padding: 9px 13px; border-radius: 14px; font-size: 13px; line-height: 1.35; box-shadow: 0 1px 1px rgba(0,0,0,0.04); }
.wa-msg.client .wa-bubble { background: #e0d4bd; border-bottom-right-radius: 4px; color: var(--ink); }
.wa-msg.agent .wa-bubble { background: var(--paper); border-bottom-left-radius: 4px; color: var(--ink); border: 1px solid var(--line); }
.wa-bubble.typing { display: flex; gap: 3px; padding: 12px 14px; }
.wa-bubble.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted-2); animation: typing 1.2s infinite; }
.wa-bubble.typing span:nth-child(2) { animation-delay: 0.15s; }
.wa-bubble.typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing { 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-2px); } }
.wa-input { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; background: var(--paper); border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.wa-send { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--cream); display: flex; align-items: center; justify-content: center; }

/* Queue */
.queue { font-family: var(--font-sans); height: 100%; display: flex; flex-direction: column; }
.queue-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.queue-eyebrow { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.16em; color: var(--muted); }
.queue-title { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; margin-top: 4px; }
.queue-clock { font-family: var(--font-serif); font-style: italic; font-size: 28px; letter-spacing: -0.02em; color: var(--ink); }
.queue-clock small { font-size: 14px; opacity: 0.6; margin-left: 2px; }
.queue-list { flex: 1; display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.queue-row { display: grid; grid-template-columns: 32px 1fr auto auto; gap: 14px; align-items: center; padding: 10px 12px; border-radius: 8px; background: var(--cream); border: 1px solid transparent; transition: all 0.2s; }
.queue-row.state-seating { background: var(--ink); color: var(--cream); }
.queue-row.state-seating .queue-svc { color: color-mix(in oklab, var(--cream) 60%, transparent); }
.queue-row.state-seating .queue-staff, .queue-row.state-seating .queue-wait { color: color-mix(in oklab, var(--cream) 80%, transparent); }
.queue-row.state-next { border-color: color-mix(in oklab, var(--bronze) 50%, transparent); background: color-mix(in oklab, var(--bronze) 8%, var(--paper)); }
.queue-num { font-family: var(--font-mono); font-size: 11px; color: var(--muted); font-weight: 500; }
.queue-row.state-seating .queue-num { color: var(--bronze-2); }
.queue-name { font-size: 13px; font-weight: 600; letter-spacing: -0.005em; }
.queue-svc { font-size: 11px; color: var(--muted); margin-top: 1px; }
.queue-staff { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.queue-wait { font-family: var(--font-mono); font-size: 11px; color: var(--ink-2); white-space: nowrap; }

/* POS */
.pos { font-family: var(--font-sans); height: 100%; display: flex; flex-direction: column; gap: 16px; }
.pos-head { display: flex; justify-content: space-between; align-items: flex-end; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.pos-eyebrow { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.pos-total { font-size: 44px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; margin-top: 6px; }
.pos-tap { display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; }
.pos-tap-pulse { position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--bronze); opacity: 0.4; animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { transform: scale(0.9); opacity: 0.6; } 100% { transform: scale(1.4); opacity: 0; } }
.pos-tap-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: var(--cream); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.pos-tap-label { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.pos-rows { display: flex; flex-direction: column; gap: 8px; }
.pos-row { display: flex; justify-content: space-between; font-size: 13px; }
.pos-row.muted { color: var(--muted); padding-top: 8px; border-top: 1px dashed var(--line); }
.pos-row.muted:first-of-type { margin-top: 4px; }
.pos-pays { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: auto; }
.pos-pay { padding: 10px 8px; border-radius: 8px; text-align: center; font-size: 11px; font-weight: 600; letter-spacing: 0.01em; background: var(--cream); border: 1px solid var(--line); color: var(--muted); }
.pos-pay.active { background: var(--ink); color: var(--cream); border-color: var(--ink); }

/* Calendar tab toggle - clickable */
.cal-tabs button { cursor: pointer; transition: all 0.2s ease; border: none; background: transparent; }
.cal-tabs button:hover:not(.active) { color: var(--ink); background: var(--cream-2); }

/* Week view */
.cal-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  flex: 1;
  min-height: 0;
}
.cal-week-col {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}
.cal-week-col:hover {
  transform: translateY(-2px);
  border-color: var(--bronze);
}
.cal-week-col.today {
  background: var(--paper);
  border-color: var(--bronze);
  box-shadow: 0 4px 16px rgba(139, 111, 71, 0.12);
}
.cal-week-head { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.cal-week-day {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.cal-week-date {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.cal-week-col.today .cal-week-date { color: var(--bronze); }
.cal-week-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 64px;
  width: 100%;
  padding: 0 4px;
}
.cal-week-bar {
  flex: 1;
  border-radius: 2px;
  min-height: 4px;
  transition: all 0.3s ease;
}
.cal-week-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.cal-week-col.today .cal-week-count { color: var(--bronze); }

/* Smooth fade between Day/Week views */
.cal-fade-in {
  animation: cal-fade 0.3s ease-out;
}
@keyframes cal-fade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
