/* Man On A Bike - custom.css
   Hand-written styles for elements that are NOT part of the reused
   Tailwind bundle (site.css) — scroll-reveal, mobile nav, chat popup,
   footer credit, review cards, 404 page, and mobile/tap-target fixes. */

/* ---------- Scroll reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- 16px+ form fields (avoid iOS auto-zoom) ---------- */
input.flex, textarea.flex, .chat-field {
  font-size: 16px !important;
}

/* ---------- 44px minimum tap targets ---------- */
#mobile-menu-btn, #mobile-nav-close, .chat-panel-close {
  min-width: 44px;
  min-height: 44px;
}

/* ---------- Mobile nav overlay ---------- */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: hsl(var(--background));
  display: flex;
  flex-direction: column;
  padding: 20px 24px 32px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  visibility: hidden;
}
.mobile-nav.is-open {
  transform: translateX(0);
  visibility: visible;
}
.mobile-nav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}
.mobile-nav-close {
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: hsl(var(--foreground));
  display: flex;
  align-items: center;
  justify-content: center;
}
.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-nav-links a {
  padding: 16px 4px;
  font-size: 19px;
  font-weight: 600;
  color: hsl(var(--foreground));
  border-bottom: 1px solid hsl(var(--border));
  text-decoration: none;
}
.mobile-nav-call {
  margin-top: 20px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: hsl(var(--primary));
  color: #fff !important;
  border-radius: 999px;
  padding: 16px !important;
  font-weight: 700;
  border-bottom: none !important;
  text-align: center;
}

/* ---------- Footer credit ---------- */
.site-footer {
  background: #14301c;
  color: #fff;
  padding: 16px 0;
}
.footer-credit a {
  color: #fff;
  text-decoration: underline;
  font-weight: 600;
}
.footer-credit a:hover {
  opacity: 0.85;
}

/* ---------- Review cards (static, crawlable) ---------- */
.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 0 0 32px;
}
.review-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}
.review-card .review-stars {
  color: #fbbc05;
  font-size: 15px;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.review-card .review-name {
  font-weight: 700;
  color: #14301c;
}
.review-card .review-date {
  font-size: 12px;
  color: #888;
  margin-bottom: 10px;
}
.review-card .review-text {
  font-size: 14px;
  line-height: 1.5;
  color: #333;
}

/* ---------- Chat popup ---------- */
.chat-fab-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 65;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: hsl(var(--primary));
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, background-color 0.2s ease;
  padding: 0;
}
.chat-fab-btn:hover {
  transform: scale(1.05);
}
.chat-fab-btn.is-open {
  background: #14301c;
}
.chat-fab-btn svg {
  width: 28px;
  height: 28px;
  color: #fff;
}
.chat-fab-icon-close {
  display: none;
}
.chat-fab-btn.is-open .chat-fab-icon-close {
  display: block;
}
.chat-fab-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
}
.chat-fab-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.chat-fab-btn.is-open .chat-fab-photo {
  display: none;
}
.chat-fab-status {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  background: #22c55e;
  border: 2px solid #fff;
  border-radius: 50%;
  z-index: 1;
}
.chat-fab-btn.is-open .chat-fab-status {
  display: none;
}

.chat-panel {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 340px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  z-index: 64;
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.chat-panel.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.chat-panel-header {
  background: #14301c;
  padding: 18px 44px 18px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}
.chat-panel-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.5);
}
.chat-panel-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.chat-panel-title {
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
  margin: 0;
}
.chat-panel-subtitle {
  color: rgba(255, 255, 255, 0.85);
  font-size: 12.5px;
  margin-top: 2px;
}
.chat-panel-close {
  position: absolute;
  top: 6px;
  right: 4px;
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chat-panel-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-field {
  width: 100%;
  border: 1px solid #e7e5e1;
  background: #f4f3f0;
  border-radius: 10px;
  padding: 12px 14px;
  color: #222;
  font-family: inherit;
  box-sizing: border-box;
}
.chat-field::placeholder {
  color: #9a9a95;
}
textarea.chat-field {
  resize: none;
  min-height: 84px;
}
.chat-send-btn {
  margin-top: 4px;
  width: 100%;
  background: hsl(var(--accent));
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.chat-send-btn:hover {
  opacity: 0.9;
}
.chat-send-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.form-status {
  display: none;
  font-size: 13.5px;
  padding: 10px 12px;
  border-radius: 8px;
  line-height: 1.5;
}
.form-status.is-visible {
  display: block;
}
.form-status.status-error {
  background: #fdecec;
  color: #a3261e;
}
.form-status.status-success {
  background: #e7f7ec;
  color: #0f6b32;
}
.form-fallback-call {
  font-weight: 700;
  color: inherit;
  text-decoration: underline;
}

@media (max-width: 480px) {
  .chat-panel {
    right: 16px;
    bottom: 96px;
    width: calc(100vw - 32px);
  }
  .chat-fab-btn {
    right: 16px;
    bottom: 16px;
  }
}

/* ---------- 404 page ---------- */
.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
}
.error-page .error-code {
  font-size: 96px;
  font-weight: 800;
  color: hsl(var(--primary));
  line-height: 1;
  margin-bottom: 8px;
}
.error-page h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
  color: hsl(var(--foreground));
}
.error-page p {
  color: hsl(var(--muted-foreground));
  max-width: 480px;
  margin: 0 0 28px;
}
.error-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}
