/* ============ Base ============ */
html { scroll-behavior: smooth; }
body { -webkit-tap-highlight-color: transparent; }

@media (max-width: 767px) {
  main { padding-bottom: 90px; }
}

/* ============ Buttons / Nav ============ */
.nav-btn {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: #d6d3d1;
  border-radius: 0.5rem;
  transition: color 0.2s;
  background: transparent;
  border: none;
  cursor: pointer;
}
.nav-btn:hover { color: white; }
.nav-btn.active { color: #ffa45a; }

.tab-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.25rem;
  padding: 0.75rem 0;
  font-size: 11px;
  color: #a8a29e;
  background: transparent; border: none; cursor: pointer;
  transition: color 0.2s;
}
.tab-btn:hover { color: white; }
.tab-btn.active { color: #ffa45a; }

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  background: #f97316; color: #0a0908;
  font-weight: 600;
  border-radius: 9999px;
  border: none; cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  box-shadow: 0 10px 40px -10px rgba(249, 115, 22, 0.55);
}
.btn-primary:hover { background: #ff8a2c; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  background: rgba(255,255,255,0.05); color: #f5f5f4;
  border: 1px solid rgba(255,255,255,0.1);
  font-weight: 600; border-radius: 9999px; cursor: pointer;
  transition: background 0.2s;
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  background: #1a1917; color: #f5f5f4;
  border: 1px solid rgba(255,255,255,0.1);
  font-weight: 600; border-radius: 9999px; cursor: pointer;
  transition: background 0.2s;
}
.btn-secondary:hover { background: #26241f; }

/* ============ Cards / Chips ============ */
.card {
  border-radius: 1rem;
  background: #121110;
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 12px 30px -16px rgba(0,0,0,0.7);
}
.chip {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(255,255,255,0.05);
  color: #d6d3d1;
  border: 1px solid rgba(255,255,255,0.1);
}

/* ============ Stepper ============ */
.step-pill {
  flex: 1 1 0; min-width: 90px;
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
  color: #a8a29e;
  font-size: 0.75rem; font-weight: 500;
  transition: all 0.2s;
  user-select: none;
  list-style: none;
}
.step-pill .dot {
  width: 1.25rem; height: 1.25rem; border-radius: 9999px;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700;
  background: rgba(255,255,255,0.06);
  color: #d6d3d1;
}
.step-pill.active {
  border-color: rgba(249,115,22,0.45);
  background: rgba(249,115,22,0.08);
  color: #ffd5ad;
}
.step-pill.active .dot { background: #f97316; color: #0a0908; }
.step-pill.done { color: #d6d3d1; }
.step-pill.done .dot { background: #16a34a; color: white; }

/* ============ Tile (service / barber card) ============ */
.tile {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  background: #121110;
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 12px 30px -16px rgba(0,0,0,0.7);
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  text-align: left;
  width: 100%;
  color: inherit;
  font: inherit;
  padding: 0;
}
.tile:hover { border-color: rgba(249,115,22,0.4); transform: translateY(-2px); }
.tile.selected {
  border-color: #f97316;
  box-shadow: 0 0 0 2px rgba(249,115,22,0.45), 0 12px 30px -16px rgba(0,0,0,0.7);
}
.tile.selected::after {
  content: '';
  position: absolute; top: 10px; right: 10px;
  width: 26px; height: 26px; border-radius: 9999px;
  background: #f97316;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a0908' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  background-repeat: no-repeat; background-position: center; background-size: 16px 16px;
  z-index: 5;
}
.tile img { display: block; }

/* ============ Time slots ============ */
.slot {
  padding: 0.625rem 0.75rem;
  border-radius: 0.75rem;
  font-size: 0.875rem; font-weight: 500;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  color: #d6d3d1;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}
.slot:not(:disabled):hover { border-color: rgba(249,115,22,0.5); color: white; }
.slot.selected { background: #f97316; color: #0a0908; border-color: #f97316; }
.slot:disabled {
  color: #57534e;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,0.02) 0 6px, transparent 6px 12px);
  cursor: not-allowed;
  text-decoration: line-through;
  text-decoration-color: rgba(255,255,255,0.15);
}

/* ============ Calendar day ============ */
.day {
  aspect-ratio: 1 / 1;
  border-radius: 0.75rem;
  font-size: 0.875rem; font-weight: 500;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.02);
  color: #d6d3d1;
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
  transition: background 0.15s, color 0.15s;
}
.day:not(:disabled):hover { background: rgba(249,115,22,0.1); color: white; }
.day.selected { background: #f97316; color: #0a0908; }
.day.today { border-color: rgba(249,115,22,0.4); }
.day:disabled {
  color: #44403c;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,0.015) 0 4px, transparent 4px 8px);
  cursor: not-allowed;
}
.day.full::after {
  content: '';
  position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 9999px; background: #ef4444;
}

/* ============ Form ============ */
.field {
  width: 100%;
  background: #121110;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  color: #f5f5f4;
  transition: border-color 0.2s, box-shadow 0.2s;
  font: inherit;
}
.field::placeholder { color: #78716c; }
.field:focus {
  outline: none;
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249,115,22,0.2);
}
.label {
  display: block;
  font-size: 0.7rem;
  color: #a8a29e;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.5rem;
}

/* ============ Animations ============ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.fade-up { animation: fadeUp 0.35s ease both; }

@keyframes pop { 0% { transform: scale(0.6); opacity: 0; } 60% { transform: scale(1.1); } 100% { transform: scale(1); opacity: 1; } }
.pop { animation: pop 0.5s cubic-bezier(.2,.9,.3,1.4) both; }

/* ============ Misc ============ */
#toast.show { display: block; animation: fadeUp 0.25s ease both; }

iframe { background: #1a1917; }

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
