/* components.css */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  min-height: 48px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--orange-primary), var(--orange-deep));
  color: var(--white);
  box-shadow: 0 12px 32px rgba(224, 90, 53, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--orange-deep), var(--orange-primary));
  box-shadow: 0 16px 40px rgba(224, 90, 53, 0.4);
}

.btn-outline {
  background: var(--white);
  color: var(--ink);
  border: 2px solid var(--line);
}

.btn-outline:hover {
  border-color: var(--orange-primary);
  color: var(--orange-primary);
}

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

.btn-dark:hover { background: var(--ink); }

.btn-venue {
  background: transparent;
  color: var(--orange-ui);
  border: 2px solid rgba(245, 124, 110, 0.4);
}

.btn-venue:hover {
  background: rgba(245, 124, 110, 0.12);
  border-color: var(--orange-ui);
}

.btn-store {
  background: var(--charcoal);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  min-width: 200px;
}

.btn-store-light {
  background: var(--white);
  color: var(--ink);
  border: 2px solid var(--line);
}

.btn-store svg { width: 28px; height: 28px; flex-shrink: 0; }

.btn-store-text { text-align: left; line-height: 1.2; }

.btn-store-text small {
  display: block;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.6;
}

.btn-store-text strong { font-size: 1rem; }

/* Phone frame */
.phone-frame {
  position: relative;
  width: min(280px, 78vw);
  aspect-ratio: 9 / 19.5;
  background: var(--charcoal);
  border-radius: 2.25rem;
  padding: 10px;
  box-shadow: var(--shadow-phone);
}

.phone-frame::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 28%;
  height: 22px;
  background: var(--charcoal);
  border-radius: 0 0 12px 12px;
  z-index: 3;
}

.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 1.75rem;
  overflow: hidden;
  background: var(--cream-app);
  position: relative;
}

.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.hero-lofi-peek {
  position: absolute;
  bottom: -8%;
  right: -12%;
  width: 45%;
  z-index: 4;
  pointer-events: none;
  filter: drop-shadow(0 8px 24px rgba(15, 13, 11, 0.2));
}

/* Bento tile */
.bento-tile {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: box-shadow var(--dur-med) var(--ease-out),
              border-color var(--dur-med) var(--ease-out);
}

.bento-tile.is-open {
  border-color: rgba(224, 90, 53, 0.35);
  box-shadow: 0 16px 48px rgba(224, 90, 53, 0.12);
}

.bento-trigger {
  width: 100%;
  text-align: left;
  padding: 1.25rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  min-height: 44px;
}

.bento-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--orange-wash);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.bento-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.bento-trigger h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 0.15rem;
}

.bento-trigger p {
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.bento-chevron {
  width: 24px;
  height: 24px;
  color: var(--ink-soft);
  transition: transform var(--dur-fast) var(--ease-out);
}

.bento-tile.is-open .bento-chevron { transform: rotate(180deg); }

.bento-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--dur-med) var(--ease-out);
}

.bento-tile.is-open .bento-body { max-height: 1200px; }

.bento-content {
  padding: 0 1.25rem 1.25rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.bento-content ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.bento-content li {
  display: flex;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.bento-content li::before {
  content: "\2713";
  color: var(--orange-primary);
  font-weight: 700;
  flex-shrink: 0;
}

/* Lazy tax receipts */
.receipt-compare {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .receipt-compare { grid-template-columns: 1fr 1fr; }
}

.receipt {
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
}

.receipt-bad {
  background: #f5f5f5;
  border: 1px dashed #ccc;
  transform: rotate(-1deg);
}

.receipt-good {
  background: var(--white);
  border-top: 4px solid var(--orange-primary);
  box-shadow: var(--shadow-soft);
}

.receipt-header {
  text-align: center;
  border-bottom: 2px dashed rgba(0,0,0,0.1);
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
}

.receipt-header h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.receipt-row.bad { color: #c0392b; }
.receipt-row.good { color: #27ae60; }

.receipt-total {
  border-top: 3px double rgba(0,0,0,0.15);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  font-size: 1rem;
}

.receipt-badge {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
}

.receipt-badge.save {
  background: #d4edda;
  color: #155724;
}

.receipt-badge.over {
  background: #f8d7da;
  color: #721c24;
}

.bar-compare {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.bar-row label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.bar-track {
  height: 10px;
  background: var(--beige);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--orange-primary);
}

.bar-fill.muted { background: #F87171; }
.bar-fill.bar-good { background: var(--compare-good-bg-strong); }
.bar-compare.compact .bar-row:last-child label span:last-child { color: var(--compare-good-text); font-weight: 700; }
.bar-compare.compact .bar-row:first-child label span:last-child { color: var(--compare-bad-text); font-weight: 700; }

.compare-rows { display: flex; flex-direction: column; gap: 0.5rem; }

.compare-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  font-size: 0.8rem;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--beige);
}

.compare-row .other { color: #c0392b; }
.compare-row .lf { color: var(--orange-primary); font-weight: 600; }

/* Venue stat tile */
.stat-tile {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  text-align: center;
}

.stat-value {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--orange-ui);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

/* Shift card */
.shift-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--dur-fast) var(--ease-out);
}

.shift-card.is-open { border-color: rgba(245, 124, 110, 0.4); }

.shift-trigger {
  width: 100%;
  text-align: left;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 44px;
  color: var(--white);
}

.shift-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(224, 90, 53, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.shift-trigger h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 0.15rem;
}

.shift-trigger p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
}

.shift-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--dur-med) var(--ease-out);
}

.shift-card.is-open .shift-body { max-height: 600px; }

.shift-rows {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.shift-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  padding: 0;
  font-size: 0.82rem;
  line-height: 1.35;
}

.shift-row .bad-side {
  background: var(--compare-bad-bg);
  border: none;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  color: var(--compare-bad-text);
  font-weight: 600;
}

.shift-row .good-side {
  background: var(--compare-good-bg);
  border: none;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  color: var(--compare-good-text);
  font-weight: 700;
}

.shift-lofi {
  width: 48px;
  height: auto;
  opacity: 0.8;
  margin-left: auto;
}

/* Venue expander */
.expander {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.expander-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  min-height: 48px;
  color: var(--white);
  font-weight: 700;
  font-size: 0.95rem;
}

.expander-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--dur-med) var(--ease-out);
}

.expander.is-open .expander-body { max-height: 800px; }

.expander-content {
  padding: 0 1.25rem 1.25rem;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
}

.guarantee-steps {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.guarantee-step {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--orange-primary);
  color: var(--white);
  font-weight: 800;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pricing-card {
  background: linear-gradient(135deg, rgba(224, 90, 53, 0.2), rgba(212, 99, 44, 0.1));
  border: 1px solid rgba(224, 90, 53, 0.35);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  margin-top: 0.75rem;
}

.pricing-card .price {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 3rem;
  color: var(--white);
}

.pricing-card .price-note {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0.5rem 0 1rem;
}

.pricing-card ul {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.pricing-card li {
  display: flex;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.pricing-card li::before {
  content: "\2713";
  color: var(--orange-ui);
  font-weight: 700;
}

/* iMessage FAQ */
.imessage-wrap {
  max-width: 420px;
  margin-inline: auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  border: 1px solid var(--line);
}

.imessage-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: #f2f2f7;
  border-bottom: 1px solid #e5e5ea;
}

.imessage-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
}

.imessage-header-text strong {
  display: block;
  font-size: 0.9rem;
}

.imessage-header-text span {
  font-size: 0.7rem;
  color: #8e8e93;
}

.imessage-body {
  padding: 1rem;
  min-height: 280px;
  background: var(--white);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.imessage-bubble {
  max-width: 85%;
  padding: 0.65rem 0.9rem;
  border-radius: 18px;
  font-size: 0.875rem;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(8px);
}

.imessage-bubble.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.imessage-bubble.incoming {
  align-self: flex-start;
  background: #e9e9eb;
  color: var(--ink);
  border-bottom-left-radius: 4px;
}

.imessage-bubble.outgoing {
  align-self: flex-end;
  background: #007aff;
  color: var(--white);
  border-bottom-right-radius: 4px;
}

.imessage-typing {
  align-self: flex-start;
  display: none;
  gap: 4px;
  padding: 0.75rem 1rem;
  background: #e9e9eb;
  border-radius: 18px;
  border-bottom-left-radius: 4px;
}

.imessage-typing.is-active { display: flex; }

.imessage-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8e8e93;
  animation: typing-dot 1.2s ease-in-out infinite;
}

.imessage-typing span:nth-child(2) { animation-delay: 0.15s; }
.imessage-typing span:nth-child(3) { animation-delay: 0.3s; }

.imessage-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--line);
  background: #fafafa;
}

.imessage-chip {
  padding: 0.45rem 0.85rem;
  min-height: 36px;
  border-radius: var(--radius-pill);
  background: var(--white);
  border: 1px solid var(--line);
  font-size: 0.8rem;
  font-weight: 600;
  transition: background var(--dur-fast), border-color var(--dur-fast);
}

.imessage-chip:hover {
  border-color: var(--orange-primary);
  background: var(--orange-wash);
}

.sparkle-mark {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: middle;
}

@media (max-width: 520px) {
  .shift-row { grid-template-columns: 1fr; }
}
