/* =========================================================
   Yayasan Tashfiyyah Watarbiyah — style.css
   Custom styles that sit on top of Tailwind (CDN) utility classes.
   Design tokens taken from DESIGN.md ("Emerald & Gold Heritage")
   ========================================================= */

html {
  /* Cegah scroll horizontal di seluruh halaman (biang bug "teks kepotong" &
     "ada celah putih di kanan" waktu di HP). Beberapa elemen pakai animasi
     geser (translateX) sebelum "muncul" saat discroll — kalau elemen itu
     nggak dibungkus overflow-hidden, dia bisa nambah lebar halaman jadi
     lebih dari 100vw. Ini adalah pengaman tingkat halaman supaya itu nggak
     pernah kejadian lagi, apapun penyebabnya di komponen manapun. */
  overflow-x: hidden;
  /* Supaya saat klik menu/link "#tentang", "#kontak", dll, judul section
     nggak ketutup navbar yang posisinya fixed/melayang di atas konten. */
  scroll-padding-top: 110px;
}

body {
  font-family: "Plus Jakarta Sans", sans-serif;
  background-color: #f8f9fa;
  overflow-x: hidden;
  width: 100%;
}

img,
svg {
  max-width: 100%;
}

.material-symbols-outlined {
  font-variation-settings:
    "FILL" 0,
    "wght" 400,
    "GRAD" 0,
    "opsz" 24;
  display: inline-block;
  line-height: 1;
  /* Kalau font ikon "Material Symbols" gagal/lambat dimuat (koneksi HP
     lambat), browser menampilkan TEKS MENTAH nama ikonnya (mis. tulisan
     "menu", "close", "send") alih-alih simbolnya. Teks itu jauh lebih
     lebar dari kotak tombol bulat kecil yang seharusnya cuma memuat 1
     ikon, sehingga tembus/nembus keluar dan numpuk sama elemen lain.
     Baris di bawah mengunci ukurannya sama besar dengan 1 ikon (1em)
     dan memotong sisanya, apapun yang dirender di dalamnya. */
  width: 1em;
  max-width: 1em;
  overflow: hidden;
  white-space: nowrap;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Sticky glass navbar */
.glass-nav {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(248, 249, 250, 0.85);
}

.active-link {
  position: relative;
  color: #755b00 !important;
  font-weight: 700;
}
.active-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #ffe08e 0%, #ecc246 100%);
  border-radius: 9999px;
}

/* ---------- Ikon di tiap poin navbar ----------
   Supaya user lebih mudah mengenali tiap menu, setiap link nav
   (desktop & mobile) sekarang punya ikon kecil di depan labelnya. */
.nav-link-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-link-icon svg {
  flex-shrink: 0;
  stroke: currentColor;
  color: inherit;
}

.hero-gradient {
  background: linear-gradient(135deg, #005c55 0%, #00201d 100%);
}

/* Wave decoration above dark footer */
.wave-footer-bg {
  position: relative;
  background-color: #2e3132;
}
.wave-footer-bg::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background-image: url("/assets/img/wave-texture.png");
  transform: translateY(-100%);
  pointer-events: none;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}
.float-animation {
  animation: float 4s ease-in-out infinite;
}

/* Frosted glass panel used by the contact form */
.glass-panel {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Simple reveal-on-scroll utility (toggled by script.js via Velocity.js) */
.reveal-section {
  opacity: 0;
}

/* ---------- Scroll-reveal animation (native CSS, no external library) ----------
   Sebelumnya efek "muncul saat discroll" ini dijalankan lewat Velocity.js
   (CDN eksternal) dengan easing "per fisika" yang bisa overshoot/mantul.
   Di koneksi HP yang lambat, overshoot itu bisa "kepotret" di tengah jalan:
   opacity sudah penuh (1) tapi posisi (transform) belum benar-benar sampai
   0px — hasilnya teks/gambar kelihatan tapi kepotong/geser di tepi kiri
   layar (karena halaman sengaja overflow-x:hidden). Diganti transisi CSS
   biasa (tanpa pantulan, tanpa dependency eksternal) supaya animasi selalu
   selesai persis di posisi & opacity akhirnya — nggak mungkin nyangkut lagi. */
.reveal-init {
  opacity: 0;
  transform: translate3d(var(--reveal-x, 0), var(--reveal-y, 0), 0);
  transition:
    opacity 0.6s ease-out,
    transform 0.6s ease-out;
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal-init.is-revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal-init {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

/* ---------- Pratinjau Google Maps di belakang kartu "Kantor Pusat Kami" ----------
   Iframe peta ditaruh full-bleed di belakang kartu info, lalu dibuat
   samar (opacity rendah + sedikit grayscale + blur tipis) supaya kartu
   di atasnya tetap jadi fokus utama tapi user masih bisa lihat sekilas
   bentuk peta lokasinya. */
.map-preview-frame {
  opacity: 0.55;
  filter: grayscale(35%) saturate(1.1) contrast(1.02);
  pointer-events: none;
}

/* ---------- Mobile nav dropdown (hamburger menu) ---------- */
#mobile-menu-panel {
  animation: chatScreenIn 0.2s ease;
}
.mobile-menu-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #3e4947;
  border-bottom: 1px solid rgba(110, 121, 119, 0.12);
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}
.mobile-menu-link svg {
  flex-shrink: 0;
  stroke: currentColor;
}
.mobile-menu-link:last-child {
  border-bottom: 0;
}
.mobile-menu-link:hover,
.mobile-menu-link:active {
  background-color: rgba(0, 92, 85, 0.06);
  color: #005c55;
}
.mobile-menu-link.active-link {
  color: #755b00 !important;
}
.mobile-menu-link.active-link::after {
  display: none; /* garis bawah active-link cuma relevan untuk nav desktop */
}

/* Overlay gelap di belakang dropdown menu mobile, supaya jelas menu-nya
   modal/mengambang di atas konten dan mudah ditutup dengan tap di luar */
#mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(25, 28, 29, 0.35);
  z-index: 30;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
#mobile-menu-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* =========================================================
   CHAT WIDGET (Customer Service) — dari FrontEnd/style.css
   Pakai custom properties sendiri biar gak bentrok sama Tailwind
   ========================================================= */
:root {
  --emerald: #0f766e;
  --emerald-deep: #00504a;
  --emerald-ink: #1e293b;
  --gold: #c9a227;
  --gold-light: #e3c05a;
  --cream: #f8f9fa;
  --white: #ffffff;
  --ink: #191c1d;
  --gray: #3e4947;
  --line: #e5e7eb;
  --font-display: "Plus Jakarta Sans", "Helvetica", "Arial", sans-serif;
  --font-body: "Plus Jakarta Sans", "Helvetica", "Arial", sans-serif;
}

.icon-lib {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ---------- Chat widget ---------- */
.chat-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 95;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.fab-chat {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  background: var(--emerald-deep);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 32px -12px rgba(30, 41, 59, 0.55);
  transition:
    transform 0.25s ease,
    background 0.25s ease;
}
.fab-chat:hover {
  transform: scale(1.06);
  background: var(--emerald);
}
.fab-chat:active {
  transform: scale(0.93);
}
.fab-chat::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(201, 162, 39, 0.55);
  animation: chatPulse 2.4s ease-out infinite;
}
.fab-chat svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(0deg) scale(1);
  transition:
    opacity 0.25s ease,
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.fab-chat-icon-close {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(-90deg) scale(0.5);
}
.chat-widget.is-open .fab-chat-icon-open {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(90deg) scale(0.5);
}
.chat-widget.is-open .fab-chat-icon-close {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(0deg) scale(1);
}
.chat-widget.is-open .fab-chat {
  background: var(--emerald);
}

@keyframes chatPulse {
  0% {
    transform: scale(1);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

.chat-panel {
  position: absolute;
  right: 0;
  bottom: 74px;
  width: 340px;
  max-width: calc(100vw - 40px);
  height: 540px;
  max-height: calc(100vh - 120px);
  background: var(--white);
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(30, 41, 59, 0.45);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transform: translateY(16px) scale(0.97);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1),
    opacity 0.25s ease;
}
.chat-widget.is-open .chat-panel {
  transform: none;
  opacity: 1;
  pointer-events: auto;
}

/* ----- Screen switcher ----- */
.chat-screen {
  display: none;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.chat-screen.is-active {
  display: flex;
  animation: chatScreenIn 0.32s cubic-bezier(0.2, 0.7, 0.2, 1);
}

@keyframes chatScreenIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ----- Home screen ----- */
.chat-hero {
  background: linear-gradient(
    155deg,
    var(--emerald) 0%,
    var(--emerald-deep) 100%
  );
  color: var(--white);
  padding: 20px 20px 46px;
  flex-shrink: 0;
}
.chat-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.chat-hero-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.chat-hero-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.chat-hero-title {
  font-size: 20px;
  margin: 0 0 8px;
  font-family: var(--font-display);
}
.chat-hero-text {
  font-size: 12.5px;
  line-height: 1.55;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

.chat-home-body {
  flex: 1;
  padding: 0 16px 16px;
  margin-top: -28px;
  overflow-y: auto;
}

.chat-cta-card {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 14px 30px -18px rgba(30, 41, 59, 0.35);
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  transition:
    border-color 0.2s ease,
    transform 0.2s ease;
}
.chat-cta-card:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}
.chat-cta-card:active {
  transform: scale(0.98);
}
.chat-cta-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chat-cta-text strong {
  font-size: 13.5px;
  color: var(--ink);
}
.chat-cta-text span {
  font-size: 11.5px;
  color: var(--gray);
}
.chat-cta-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--emerald);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ----- List screen (Pesan) ----- */
.chat-list-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  flex-shrink: 0;
  background: var(--emerald-deep);
  color: var(--white);
  font-size: 14.5px;
}
.chat-select-toggle {
  margin-left: auto;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--white);
  font-size: 12.5px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 200px;
  cursor: pointer;
}
.chat-select-toggle:hover {
  border-color: var(--gold-light);
  color: var(--gold-light);
}

.chat-selection-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  flex-shrink: 0;
}
.chat-selection-toolbar[hidden] {
  display: none;
}
.chat-selection-all {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--emerald-deep);
  cursor: pointer;
  white-space: nowrap;
}
.chat-selection-all input {
  width: 15px;
  height: 15px;
  accent-color: var(--emerald);
  cursor: pointer;
}
.chat-selection-count {
  color: var(--gray);
  flex: 1;
}
.chat-selection-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.chat-btn-danger {
  background: #b23b3b;
  color: var(--white);
  border: 0;
  border-radius: 200px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.chat-btn-danger:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.chat-btn-cancel {
  background: none;
  border: 1px solid var(--line);
  color: var(--gray);
  border-radius: 200px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.chat-list-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: var(--white);
}
.chat-list-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray);
  margin: 0 0 10px;
}
.chat-list-section-title + .chat-cta-card {
  margin-bottom: 20px;
}
#chatRecentTitle {
  margin-top: 4px;
}

.chat-recent-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-body);
  animation: chatItemIn 0.32s ease backwards;
  transition: background-color 0.15s ease;
}
.chat-recent-item:active {
  background-color: var(--cream);
}
.chat-recent-checkbox {
  display: none;
  align-items: center;
  padding-top: 2px;
  flex-shrink: 0;
}
.chat-recent-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--emerald);
  cursor: pointer;
}
#chatRecentList.is-selecting .chat-recent-checkbox {
  display: flex;
}
.chat-recent-content {
  flex: 1;
  min-width: 0;
}
.chat-recent-item:nth-child(1) {
  animation-delay: 0.02s;
}
.chat-recent-item:nth-child(2) {
  animation-delay: 0.07s;
}
.chat-recent-item:nth-child(3) {
  animation-delay: 0.12s;
}
.chat-recent-item:nth-child(4) {
  animation-delay: 0.17s;
}
.chat-recent-item:nth-child(5) {
  animation-delay: 0.22s;
}
.chat-recent-item:nth-child(n + 6) {
  animation-delay: 0.26s;
}
.chat-recent-item:last-child {
  border-bottom: 0;
}

@keyframes chatItemIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.chat-recent-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
}
.chat-recent-top strong {
  font-size: 13px;
  color: var(--emerald-deep);
}
.chat-recent-top time {
  font-size: 11px;
  color: var(--gray);
  flex-shrink: 0;
}
.chat-recent-preview {
  font-size: 12.5px;
  color: var(--gray);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ----- Back button (dark headers) ----- */
.chat-back {
  background: none;
  border: 0;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition:
    color 0.2s ease,
    transform 0.15s ease;
}
.chat-back:hover {
  color: var(--white);
  transform: translateX(-2px);
}

/* ----- Thread screen (percakapan aktif) ----- */
.chat-panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  flex-shrink: 0;
  background: var(--emerald-deep);
  color: var(--white);
}
.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.chat-panel-title {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  flex: 1;
}
.chat-panel-title strong {
  font-size: 14px;
}
.chat-panel-title span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
}
.chat-close {
  background: none;
  border: 0;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  padding: 4px;
  transition:
    color 0.2s ease,
    transform 0.15s ease;
}
.chat-close:hover {
  color: var(--white);
  transform: rotate(90deg);
}

.chat-panel-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: var(--cream);
}
.chat-bubble {
  max-width: 84%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.5;
  animation: chatBubbleIn 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.chat-bubble-admin {
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--ink);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.chat-bubble-user {
  background: var(--emerald);
  color: var(--white);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.chat-typing {
  display: flex;
  gap: 4px;
  padding: 12px 14px;
  align-self: flex-start;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  animation: chatBubbleIn 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.chat-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gray);
  opacity: 0.5;
  animation: chatTyping 1s infinite;
}
.chat-typing span:nth-child(2) {
  animation-delay: 0.15s;
}
.chat-typing span:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes chatTyping {
  0%,
  60%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-3px);
  }
}
@keyframes chatBubbleIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ----- Lampiran file/gambar di dalam bubble ----- */
.chat-bubble-file-image {
  display: block;
}
.chat-bubble-file-image img {
  max-width: 180px;
  max-height: 180px;
  border-radius: 10px;
  display: block;
}
.chat-bubble-file-doc {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--line);
  font-size: 12.5px;
  font-weight: 700;
  color: inherit;
  word-break: break-all;
}
.chat-bubble-user .chat-bubble-file-doc {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}
.chat-bubble-text + .chat-bubble-file-image,
.chat-bubble-text + .chat-bubble-file-doc {
  margin-top: 6px;
}

/* ----- Preview file yang akan dikirim (sebelum tombol kirim ditekan) ----- */
.chat-file-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--cream);
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--emerald-deep);
  flex-shrink: 0;
}
.chat-file-preview[hidden] {
  display: none;
}
.chat-file-preview-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}
.chat-file-preview-remove {
  background: none;
  border: 0;
  color: var(--gray);
  cursor: pointer;
  display: flex;
  padding: 2px;
}
.chat-file-preview-remove:hover {
  color: var(--danger, #b23b3b);
}

.chat-panel-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: var(--white);
  flex-shrink: 0;
}
.chat-attach-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--gray);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition:
    border-color 0.2s ease,
    color 0.2s ease;
}
.chat-attach-btn:hover {
  border-color: var(--gold);
  color: var(--emerald-deep);
}
.chat-panel-form input[type="text"] {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 200px;
  padding: 10px 16px;
  font-size: 13.5px;
  font-family: var(--font-body);
  outline: none;
}
.chat-panel-form input[type="text"]:focus {
  border-color: var(--gold);
}
.chat-panel-form button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  background: var(--gold);
  color: var(--emerald-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition:
    background 0.2s ease,
    transform 0.15s ease;
}
.chat-panel-form button:hover {
  background: var(--gold-light);
}
.chat-panel-form button:active {
  transform: scale(0.86);
}

/* ----- Bottom nav ----- */
.chat-bottom-nav {
  display: flex;
  border-top: 1px solid var(--line);
  background: var(--white);
  flex-shrink: 0;
}
.chat-nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 9px 0 8px;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--gray);
  font-family: var(--font-body);
  font-size: 10.5px;
  transition:
    color 0.2s ease,
    transform 0.15s ease;
}
.chat-nav-btn.is-active {
  color: var(--emerald);
}
.chat-nav-btn:hover {
  color: var(--emerald);
}
.chat-nav-btn:active {
  transform: scale(0.92);
}
.chat-nav-btn svg {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.chat-nav-btn.is-active svg {
  transform: translateY(-1px) scale(1.08);
}

@media (max-width: 480px) {
  .chat-panel {
    width: calc(100vw - 32px);
    right: -8px;
    height: min(540px, calc(100vh - 100px));
  }
  .chat-widget {
    right: 20px;
    bottom: 20px;
  }
}

