/* Custom additions on top of the compiled Tailwind bundle (style.css) */

/* ---- Header Call Now button ---- */
.call-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s ease;
}
.call-btn:hover {
  background: hsl(var(--primary) / 0.9);
}
.call-btn svg {
  height: 1rem;
  width: 1rem;
  flex-shrink: 0;
  animation: call-ring 1.6s ease-in-out infinite;
  transform-origin: 50% 20%;
}
@keyframes call-ring {
  0%, 100% { transform: rotate(0deg); }
  8% { transform: rotate(-14deg); }
  16% { transform: rotate(10deg); }
  24% { transform: rotate(-8deg); }
  32% { transform: rotate(4deg); }
  40% { transform: rotate(0deg); }
}
@media (max-width: 600px) {
  .call-btn .cb-num { display: none; }
}

/* ---- Mobile nav drawer ---- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: hsl(var(--background));
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}
.mobile-menu.hidden { display: none; }
.mobile-menu nav {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
}
.mobile-menu nav a {
  font-size: 1.25rem;
  font-weight: 500;
  color: hsl(var(--foreground));
}
.mobile-menu-close {
  align-self: flex-end;
}

/* ---- Chat widget ---- */
.chat-panel {
  width: 320px;
  max-width: calc(100vw - 2rem);
  margin-bottom: 1rem;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.15), 0 8px 10px -6px rgb(0 0 0 / 0.15);
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
}
.chat-panel.hidden { display: none; }
.chat-panel-header {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.chat-panel-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.chat-panel-avatar {
  height: 40px;
  width: 40px;
  border-radius: 9999px;
  object-fit: cover;
  border: 2px solid hsl(var(--primary-foreground) / 0.4);
  flex-shrink: 0;
}
.chat-panel-header h3 {
  font-weight: 700;
  font-size: 1rem;
  margin: 0;
}
.chat-panel-header p {
  font-size: 0.8rem;
  color: hsl(var(--primary-foreground) / 0.85);
  margin: 0.125rem 0 0;
}
.chat-panel-close {
  background: none;
  border: none;
  color: hsl(var(--primary-foreground));
  cursor: pointer;
  padding: 0;
  line-height: 1;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.chat-panel-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: hsl(var(--card));
}
.chat-panel-body input,
.chat-panel-body textarea {
  width: 100%;
  border-radius: 0.375rem;
  border: 1px solid hsl(var(--input));
  background: hsl(var(--background));
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  color: hsl(var(--foreground));
}
.chat-panel-body textarea {
  min-height: 80px;
  resize: vertical;
}
.chat-toggle-btn {
  height: 4rem;
  width: 4rem;
  border-radius: 9999px;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: hsl(var(--primary));
  border: 1px solid hsl(var(--border));
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s ease;
}
.chat-toggle-btn:hover {
  transform: scale(1.05);
}
.chat-toggle-avatar {
  height: 100%;
  width: 100%;
  object-fit: cover;
  border-radius: 9999px;
}
.chat-toggle-btn.is-open .chat-toggle-avatar {
  display: none;
}
.chat-toggle-close-icon {
  display: none;
  color: hsl(var(--primary-foreground));
}
.chat-toggle-btn.is-open .chat-toggle-close-icon {
  display: block;
}
.chat-online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  height: 1rem;
  width: 1rem;
  background: #22c55e;
  border-radius: 9999px;
  border: 2px solid white;
  z-index: 10;
}
.chat-toggle-btn.is-open .chat-online-dot {
  display: none;
}

/* ---- Form status messages ---- */
.form-status {
  font-size: 0.875rem;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  display: none;
}
.form-status.show { display: block; }
.form-status.success {
  background: hsl(143 85% 96%);
  color: hsl(140 100% 27%);
}
.form-status.error {
  background: hsl(359 100% 97%);
  color: hsl(360 100% 45%);
}
.form-status.error a {
  text-decoration: underline;
  font-weight: 600;
}

/* ---- Scroll reveal ---- */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
  }
  [data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Footer credit ---- */
.footer-bottom-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
@media (min-width: 640px) {
  .footer-bottom-bar {
    flex-direction: row;
  }
}
.footer-credit {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}
.footer-credit a {
  color: hsl(var(--muted-foreground));
  font-weight: 400;
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-credit a:hover {
  color: hsl(var(--primary));
}
