.wz-chat { position: fixed; right: 20px; bottom: 20px; z-index: 9999; font-family: Outfit, sans-serif; }
.wz-chat__bubble { position: relative; width: 56px; height: 56px; border-radius: 50%; background: #ED1E79; color: #fff; font-size: 24px; border: 3px solid #fff; box-shadow: 0 4px 14px rgba(0,0,0,.35); cursor: pointer; }
.wz-chat__panel { position: absolute; right: 0; bottom: 68px; width: 340px; max-width: calc(100vw - 32px); height: 460px; max-height: calc(100vh - 40px); background: #fff; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.25); display: flex; flex-direction: column; overflow: hidden; }
.wz-chat__panel[hidden] { display: none; }
.wz-chat__head { background: #ED1E79; color: #fff; padding: 12px 16px; display: flex; align-items: center; gap: 10px; }
.wz-chat__avatar { width: 40px; height: 40px; border-radius: 50%; background: #fff; padding: 4px; }
.wz-chat__headtext { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.wz-chat__headtext small { opacity: .85; font-size: 12px; }
.wz-chat__row { display: flex; align-items: flex-end; gap: 6px; }
.wz-chat__row--visitor { justify-content: flex-end; }
.wz-chat__mini { width: 26px; height: 26px; border-radius: 50%; background: #fdeaf2; padding: 2px; flex: none; }
.wz-chat__row .wz-chat__msg { max-width: 78%; align-self: auto; }
.wz-chat__contact { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.wz-chat__contact input { border: 1px solid #ccc; border-radius: 8px; padding: 8px 10px; font: inherit; width: 100%; }
.wz-chat__close { background: none; border: 0; color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.wz-chat__body { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: 12px; }
.wz-chat__hello { margin: 0 0 10px; }
.wz-chat__form { display: flex; flex-direction: column; gap: 8px; }
.wz-chat__form input, .wz-chat__form textarea, .wz-chat__reply input { border: 1px solid #ccc; border-radius: 8px; padding: 8px 10px; font: inherit; width: 100%; }
.wz-chat__trap { position: absolute; left: -9999px; }
.wz-chat__send { background: #ED1E79; color: #fff; border: 0; border-radius: 8px; padding: 8px 14px; font: inherit; cursor: pointer; }
.wz-chat__send:disabled { opacity: .6; }
.wz-chat__err { color: #c00; margin: 0; font-size: 13px; }
.wz-chat__messages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding-bottom: 8px; }
.wz-chat__msg { max-width: 80%; padding: 8px 12px; border-radius: 12px; white-space: pre-wrap; word-wrap: break-word; }
.wz-chat__msg--visitor { align-self: flex-end; background: #ED1E79; color: #fff; }
.wz-chat__msg--admin { align-self: flex-start; background: #f0f0f0; color: #222; }
.wz-chat__reply { display: flex; gap: 6px; }

.support-inbox { display: flex; height: calc(100vh - 70px); background: #fff; }
.support-inbox__list { width: 280px; overflow-y: auto; border-right: 1px solid #ddd; }
.support-inbox__item { display: block; padding: 12px 14px; border-bottom: 1px solid #eee; color: #222; text-decoration: none; }
.support-inbox__item.is-active { background: #fdeaf2; }
.support-inbox__name { font-weight: 700; margin-right: 6px; }
.support-inbox__thread { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.support-inbox__head { padding: 12px 16px; border-bottom: 1px solid #ddd; }
.support-inbox__messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.support-inbox__reply { display: flex; gap: 8px; padding: 12px; border-top: 1px solid #ddd; }
.support-msg { max-width: 70%; padding: 8px 12px; border-radius: 12px; white-space: pre-wrap; }
.support-msg small { display: block; opacity: .65; font-size: 11px; margin-top: 2px; }
.support-msg--visitor { align-self: flex-start; background: #f0f0f0; }
.support-msg--admin { align-self: flex-end; background: #ED1E79; color: #fff; }
@media (max-width: 767px) {
  .support-inbox { flex-direction: column; height: calc(100vh - 56px); height: calc(100dvh - 56px); }
  .support-inbox__list { width: 100%; flex: 1; border-right: 0; }
  .support-inbox__thread { flex: 1; }
  .support-inbox--chat .support-inbox__list { display: none; }
  .support-inbox:not(.support-inbox--chat) .support-inbox__thread { display: none; }
  .support-inbox__reply { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
}

.wz-chat__hint { position: absolute; right: 68px; bottom: 10px; background: #fff; color: #222; border: 0; border-radius: 10px; padding: 10px 16px; font: inherit; font-size: 16px; white-space: nowrap; box-shadow: 0 4px 14px rgba(0,0,0,.2); cursor: pointer; animation: wz-chat-hint .3s ease-out; }
.wz-chat__hint::after { content: ''; position: absolute; right: -6px; top: 50%; margin-top: -6px; width: 12px; height: 12px; background: #fff; transform: rotate(45deg); border-radius: 2px; }
.wz-chat__hint[hidden] { display: none; }
@keyframes wz-chat-hint { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 480px) { .wz-chat__hint { display: none; } }

.wz-chat__bubble::before { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 3px solid #fff; opacity: 0; animation: wz-chat-pulse 2s ease-out infinite; pointer-events: none; }
@keyframes wz-chat-pulse { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.5); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .wz-chat__bubble::before { animation: none; } }

/* Sit the reCAPTCHA badge directly under the chat button. */
.grecaptcha-badge { z-index: 9998 !important; right: -166px !important; bottom: 16px !important; }

.support-inbox__push { position: absolute; right: 16px; top: 74px; z-index: 5; }
@media (max-width: 767px) { .support-inbox__push { top: 64px; } }

.support-inbox__tabs { display: flex; border-bottom: 1px solid #ddd; }
.support-inbox__tabs a { flex: 1; text-align: center; padding: 10px; color: #666; text-decoration: none; }
.support-inbox__tabs a.is-active { color: #ED1E79; font-weight: 700; border-bottom: 2px solid #ED1E79; }

.wz-chat__hint { display: flex; align-items: center; gap: 8px; }
.wz-chat__hintbot { width: 28px; height: 28px; flex: none; animation: wz-chat-float 2.4s ease-in-out infinite; }
@keyframes wz-chat-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .wz-chat__hintbot { animation: none; } }

/* Tidio-style panel: pink header with greeting, Home / Chat tabs, bottom sheet on phones. */
.wz-chat__head { position: relative; flex-wrap: wrap; }
.wz-chat__panel.is-home .wz-chat__head { min-height: 190px; align-items: flex-start; }
.wz-chat__panel.is-home .wz-chat__headtext { visibility: hidden; }
.wz-chat__greet { display: none; width: 100%; align-self: flex-end; font-size: 28px; font-weight: 700; margin-top: auto; }
.wz-chat__panel.is-home .wz-chat__greet { display: block; }
.wz-chat__panel.is-home .wz-chat__avatar { width: 52px; height: 52px; }
.wz-chat__panel.is-home .wz-chat__body { background: linear-gradient(#ED1E79 0, #ED1E79 28px, #fff 28px); padding-top: 0; }
.wz-chat__card { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; width: 100%; background: #fff; border: 1px solid #e3e3e8; border-radius: 12px; padding: 14px 16px; margin-top: -1px; font: inherit; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.wz-chat__cardtext { display: flex; flex-direction: column; }
.wz-chat__cardtext small { color: #666; margin-top: 2px; }
.wz-chat__card .fa { color: #ED1E79; font-size: 20px; }
.wz-chat__nav { display: flex; border-top: 1px solid #eee; }
.wz-chat__tab { flex: 1; background: none; border: 0; padding: 8px 0 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; color: #777; font: inherit; font-size: 13px; cursor: pointer; }
.wz-chat__tab .fa { font-size: 20px; }
.wz-chat__tab.is-active { color: #ED1E79; font-weight: 700; }
@media (max-width: 480px) {
  .wz-chat__panel { position: fixed; left: 0; right: 0; bottom: 0; width: 100%; max-width: none; height: 85vh; height: 85dvh; max-height: none; border-radius: 16px 16px 0 0; }
  .wz-chat__nav { padding-bottom: env(safe-area-inset-bottom); }
}

.support-inbox__visitor { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border-bottom: 1px solid #eee; }
.support-inbox__visitor span { display: flex; flex-direction: column; min-width: 0; }
.support-inbox__visitor strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.support-inbox__visitor small { color: #777; }
