@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:wght@400;500;600&family=Pirata+One&display=swap');

:root {
  --font-family--inter: Inter, sans-serif;
  --font-family--melodrama: 'Playfair Display', Georgia, serif;
  --font-family--blackletter: 'Old English Text MT', 'Pirata One', Georgia, serif;
  --color--dark: #2e4343;
  --color--light-gray: #ebf3f5;
  --color--white: #ffffff;
  --color--mat-green: #688181;
  --color--light-green: #d4e1e3;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100%;
  background-color: var(--color--white);
  font-family: var(--font-family--inter);
  color: var(--color--dark);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

/* ─── TOP NAV BAR ─────────────────────────────────────── */
.wf-bar {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: relative;
  z-index: 100;
}

.wf-bar__left {
  display: flex;
  align-items: center;
  gap: 32px;
}

.wf-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.wf-logo__name {
  font-family: var(--font-family--blackletter);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.5px;
  color: var(--color--dark);
}

/* Barber pole icon */
.barber-pole-icon {
  width: 22px;
  height: 38px;
  flex-shrink: 0;
}

.wf-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.wf-nav a {
  font-family: var(--font-family--inter);
  font-size: 13px;
  font-weight: 500;
  color: var(--color--dark);
  text-decoration: none;
  min-height: 44px;
  display: flex;
  align-items: center;
  transition: opacity 0.2s;
}

.wf-nav a:hover { opacity: 0.55; }

/* Non-clickable nav text (page 3 "Home") */
.wf-nav-text {
  font-family: var(--font-family--inter);
  font-size: 13px;
  font-weight: 500;
  color: #aab5b5;
  cursor: default;
  min-height: 44px;
  display: flex;
  align-items: center;
}

/* Queue badge in top bar */
.queue-badge {
  font-family: var(--font-family--inter);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color--dark);
  border: 1.5px solid var(--color--dark);
  padding: 8px 16px;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  background: transparent;
}

.queue-badge .queue-number {
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

/* ─── HERO ────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 60px);
}

.hero__panel--left {
  background: var(--color--light-green);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 40px 60px;
  gap: 24px;
}

.hero__heading {
  font-family: var(--font-family--melodrama);
  font-size: 56px;
  font-weight: 500;
  line-height: 1.1;
  color: var(--color--dark);
  max-width: 480px;
}

/* "Scott's Barber Shop" headline on the queue page — prominent vintage
   barber shop look: traditional Old English / blackletter, elegant and
   readable (classic early-1900s signage, not horror). */
.brand-title {
  font-family: var(--font-family--blackletter);
  /* Stay on one line in the half-width left panel: scale with the viewport,
     capped large so it remains the focal point on wide screens. */
  font-size: min(64px, calc((50vw - 140px) / 8.5));
  font-weight: 400;
  letter-spacing: 1px;
  line-height: 1.15;
  white-space: nowrap;
  margin-bottom: 20px;
  max-width: none;
}

.hero__subtext {
  font-family: var(--font-family--inter);
  font-size: 15px;
  line-height: 1.65;
  color: var(--color--dark);
  max-width: 420px;
  opacity: 0.85;
}

/* ─── INFO CARD (queue page) ──────────────────────────── */
.info-card {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(46, 67, 67, 0.12);
  border-radius: 4px;
  padding: 20px 24px;
  max-width: 340px;
  backdrop-filter: blur(4px);
}

.info-card__phone {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-family--inter);
  font-size: 17px;
  font-weight: 700;
  color: var(--color--dark);
  letter-spacing: 0.5px;
}

.info-card__phone svg {
  flex-shrink: 0;
  color: var(--color--mat-green);
}

.info-card__divider {
  height: 1px;
  background: rgba(46, 67, 67, 0.12);
  margin: 14px 0;
}

.info-card__hours-title {
  font-family: var(--font-family--inter);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--color--mat-green);
  margin-bottom: 10px;
}

.hours-table {
  border-collapse: collapse;
  width: 100%;
}

.hours-table tr {
  border-radius: 3px;
  transition: background 0.15s;
}

.hours-table tr.today {
  background: var(--color--dark);
  border-radius: 3px;
}

.hours-table tr.today td {
  color: #fff !important;
  font-weight: 700;
}

.hours-table td {
  padding: 5px 8px;
  font-family: var(--font-family--inter);
  font-size: 13px;
  color: var(--color--dark);
  vertical-align: middle;
}

.hours-table td:first-child {
  font-weight: 600;
  white-space: nowrap;
  padding-left: 6px;
  border-radius: 3px 0 0 3px;
}

.hours-table td:last-child {
  text-align: right;
  padding-right: 6px;
  border-radius: 0 3px 3px 0;
}

.hours-table td.closed {
  color: #c0392b;
  font-weight: 600;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-family--inter);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--color--dark);
  border: 1.5px solid var(--color--dark);
  padding: 16px 32px;
  min-height: 52px;
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  align-self: flex-start;
}

.btn-outline:hover {
  background: var(--color--dark);
  color: var(--color--white);
}

.hero__panel--right {
  overflow: hidden;
}

.hero__panel--right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* ─── CONFIRMATION PAGE — full-width centered ─────────── */
.confirm-section {
  background: var(--color--light-green);
  min-height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 40px;
  gap: 20px;
}

.checkmark-icon {
  width: 72px;
  height: 72px;
  color: var(--color--dark);
}

.checkin-heading {
  font-family: var(--font-family--melodrama);
  font-size: 52px;
  font-weight: 500;
  line-height: 1.1;
  color: var(--color--dark);
  max-width: 600px;
}

.checkin-subtext {
  font-family: var(--font-family--inter);
  font-size: 20px;
  line-height: 1.6;
  color: var(--color--dark);
  opacity: 0.9;
}

.checkin-position {
  font-family: var(--font-family--inter);
  font-size: 16px;
  color: var(--color--mat-green);
  font-weight: 600;
}

.checkin-countdown {
  font-family: var(--font-family--inter);
  font-size: 13px;
  color: var(--color--mat-green);
  opacity: 0.75;
  margin-top: 4px;
}

.rate-limit-msg {
  background: #fff3cd;
  border: 1.5px solid #ffc107;
  color: #856404;
  padding: 16px 28px;
  font-family: var(--font-family--inter);
  font-size: 14px;
  border-radius: 2px;
  max-width: 480px;
}

/* ─── QUEUE VIEW PAGE (Page 3) ────────────────────────── */
.queue-display {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.queue-display__number {
  font-family: var(--font-family--melodrama);
  font-size: 96px;
  font-weight: 600;
  line-height: 1;
  color: var(--color--dark);
}

.queue-display__label {
  font-family: var(--font-family--inter);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color--mat-green);
}

/* ─── BARBER ADMIN PAGE (Page 4) ─────────────────────── */
.barber-section {
  background: var(--color--light-green);
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.barber-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.barber-label {
  font-family: var(--font-family--inter);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color--mat-green);
}

.barber-count-display {
  font-family: var(--font-family--melodrama);
  font-size: 120px;
  font-weight: 600;
  line-height: 1;
  color: var(--color--dark);
}

.barber-count-label {
  font-family: var(--font-family--inter);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--color--mat-green);
  margin-top: -12px;
}

/* The big action button */
.barber-btn {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--color--dark);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
  box-shadow: 0 8px 40px rgba(46, 67, 67, 0.30);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
  position: relative;
  overflow: hidden;
}

.barber-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 14px 52px rgba(46, 67, 67, 0.42);
}

.barber-btn:active {
  transform: scale(0.95);
  box-shadow: 0 4px 20px rgba(46, 67, 67, 0.25);
}

.barber-btn.served {
  background: #3a7d5a;
}

.barber-btn__scissors {
  font-size: 32px;
  line-height: 1;
}

.barber-btn__text {
  font-family: var(--font-family--inter);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* Ripple effect */
.barber-btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transform: scale(0);
  animation: ripple-anim 0.55s linear;
  pointer-events: none;
}

@keyframes ripple-anim {
  to { transform: scale(4); opacity: 0; }
}

.barber-feedback {
  font-family: var(--font-family--inter);
  font-size: 14px;
  font-weight: 600;
  color: #3a7d5a;
  letter-spacing: 1px;
  min-height: 22px;
  opacity: 0;
  transition: opacity 0.25s;
}

.barber-feedback.visible {
  opacity: 1;
}

.barber-feedback.empty {
  color: #c0392b;
}

/* Idle pulse on button */
@keyframes idle-pulse {
  0%, 100% { box-shadow: 0 8px 40px rgba(46, 67, 67, 0.30); }
  50%       { box-shadow: 0 8px 60px rgba(46, 67, 67, 0.55); }
}

.barber-btn.idle-pulse {
  animation: idle-pulse 2.5s ease-in-out infinite;
}

/* ─── CONFETTI CANVAS ─────────────────────────────────── */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
}

/* ─── MOBILE / RESPONSIVE ─────────────────────────────── */
@media (max-width: 768px) {
  /* Top bar: compact and allowed to wrap so nothing runs off-screen */
  .wf-bar {
    height: auto;
    flex-wrap: wrap;
    padding: 10px 16px;
    gap: 10px 14px;
  }
  .wf-bar__left { gap: 14px; }
  .wf-logo__name { font-size: 18px; }

  /* Hide the secondary "Check In Now" nav link on phones —
     the large hero button is the primary action. */
  .wf-nav { display: none; }

  .queue-badge {
    font-size: 10px;
    letter-spacing: 1px;
    padding: 6px 12px;
    min-height: 34px;
  }
  .queue-badge .queue-number { font-size: 16px; }

  /* Hero: single column with the photo stacked on top */
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .hero__panel--right {
    order: -1;        /* photo first */
    height: 240px;
  }
  .hero__panel--left {
    padding: 28px 22px;
    gap: 18px;
  }

  /* Scale down oversized headings for small screens */
  .hero__heading {
    font-size: 34px;
    max-width: none;
  }
  .brand-title {
    font-size: 40px;          /* override the wide-screen viewport formula */
    white-space: normal;      /* allow it to wrap instead of shrinking away */
    margin-bottom: 8px;
  }
  .hero__subtext { max-width: none; }
  .info-card { max-width: none; }

  /* Full-width, easy-to-tap buttons */
  .btn-outline {
    align-self: stretch;
    padding: 16px 24px;
  }

  /* Big number displays trimmed so they fit phone widths */
  .queue-display__number { font-size: 72px; }
  .checkin-heading { font-size: 36px; }
  .barber-count-display { font-size: 96px; }
  .barber-btn { width: 180px; height: 180px; }
}
