/* Hand-written CSS for widgets added during the clone (mobile menu, chat popup).
   The reused site.css is a purged Tailwind build — only classes used on the
   original 4 pages survived, so new UI here is plain CSS using the same
   design tokens instead of guessing at Tailwind utilities that may be gone. */

.mobile-menu {
  border-top: 1px solid hsl(var(--border));
  background: hsl(var(--background));
}
.mobile-menu.hidden { display: none; }
.mobile-menu__link {
  display: block;
  padding: 0.85rem 0;
  font-size: 1rem;
  font-weight: 500;
  color: hsl(var(--foreground));
  border-bottom: 1px solid hsl(var(--border));
}
.mobile-menu__link:last-child { border-bottom: none; }
.mobile-menu__link:hover { color: hsl(var(--primary)); }

.chat-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
}

.chat-toggle {
  position: relative;
  height: 3.5rem;
  width: 3.5rem;
  border-radius: 9999px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid #fff;
  background: hsl(var(--primary));
  cursor: pointer;
  transition: transform 0.2s ease;
}
.chat-toggle:hover { transform: scale(1.05); }
.chat-toggle img { height: 100%; width: 100%; object-fit: cover; }
.chat-toggle .chat-toggle__close { color: #fff; height: 1.5rem; width: 1.5rem; }
.chat-toggle.hidden-el,
.chat-toggle__close.hidden-el,
.chat-panel.hidden-el { display: none; }

.chat-panel {
  position: absolute;
  bottom: 4.5rem;
  right: 0;
  width: 20rem;
  max-width: calc(100vw - 3rem);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
}

.chat-panel__header {
  background: hsl(var(--primary));
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.chat-panel__avatar-wrap { position: relative; flex-shrink: 0; }
.chat-panel__avatar {
  height: 2.5rem;
  width: 2.5rem;
  border-radius: 9999px;
  object-fit: cover;
  border: 2px solid #fff;
  display: block;
}
.chat-panel__online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  height: 0.7rem;
  width: 0.7rem;
  border-radius: 9999px;
  background: #4ade80;
  border: 2px solid #fff;
}
.chat-panel__title { flex: 1; min-width: 0; }
.chat-panel__title strong {
  display: block;
  color: #fff;
  font-weight: 700;
  line-height: 1.2;
}
.chat-panel__title span {
  display: block;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.75rem;
  line-height: 1.2;
}
.chat-panel__close {
  color: rgba(255, 255, 255, 0.9);
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  line-height: 0;
}
.chat-panel__close:hover { color: #fff; }

.chat-panel__body { padding: 1.25rem; }
.chat-panel__intro {
  font-size: 0.9rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 1rem;
}
.chat-panel__form { display: flex; flex-direction: column; gap: 0.75rem; }
.chat-panel__form input,
.chat-panel__form textarea {
  width: 100%;
  border: 1px solid hsl(var(--input));
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  background: hsl(var(--secondary) / 0.5);
  color: hsl(var(--foreground));
}
.chat-panel__form input::placeholder,
.chat-panel__form textarea::placeholder { color: hsl(var(--muted-foreground)); }
.chat-panel__form textarea { min-height: 90px; resize: vertical; }
.chat-panel__form input:focus,
.chat-panel__form textarea:focus {
  outline: none;
  box-shadow: 0 0 0 2px hsl(var(--ring));
}
.chat-panel__submit {
  width: 100%;
  height: 2.75rem;
  border-radius: 0.375rem;
  border: none;
  background: hsl(var(--primary));
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}
.chat-panel__submit:hover { background: hsl(var(--primary) / 0.9); }
.chat-panel__submit:disabled { opacity: 0.6; cursor: not-allowed; }

.form-status { font-size: 0.875rem; }
.form-status--error { color: hsl(var(--destructive)); }
.form-status--success { color: hsl(var(--primary)); font-weight: 500; }
.form-status.hidden-el { display: none; }

@media (max-width: 400px) {
  .chat-panel { width: calc(100vw - 3rem); }
}
