@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&display=swap');
/* /content/themes/giftun/css/ehna-legacy.css */
/* =====================================================================
   Ehna legacy compat for Giftun
   Renders the default-theme (Bootstrap + Ehna utility) markup used by
   Ehna payment modals and Ehna admin screens with Giftun's tokens.
   Scoped to .ehna-legacy so native Giftun screens are untouched.
   ===================================================================== */
.ehna-legacy {
  --lg-border: color-mix(in oklab, var(--color-base-content) 12%, transparent);
  --lg-muted: color-mix(in oklab, var(--color-base-content) 60%, transparent);
  --lg-soft: color-mix(in oklab, var(--color-base-content) 5%, var(--color-base-100));
  color: var(--color-base-content);
  font-size: .9375rem;
  line-height: 1.5;
}
.ehna-legacy *, .ehna-legacy *::before, .ehna-legacy *::after { box-sizing: border-box; }
.ehna-legacy a:not(.btn) { color: var(--color-primary); }
.ehna-legacy h1, .ehna-legacy h2, .ehna-legacy h3, .ehna-legacy h4, .ehna-legacy h5, .ehna-legacy h6 { font-weight: 600; line-height: 1.3; margin: 0 0 .5rem; }
.ehna-legacy h5 { font-size: 1.05rem; } .ehna-legacy h6 { font-size: .95rem; }
.ehna-legacy hr, .ehna-legacy .divider { border: 0; border-top: 1px solid var(--lg-border); margin: 1rem 0; height: 0; }
.ehna-legacy .heading-small { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--lg-muted); }

/* modal parts */
.ehna-legacy .modal-header { display: flex; align-items: center; gap: .75rem; padding: 0 0 1rem; border-bottom: 1px solid var(--lg-border); margin-bottom: 1rem; }
.ehna-legacy .modal-title { flex: 1; margin: 0; font-size: 1.05rem; font-weight: 700; }
.ehna-legacy .btn-close {
  width: 2rem; height: 2rem; border: 0; border-radius: 999px; cursor: pointer; flex-shrink: 0;
  background: var(--lg-soft) center/.75rem no-repeat url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23888'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e");
}
.ehna-legacy .modal-body { padding: 0; }
.ehna-legacy .modal-footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; padding-top: 1rem; margin-top: 1rem; border-top: 1px solid var(--lg-border); }

/* buttons */
.ehna-legacy .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 2.5rem; padding: .5rem 1rem; border: 1px solid transparent; border-radius: .85rem;
  font-size: .875rem; font-weight: 600; line-height: 1.2; cursor: pointer; text-decoration: none;
  background: var(--lg-soft); color: var(--color-base-content); transition: filter .15s ease, transform .1s ease;
}
.ehna-legacy .btn:hover { filter: brightness(1.08); }
.ehna-legacy .btn:active { transform: scale(.98); }
.ehna-legacy .btn:disabled, .ehna-legacy .btn.disabled { opacity: .55; pointer-events: none; }
.ehna-legacy .btn-sm { min-height: 2rem; padding: .3rem .75rem; font-size: .8125rem; border-radius: .7rem; }
.ehna-legacy .btn-lg { min-height: 3rem; padding: .7rem 1.4rem; font-size: 1rem; }
.ehna-legacy .btn-primary { background: var(--color-primary); color: var(--color-primary-content); }
.ehna-legacy .btn-secondary { background: var(--color-secondary); color: var(--color-secondary-content); }
.ehna-legacy .btn-success { background: var(--color-success); color: var(--color-success-content); }
.ehna-legacy .btn-danger { background: var(--color-error); color: var(--color-error-content); }
.ehna-legacy .btn-warning { background: var(--color-warning); color: var(--color-warning-content); }
.ehna-legacy .btn-info { background: var(--color-info); color: var(--color-info-content); }
.ehna-legacy .btn-light, .ehna-legacy .btn-default { background: var(--lg-soft); color: var(--color-base-content); border-color: var(--lg-border); }
.ehna-legacy .btn-dark { background: var(--color-neutral); color: var(--color-neutral-content); }
.ehna-legacy [class*="btn-outline-"] { background: transparent; border-color: currentColor; }
.ehna-legacy .btn-outline-primary { color: var(--color-primary); }
.ehna-legacy .btn-outline-danger { color: var(--color-error); }
.ehna-legacy .btn-outline-secondary, .ehna-legacy .btn-outline-light { color: var(--lg-muted); }
.ehna-legacy .btn-block, .ehna-legacy .d-grid > .btn { width: 100%; }
/* payment gateway tiles */
.ehna-legacy .btn-payment {
  flex-direction: column; min-height: 4.25rem; width: 100%; padding: .75rem; border: 1px solid var(--lg-border);
  border-radius: 1rem; background: var(--color-base-100); font-size: .8125rem;
}
.ehna-legacy .btn-payment:hover { border-color: var(--color-primary); box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-primary) 18%, transparent); }
.ehna-legacy .btn-payment img, .ehna-legacy .btn-payment svg { max-height: 1.75rem; width: auto; }

/* forms */
.ehna-legacy .form-group { margin-bottom: 1rem; }
.ehna-legacy .form-label, .ehna-legacy label.col-form-label { display: block; margin-bottom: .35rem; font-size: .875rem; font-weight: 600; }
.ehna-legacy .form-text { margin-top: .3rem; font-size: .8rem; color: var(--lg-muted); }
.ehna-legacy .form-control, .ehna-legacy .form-select, .ehna-legacy textarea:not(.ql-editor), .ehna-legacy select:not([class]), .ehna-legacy input[type="text"]:not([class]), .ehna-legacy input[type="number"]:not([class]) {
  display: block; width: 100%; min-height: 2.6rem; padding: .55rem .8rem; border: 1px solid var(--lg-border); border-radius: .85rem;
  background: var(--color-base-100); color: var(--color-base-content); font-size: .9rem;
}
.ehna-legacy .form-control:focus, .ehna-legacy .form-select:focus { outline: 0; border-color: var(--color-primary); box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-primary) 22%, transparent); }
.ehna-legacy .form-control-sm { min-height: 2.1rem; padding: .35rem .65rem; font-size: .85rem; }
.ehna-legacy textarea.form-control { min-height: 6rem; }
.ehna-legacy .form-check { display: flex; align-items: center; gap: .5rem; margin-bottom: .35rem; }
.ehna-legacy .form-check-inline { display: inline-flex; margin-inline-end: 1rem; }
.ehna-legacy .form-check-input { width: 1.05rem; height: 1.05rem; accent-color: var(--color-primary); }
.ehna-legacy .form-switch .form-check-input { width: 2.2rem; }
.ehna-legacy .input-group { display: flex; } .ehna-legacy .input-group > * { border-radius: 0; } .ehna-legacy .input-group > :first-child { border-start-start-radius: .85rem; border-end-start-radius: .85rem; } .ehna-legacy .input-group > :last-child { border-start-end-radius: .85rem; border-end-end-radius: .85rem; }
.ehna-legacy .input-group-text { display: flex; align-items: center; padding: 0 .75rem; border: 1px solid var(--lg-border); background: var(--lg-soft); font-size: .85rem; }

/* Ehna switch */
.ehna-legacy .switch { position: relative; display: inline-block; width: 2.75rem; height: 1.5rem; flex-shrink: 0; }
.ehna-legacy .switch input { opacity: 0; width: 0; height: 0; }
.ehna-legacy .switch .slider { position: absolute; inset: 0; border-radius: 999px; background: color-mix(in oklab, var(--color-base-content) 22%, transparent); cursor: pointer; transition: background .2s; }
.ehna-legacy .switch .slider::before { content: ""; position: absolute; width: 1.1rem; height: 1.1rem; inset-inline-start: .2rem; top: .2rem; border-radius: 999px; background: #fff; transition: transform .2s; }
.ehna-legacy .switch input:checked + .slider { background: var(--color-primary); }
.ehna-legacy .switch input:checked + .slider::before { transform: translateX(1.25rem); }
[dir="rtl"] .ehna-legacy .switch input:checked + .slider::before { transform: translateX(-1.25rem); }
/* Ehna setting row */
.ehna-legacy .form-table-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .85rem; padding: .85rem 1rem; margin-bottom: .6rem; border-radius: 1rem; background: color-mix(in oklab, var(--color-base-200) 60%, transparent); }
.ehna-legacy .form-table-row .avatar { display: inline-flex; width: 2.75rem; height: 2.75rem; align-items: center; justify-content: center; border-radius: .9rem; background: color-mix(in oklab, var(--ehna-orange) 14%, transparent); color: var(--ehna-orange); }
.ehna-legacy .form-table-row .avatar svg, .ehna-legacy .form-table-row .avatar img { width: 1.6rem !important; height: 1.6rem !important; }
.ehna-legacy .form-table-row .form-label { margin: 0; }

/* alerts & badges */
.ehna-legacy .alert { display: flex; gap: .6rem; align-items: flex-start; padding: .8rem 1rem; border-radius: .9rem; font-size: .875rem; border: 1px solid transparent; margin-bottom: 1rem; }
.ehna-legacy .alert-success { background: color-mix(in oklab, var(--color-success) 14%, transparent); color: var(--color-success); }
.ehna-legacy .alert-danger { background: color-mix(in oklab, var(--color-error) 14%, transparent); color: var(--color-error); }
.ehna-legacy .alert-warning { background: color-mix(in oklab, var(--color-warning) 16%, transparent); color: var(--color-warning); }
.ehna-legacy .alert-info, .ehna-legacy .alert-primary { background: color-mix(in oklab, var(--color-info) 14%, transparent); color: var(--color-base-content); border-color: color-mix(in oklab, var(--color-info) 30%, transparent); }
.ehna-legacy .badge { display: inline-flex; align-items: center; gap: .25rem; padding: .15rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 700; background: var(--lg-soft); }
.ehna-legacy .bg-success { background: var(--color-success) !important; color: #fff; }
.ehna-legacy .bg-danger { background: var(--color-error) !important; color: #fff; }
.ehna-legacy .bg-warning { background: var(--color-warning) !important; color: #111; }
.ehna-legacy .bg-info { background: var(--color-info) !important; color: #062a3c; }
.ehna-legacy .bg-primary { background: var(--color-primary) !important; color: #fff; }
.ehna-legacy .bg-secondary { background: color-mix(in oklab, var(--color-base-content) 35%, transparent) !important; color: #fff; }
.ehna-legacy .bg-light { background: var(--lg-soft) !important; }
.ehna-legacy .bg-dark { background: var(--color-neutral) !important; color: var(--color-neutral-content); }

/* cards, tables, tabs */
.ehna-legacy .card { border: 1px solid var(--lg-border); border-radius: 1.25rem; background: var(--color-base-100); overflow: hidden; margin-bottom: 1rem; }
.ehna-legacy .card-header { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--lg-border); font-weight: 600; background: transparent; }
.ehna-legacy .card-body { padding: 1.25rem; }
.ehna-legacy .card-footer { display: flex; justify-content: flex-end; gap: .5rem; padding: 1rem 1.25rem; border-top: 1px solid var(--lg-border); }
.ehna-legacy .table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.ehna-legacy .table th { text-align: start; font-weight: 600; color: var(--lg-muted); padding: .6rem .75rem; border-bottom: 1px solid var(--lg-border); white-space: nowrap; }
.ehna-legacy .table td { padding: .65rem .75rem; border-bottom: 1px solid var(--lg-border); vertical-align: middle; }
.ehna-legacy .table-hover tbody tr:hover { background: var(--lg-soft); }
.ehna-legacy .table-responsive { overflow-x: auto; }
.ehna-legacy .nav-tabs { display: flex; flex-wrap: wrap; gap: .25rem; padding: 0; margin: 0; list-style: none; border-bottom: 1px solid var(--lg-border); }
.ehna-legacy .nav-tabs .nav-link { display: inline-flex; align-items: center; padding: .6rem 1rem; border-bottom: 2px solid transparent; color: var(--lg-muted); font-weight: 600; text-decoration: none; }
.ehna-legacy .nav-tabs .nav-link.active { color: var(--color-primary); border-bottom-color: var(--color-primary); }
.ehna-legacy .tab-content > .tab-pane { display: none; } .ehna-legacy .tab-content > .tab-pane.active { display: block; }
.ehna-legacy .list-group { list-style: none; margin: 0; padding: 0; border: 1px solid var(--lg-border); border-radius: 1rem; overflow: hidden; }
.ehna-legacy .list-group-item { padding: .7rem 1rem; border-bottom: 1px solid var(--lg-border); } .ehna-legacy .list-group-item:last-child { border-bottom: 0; }

/* grid */
.ehna-legacy .row { display: flex; flex-wrap: wrap; margin-inline: -.5rem; }
.ehna-legacy .row > * { width: 100%; padding-inline: .5rem; }
.ehna-legacy .g-2 > * { padding: .25rem; }
@media (min-width: 576px) { .ehna-legacy .col-sm-4 { width: 33.333%; } .ehna-legacy .col-sm-6 { width: 50%; } }
@media (min-width: 768px) {
  .ehna-legacy .col-md-1 { width: 8.333%; } .ehna-legacy .col-md-2 { width: 16.666%; } .ehna-legacy .col-md-3 { width: 25%; } .ehna-legacy .col-md-4 { width: 33.333%; }
  .ehna-legacy .col-md-5 { width: 41.666%; } .ehna-legacy .col-md-6 { width: 50%; } .ehna-legacy .col-md-7 { width: 58.333%; } .ehna-legacy .col-md-8 { width: 66.666%; } .ehna-legacy .col-md-9 { width: 75%; } .ehna-legacy .col-md-12 { width: 100%; }
}
@media (min-width: 992px) { .ehna-legacy .col-lg-3 { width: 25%; } .ehna-legacy .col-lg-4 { width: 33.333%; } .ehna-legacy .col-lg-6 { width: 50%; } .ehna-legacy .col-lg-8 { width: 66.666%; } }
@media (min-width: 1200px) { .ehna-legacy .col-xl-3 { width: 25%; } .ehna-legacy .col-xl-4 { width: 33.333%; } }
.ehna-legacy .col { flex: 1 0 0; }

/* Ehna / Bootstrap utilities */
.ehna-legacy .x-hidden, .ehna-legacy .d-none { display: none !important; }
.ehna-legacy .d-block { display: block !important; } .ehna-legacy .d-flex { display: flex !important; } .ehna-legacy .d-grid { display: grid !important; } .ehna-legacy .d-inline-block { display: inline-block !important; }
@media (min-width: 576px) { .ehna-legacy .d-sm-block { display: block !important; } }
@media (min-width: 768px) { .ehna-legacy .d-md-block { display: block !important; } .ehna-legacy .d-md-none { display: none !important; } }
.ehna-legacy .flex-wrap { flex-wrap: wrap; } .ehna-legacy .align-items-center { align-items: center; } .ehna-legacy .justify-content-between { justify-content: space-between; } .ehna-legacy .flex-grow-1 { flex-grow: 1; }
.ehna-legacy .gap-2 { gap: .5rem; } .ehna-legacy .gap-3 { gap: 1rem; }
.ehna-legacy .w-100 { width: 100% !important; } .ehna-legacy .h-100 { height: 100%; }
.ehna-legacy .float-end { float: inline-end; } .ehna-legacy .float-start { float: inline-start; } .ehna-legacy .clearfix::after { content: ""; display: table; clear: both; }
.ehna-legacy .text-end { text-align: end; } .ehna-legacy .text-start { text-align: start; } .ehna-legacy .text-center { text-align: center; }
.ehna-legacy .text-muted { color: var(--lg-muted) !important; } .ehna-legacy .text-success { color: var(--color-success) !important; } .ehna-legacy .text-danger { color: var(--color-error) !important; } .ehna-legacy .text-warning { color: var(--color-warning) !important; } .ehna-legacy .text-primary { color: var(--color-primary) !important; } .ehna-legacy .text-info { color: var(--color-info) !important; }
.ehna-legacy .fw-bold, .ehna-legacy strong { font-weight: 700; } .ehna-legacy .small, .ehna-legacy small { font-size: .82em; }
.ehna-legacy .rounded { border-radius: .75rem; } .ehna-legacy .rounded-circle { border-radius: 999px; } .ehna-legacy .border { border: 1px solid var(--lg-border); }
.ehna-legacy .text-break { overflow-wrap: anywhere; } .ehna-legacy .text-truncate { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ehna-legacy .mb0 { margin-bottom: 0 !important; } .ehna-legacy .mb5 { margin-bottom: 5px; } .ehna-legacy .mb10 { margin-bottom: 10px; } .ehna-legacy .mb15 { margin-bottom: 15px; } .ehna-legacy .mb20 { margin-bottom: 20px; } .ehna-legacy .mb30 { margin-bottom: 30px; }
.ehna-legacy .mt0 { margin-top: 0 !important; } .ehna-legacy .mt5 { margin-top: 5px; } .ehna-legacy .mt10 { margin-top: 10px; } .ehna-legacy .mt15 { margin-top: 15px; } .ehna-legacy .mt20 { margin-top: 20px; }
.ehna-legacy .mr5, .ehna-legacy .me-1 { margin-inline-end: 5px; } .ehna-legacy .mr10, .ehna-legacy .me-2 { margin-inline-end: 10px; } .ehna-legacy .mr15 { margin-inline-end: 15px; } .ehna-legacy .ml5, .ehna-legacy .ms-1 { margin-inline-start: 5px; } .ehna-legacy .ml10 { margin-inline-start: 10px; }
.ehna-legacy .mtb15 { margin-block: 15px; } .ehna-legacy .mtb20 { margin-block: 20px; }
.ehna-legacy .plr10 { padding-inline: 10px; } .ehna-legacy .plr15 { padding-inline: 15px; } .ehna-legacy .plr20 { padding-inline: 20px; } .ehna-legacy .plr0 { padding-inline: 0 !important; }
.ehna-legacy .ptb10 { padding-block: 10px; } .ehna-legacy .ptb20 { padding-block: 20px; } .ehna-legacy .ptb0 { padding-block: 0 !important; } .ehna-legacy .p40 { padding: 40px; } .ehna-legacy .p-3 { padding: 1rem; }
.ehna-legacy .pl-md-4 { padding-inline-start: 0; } @media (min-width: 768px) { .ehna-legacy .pl-md-4 { padding-inline-start: 1.5rem; } }
.ehna-legacy .main-icon { color: var(--ehna-orange); }
.ehna-legacy .fa-fw { width: 1.25em; text-align: center; }

/* collapse & dropdowns (driven by js/ehna/compat-giftun.js) */
.ehna-legacy .collapse:not(.show) { display: none; }
.ehna-legacy .dropdown, .ehna-legacy .btn-group { position: relative; display: inline-flex; }
.ehna-legacy .dropdown-menu { display: none; position: absolute; z-index: 60; top: 100%; inset-inline-end: 0; min-width: 12rem; margin-top: .35rem; padding: .35rem; border: 1px solid var(--lg-border); border-radius: 1rem; box-shadow: 0 12px 30px -12px rgba(0,0,0,.45); list-style: none; }
.ehna-legacy .dropdown-menu.show { display: block; }
.ehna-legacy .dropdown-item { display: flex; align-items: center; gap: .5rem; width: 100%; padding: .5rem .75rem; border-radius: .7rem; color: var(--color-base-content); text-decoration: none; font-size: .875rem; }
.ehna-legacy .dropdown-item:hover { background: var(--lg-soft); }
/* admin content area in Giftun */
.ehna-admin-legacy { padding-bottom: 2rem; }
.ehna-admin-legacy > .card:first-child, .ehna-admin-legacy .card { box-shadow: none; }
.ehna-admin-legacy .card-header.with-icon { font-size: 1.05rem; }
.ehna-admin-legacy .card-header .float-end { margin-inline-start: auto; float: none; }
.ehna-admin-legacy .main-icon { width: 1.5rem; height: 1.5rem; }
.ehna-admin-legacy .dataTables_wrapper { font-size: .875rem; }

/* admin dashboard stat panels — calm tinted cards, colored accent only */
.ehna-legacy .stat-panel {
  --tone: var(--ehna-orange);
  position: relative; overflow: hidden; margin-bottom: 1rem; padding: 1.1rem 1.25rem; min-height: 7rem;
  border: 1px solid color-mix(in oklab, var(--tone) 22%, var(--lg-border));
  border-radius: 1.25rem;
  background: linear-gradient(140deg, color-mix(in oklab, var(--tone) 11%, var(--color-base-100)) 0%, var(--color-base-100) 70%);
  color: var(--color-base-content);
}
.ehna-legacy .stat-panel::before { content: ""; position: absolute; inset-block: 1rem; inset-inline-start: 0; width: 4px; border-radius: 0 4px 4px 0; background: var(--tone); opacity: .75; }
.ehna-legacy .stat-panel .stat-cell { position: relative; z-index: 1; display: flex; flex-direction: column; gap: .25rem; }
.ehna-legacy .stat-panel .bg-icon { position: absolute; z-index: 0; inset-inline-end: .25rem; bottom: -.5rem; font-size: 4.5rem; color: var(--tone); opacity: .12; }
.ehna-legacy .stat-panel .text-xxlg { color: color-mix(in oklab, var(--tone) 80%, var(--color-base-content)); }
.ehna-legacy .stat-panel a { color: var(--lg-muted) !important; font-weight: 600; font-size: .82rem; text-decoration: none; }
.ehna-legacy .stat-panel a:hover { color: var(--tone) !important; }
.ehna-legacy .text-xxlg { font-size: 1.9rem; font-weight: 800; line-height: 1.1; }
.ehna-legacy .text-xlg { font-size: 1.35rem; font-weight: 700; } .ehna-legacy .text-lg { font-size: 1rem; font-weight: 600; }
.ehna-legacy .bg-gradient-primary { --tone: var(--ehna-orange); }
.ehna-legacy .bg-gradient-teal, .ehna-legacy .bg-gradient-success { --tone: #0e9aa7; }
.ehna-legacy .bg-gradient-cyan, .ehna-legacy .bg-gradient-info { --tone: #38bdf8; }
.ehna-legacy .bg-gradient-warning { --tone: #e9a23b; }
.ehna-legacy .bg-gradient-red, .ehna-legacy .bg-gradient-danger { --tone: #e8677e; }
.ehna-legacy .bg-gradient-gray { --tone: #94a3b8; }
.ehna-legacy .bg-gradient-purple { --tone: #a78bfa; }

/* /content/themes/giftun/css/ehna-finalui.css */
/* Ehna final UI pass (pre-launch audit). Small, targeted fixes loaded last on every page. */

/* Ads Studio banner: the theme's link colour won over the ad's own text colour (faded title on a photo) */
a.ehna-ad-banner, a.ehna-ad-banner:hover, a.ehna-ad-banner:focus { color: var(--ad-fg) !important; }
@media (max-width: 640px) {
  .ehna-ad-banner .ehna-ad-shade { background: linear-gradient(0deg, color-mix(in oklab, var(--ad-bg) 92%, transparent), color-mix(in oklab, var(--ad-bg) 45%, transparent)) !important; }
}

/* App badges on sign in / sign up: "Desktop" in Arabic (سطح المكتب) was cut with an ellipsis at 390px */

/* Bottom stack on phones: the Ads Studio sticky bar, the "Download the apps" banner and the floating back button
   landed on the same spot (all three overlapped at 390px). One bar at a time, and the back button sits above it. */
html.eh-adsticky-on #EhnaAppsBanner { display: none !important; }
@media (max-width: 767.98px) {
  html.eh-apps-on .ehna-back,
  html.eh-pwa-on .ehna-back,
  html.eh-adsticky-on .ehna-back { bottom: calc(10.2rem + env(safe-area-inset-bottom)); }
}
@media (min-width: 768px) {
  html.eh-apps-on .ehna-back { bottom: 7.5rem; }
}

/* /download: the per-platform buttons cut "iPhone", "Android" and "Desktop" to "iPho…" inside the app cards on phones */
@media (max-width: 520px) {
  .eap-pf { flex-direction: column; gap: .25rem; padding: .5rem .3rem; text-align: center; }
  .eap-pf span { align-items: center; }
  .eap-pf small { white-space: nowrap; }
  .eap-pf b { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
}
/* the sticky ad bar sat on top of the popup ad's backdrop: one ad at a time */
html.eh-adpop-on .ehna-ad-sticky { visibility: hidden; }

/* a post with a very long unbroken word (or a bold run with no spaces) pushed the page wider than the screen */
.post-body, .post-body .post-text { overflow-wrap: break-word; word-break: break-word; }

/* chat: shared location card (__feeds_message.tpl) */
.ehna-loc { width: 16rem; max-width: 100%; }
.ehna-loc-card { display: block; overflow: hidden; border-radius: 1rem; border: 1px solid var(--color-base-300); background: var(--color-base-100); box-shadow: 0 1px 2px rgb(0 0 0 / .06); transition: box-shadow .2s, transform .2s; text-decoration: none; }
.ehna-loc-card:hover { box-shadow: 0 6px 18px rgb(0 0 0 / .12); transform: translateY(-1px); }
.ehna-loc-map { position: relative; height: 9rem; overflow: hidden; background: var(--color-base-200); }
.ehna-loc-tiles { position: absolute; display: grid; grid-template-columns: 256px 256px; width: 512px; height: 512px; }
.ehna-loc-tiles img { display: block; width: 256px; height: 256px; max-width: none; }
.ehna-loc-pin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%); color: #ef4444; filter: drop-shadow(0 3px 4px rgb(0 0 0 / .35)); line-height: 0; }
.ehna-loc-pin > span { display: block; width: 2.25rem; height: 2.25rem; }
.ehna-loc-osm { position: absolute; right: 4px; bottom: 4px; padding: 0 4px; border-radius: 4px; background: rgb(255 255 255 / .8); color: #555; font-size: 9px; line-height: 16px; }
.ehna-loc-info { display: flex; align-items: center; gap: .6rem; padding: .6rem .75rem; }
.ehna-loc-ico { display: flex; flex-shrink: 0; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 999px; background: rgb(239 68 68 / .1); color: #ef4444; }
.ehna-loc-ico > span { width: 1.1rem; height: 1.1rem; }
.ehna-loc-txt { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.ehna-loc-txt b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .875rem; font-weight: 600; color: var(--color-base-content); }
.ehna-loc-txt small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .75rem; color: color-mix(in oklab, var(--color-base-content) 55%, transparent); }
.ehna-loc-go { flex-shrink: 0; width: 1rem; height: 1rem; color: color-mix(in oklab, var(--color-base-content) 40%, transparent); transition: color .2s; }
.ehna-loc-card:hover .ehna-loc-go { color: var(--color-primary); }
.ehna-loc-sending { opacity: .6; pointer-events: none; }

/* notifications: the polite "Turn on notifications" card (pwa-giftun.js); the browser asks only after "Turn on" */
.ehna-np { position: fixed; z-index: 100030; left: 50%; top: calc(env(safe-area-inset-top) + 4.5rem); width: min(26rem, calc(100vw - 1.5rem)); display: grid; grid-template-columns: auto 1fr; gap: .75rem .85rem; padding: 1rem; border-radius: 1.25rem; border: 1px solid var(--color-base-300); background: var(--color-base-100); color: var(--color-base-content); box-shadow: 0 18px 50px -12px rgb(0 0 0 / .28); transform: translate(-50%, -12px); opacity: 0; transition: opacity .25s, transform .25s; }
.ehna-np.is-open { transform: translate(-50%, 0); opacity: 1; }
.ehna-np-ico { display: flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; border-radius: 999px; background: color-mix(in oklab, var(--color-primary) 14%, transparent); color: var(--color-primary); }
.ehna-np-txt { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.ehna-np-txt b { font-size: .95rem; font-weight: 700; }
.ehna-np-txt span { font-size: .8rem; line-height: 1.4; color: color-mix(in oklab, var(--color-base-content) 65%, transparent); }
.ehna-np-act { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: .5rem; }
.ehna-np-act button { min-height: 2.25rem; padding: 0 1rem; border-radius: 999px; font-size: .85rem; font-weight: 600; cursor: pointer; transition: background-color .2s, opacity .2s; }
.ehna-np-no { background: transparent; color: color-mix(in oklab, var(--color-base-content) 70%, transparent); }
.ehna-np-no:hover { background: var(--color-base-200); }
.ehna-np-yes { background: var(--color-primary); color: var(--color-primary-content, #fff); }
.ehna-np-yes:hover { opacity: .9; }

/* visitors: "Join Ehna" bar (_footer.tpl) */
.ehna-gcta { position: fixed; z-index: 1030; left: 50%; bottom: calc(1rem + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; align-items: center; gap: .75rem; width: min(40rem, calc(100vw - 1.5rem)); padding: .65rem .7rem .65rem .9rem; border: 1px solid var(--color-base-300); border-radius: 1.25rem; background: color-mix(in oklab, var(--color-base-100) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 18px 44px -14px rgb(0 0 0 / .35); }
.ehna-gcta-logo { width: 2.5rem; height: 2.5rem; flex-shrink: 0; border-radius: .75rem; }
.ehna-gcta-txt { display: flex; min-width: 0; flex: 1; flex-direction: column; line-height: 1.3; }
.ehna-gcta-txt b { font-size: .95rem; font-weight: 800; color: var(--color-base-content); }
.ehna-gcta-txt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .78rem; color: color-mix(in oklab, var(--color-base-content) 62%, transparent); }
.ehna-gcta a { flex-shrink: 0; padding: .55rem 1rem; border-radius: 999px; font-size: .85rem; font-weight: 700; text-decoration: none; white-space: nowrap; transition: transform .15s, opacity .2s; }
.ehna-gcta a:active { transform: scale(.96); }
.ehna-gcta-in { color: var(--color-base-content) !important; background: var(--color-base-200); }
.ehna-gcta-up { color: #fff !important; background: linear-gradient(135deg, #f97316, #e11d48); box-shadow: 0 6px 16px -6px rgb(225 29 72 / .55); }
@media (max-width: 767.98px) {
  .ehna-gcta { bottom: 0; width: 100%; border-radius: 1.25rem 1.25rem 0 0; border-bottom: 0; backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--color-base-100); padding-bottom: calc(.65rem + env(safe-area-inset-bottom)); }
  .ehna-gcta-txt span { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .ehna-gcta-in { display: none; }
}
html.eh-gcta-on #EhnaAppsBanner, html.eh-gcta-on #PWAInstallBanner { display: none !important; }
html.eh-gcta-on .ehna-back { bottom: calc(6.5rem + env(safe-area-inset-bottom)); }
html.eh-gcta-on .eha-launcher:not(.is-moved) { bottom: calc(6.5rem + env(safe-area-inset-bottom)); }
@media (min-width: 768px) { html.eh-gcta-on .eha-launcher:not(.is-moved) { bottom: 5.75rem; } html.eh-gcta-on .eha-panel { bottom: 10rem; } }
html.eh-gcta-on body { padding-bottom: 5.5rem; }

/* visitors: sections & services bar under the header (phones / tablets) */
.ehna-gnav { position: relative; display: flex; gap: .45rem; overflow-x: auto; padding: .55rem .75rem; border-bottom: 1px solid var(--color-base-300); background: var(--color-base-100); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.ehna-gnav::-webkit-scrollbar { display: none; }
.ehna-gnav a { display: inline-flex; flex-shrink: 0; align-items: center; gap: .35rem; padding: .4rem .8rem; border: 1px solid var(--color-base-300); border-radius: 999px; background: var(--color-base-100); color: var(--color-base-content) !important; font-size: .8rem; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background-color .2s, border-color .2s; }
.ehna-gnav a:hover, .ehna-gnav a:active { border-color: color-mix(in oklab, var(--color-primary) 40%, var(--color-base-300)); background: color-mix(in oklab, var(--color-primary) 8%, var(--color-base-100)); }
.ehna-gnav span { font-size: .95rem; line-height: 1; }
@media (min-width: 1280px) { .ehna-gnav { display: none; } }

/* assistant: "My agent" tab (assistant-agent.js) */
.eha.is-me-tab .js_eha-list, .eha.is-me-tab .js_eha-form, .eha.is-me-tab .js_eha-live, .eha.is-me-tab .eha-foot { display: none !important; }
.eha-me[hidden] { display: none !important; }
.eha-me-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .35rem .75rem; padding: .5rem .75rem; border-bottom: 1px solid var(--color-base-300); font-size: .76rem; }
.eha-me-bar small { color: color-mix(in oklab, var(--color-base-content) 55%, transparent); font-size: .7rem; }
.eha-me-switch { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; cursor: pointer; }
.eha-me-switch input { position: absolute; opacity: 0; pointer-events: none; }
.eha-me-switch span { position: relative; width: 2.3rem; height: 1.3rem; flex-shrink: 0; border-radius: 999px; background: var(--color-base-300); transition: background-color .2s; }
.eha-me-switch span::after { content: ""; position: absolute; top: .15rem; inset-inline-start: .15rem; width: 1rem; height: 1rem; border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: inset-inline-start .2s; }
.eha-me-switch input:checked + span { background: #16a34a; }
.eha-me-switch input:checked + span::after { inset-inline-start: 1.15rem; }
.eha-me.is-off .eha-compose { opacity: .5; }
.eha-plan-preview { display: block; margin-top: .3rem; padding: .45rem .55rem; border-radius: .6rem; background: var(--color-base-100); font-family: inherit !important; font-size: .76rem !important; line-height: 1.5; white-space: normal; color: var(--color-base-content) !important; }
.eha-clear { margin-inline-start: auto; padding: .15rem .45rem; border: 1px solid var(--color-base-300); border-radius: .6rem; background: var(--color-base-100); font-size: .8rem; line-height: 1.4; cursor: pointer; transition: background-color .2s, border-color .2s; }
.eha-clear:hover { border-color: #fca5a5; background: color-mix(in oklab, #ef4444 10%, var(--color-base-100)); }
.eha-plan.is-done .eha-plan-act { display: none; }
.eha-plan-state { display: inline-block; margin-top: .3rem; font-size: .7rem; font-weight: 700; color: color-mix(in oklab, var(--color-base-content) 55%, transparent); }

/* header on large screens: logo + wallet + points never run into the search box (the left column was a fixed 16rem) */
@media (min-width: 1024px) {
  .site-topbar .lg\:w-64 { width: auto; min-width: 16rem; flex-shrink: 0; }
  .site-topbar .site-topbar-search { min-width: 0; }
  .site-topbar .ehna-balance { padding-inline: .55rem; }
}
@media (min-width: 1024px) and (max-width: 1279.98px) {
  .site-topbar .ehna-balance .text-xs { display: none; }
}
.eha-upgrade { display: inline-flex; align-items: center; gap: .2rem; padding: .15rem .55rem; border-radius: 999px; background: linear-gradient(135deg, #f59e0b, #f97316); color: #fff !important; font-size: .7rem; font-weight: 800; text-decoration: none; box-shadow: 0 4px 10px -4px rgb(249 115 22 / .6); }
.eha-upgrade:hover { filter: brightness(1.05); }
/* "My agent": how the post will look before it is published */
.eha-pv { margin-top: .4rem; overflow: hidden; border: 1px solid var(--color-base-300); border-radius: .9rem; background: var(--color-base-100); }
.eha-pv-head { display: flex; align-items: center; gap: .5rem; padding: .5rem .6rem; }
.eha-pv-head img, .eha-pv-av { width: 2rem; height: 2rem; flex-shrink: 0; border-radius: 999px; object-fit: cover; background: var(--color-base-300); }
.eha-pv-head span { display: flex; flex-direction: column; line-height: 1.2; }
.eha-pv-head b { font-size: .78rem; }
.eha-pv-head small { font-size: .66rem; color: color-mix(in oklab, var(--color-base-content) 55%, transparent); }
.eha-pv-text { padding: 0 .65rem .55rem; font-size: .78rem; line-height: 1.55; white-space: normal; overflow-wrap: anywhere; color: var(--color-base-content); }
.eha-pv-img { display: flex; align-items: center; justify-content: center; min-height: 5.5rem; padding: .6rem; background: linear-gradient(135deg, var(--color-base-200), var(--color-base-300)); font-size: .72rem; text-align: center; color: color-mix(in oklab, var(--color-base-content) 70%, transparent); }
.eha-pv-img.is-ai { background: linear-gradient(135deg, color-mix(in oklab, #8b5cf6 18%, var(--color-base-100)), color-mix(in oklab, #ec4899 16%, var(--color-base-100))); }

/* "My agent": the member's own look (assistant-agent.js) */
.eha.has-cicon .eha-launcher .eha-bot, .eha.has-cicon .eha-avatar .eha-bot { display: none; }
.eha-cico { display: inline-block; font-size: 1.85rem; line-height: 1; filter: drop-shadow(0 3px 6px rgb(0 0 0 / .18)); }
.eha-avatar .eha-cico { font-size: 1.35rem; }
.eha.is-open .eha-launcher .eha-cico { opacity: 0; transform: scale(.5); transition: opacity .2s, transform .2s; }
.eha-anim-float { animation: eha-a-float 3s ease-in-out infinite; }
.eha-anim-bob { animation: eha-a-bob 1.6s ease-in-out infinite; }
.eha-anim-spin { animation: eha-a-spin 6s linear infinite; }
.eha-anim-beat { animation: eha-a-beat 1.3s ease-in-out infinite; }
.eha-anim-bounce { animation: eha-a-bounce 1.2s cubic-bezier(.3, 1.6, .5, 1) infinite; }
.eha-anim-wiggle { animation: eha-a-wiggle 2.2s ease-in-out infinite; }
.eha-anim-fly { animation: eha-a-fly 2.4s ease-in-out infinite; }
.eha-anim-gallop { animation: eha-a-gallop 1s ease-in-out infinite; }
.eha-anim-drive { animation: eha-a-drive 2s ease-in-out infinite; }
.eha-anim-twinkle { animation: eha-a-twinkle 1.8s ease-in-out infinite; }
.eha-anim-flash { animation: eha-a-flash 1.4s steps(2) infinite; }
@keyframes eha-a-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes eha-a-bob { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg) translateY(-2px); } }
@keyframes eha-a-spin { to { transform: rotate(360deg); } }
@keyframes eha-a-beat { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.15); } 60% { transform: scale(.96); } }
@keyframes eha-a-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes eha-a-wiggle { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-12deg); } 40% { transform: rotate(10deg); } 60% { transform: rotate(-6deg); } }
@keyframes eha-a-fly { 0%, 100% { transform: translate(0, 0) rotate(-8deg); } 50% { transform: translate(3px, -5px) rotate(4deg); } }
@keyframes eha-a-gallop { 0%, 100% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-4px) rotate(-6deg); } 75% { transform: translateY(-1px) rotate(4deg); } }
@keyframes eha-a-drive { 0%, 100% { transform: translateX(-2px); } 50% { transform: translateX(3px); } }
@keyframes eha-a-twinkle { 0%, 100% { transform: scale(1) rotate(0); opacity: 1; } 50% { transform: scale(.82) rotate(15deg); opacity: .75; } }
@keyframes eha-a-flash { 0% { opacity: 1; } 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .eha-cico, [class*="eha-anim-"] { animation: none !important; } }
.eha-cust { margin: .5rem .7rem; padding: .7rem; border: 1px solid var(--color-base-300); border-radius: 1rem; background: var(--color-base-100); max-height: 55vh; overflow-y: auto; font-size: .78rem; }
.eha-cust[hidden] { display: none; }
.eha-cust-h { display: block; margin-bottom: .45rem; font-size: .85rem; }
.eha-cust-l { display: flex; flex-direction: column; gap: .25rem; margin: .5rem 0 .3rem; font-weight: 700; }
.eha-cust-l input { height: 2.2rem; padding: 0 .7rem; border: 1px solid var(--color-base-300); border-radius: .6rem; background: var(--color-base-200); color: inherit; font: inherit; }
.eha-sw-group small { display: block; margin: .3rem 0 .2rem; color: color-mix(in oklab, var(--color-base-content) 55%, transparent); font-weight: 700; }
.eha-sw-row, .eha-ic-row { display: flex; flex-wrap: wrap; gap: .3rem; }
.eha-sw { width: 1.55rem; height: 1.55rem; border: 2px solid transparent; border-radius: 999px; cursor: pointer; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .1); }
.eha-sw.is-default { display: flex; align-items: center; justify-content: center; width: auto; padding: 0 .5rem; background: var(--color-base-200); font-size: .8rem; }
.eha-sw.is-on { border-color: var(--color-base-content); transform: scale(1.12); }
.eha-ic { display: flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; border: 2px solid var(--color-base-300); border-radius: .8rem; background: var(--color-base-100); font-size: 1.3rem; cursor: pointer; }
.eha-ic.is-on { border-color: var(--eha-p, var(--color-primary)); background: color-mix(in oklab, var(--eha-p, var(--color-primary)) 12%, var(--color-base-100)); }
.eha-tab-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 6.5rem; }

/* horizontal strips (stories, chips, carousels): a vertical swipe that starts on them still scrolls the page
   (touch-pan-x blocked it, the empty part of the stories strip felt "outside the scroll") */
.touch-pan-x, .js_stories-strip { touch-action: pan-x pan-y !important; }
/* owner-only "Code" tab */
.eha.is-code-tab .js_eha-list, .eha.is-code-tab .js_eha-form, .eha.is-code-tab .js_eha-live, .eha.is-code-tab .eha-foot { display: none !important; }
.eha-code[hidden] { display: none !important; }
.eha-code-in { margin: .8rem; padding: .9rem; border: 1px solid var(--color-base-300); border-radius: 1rem; background: var(--color-base-100); font-size: .8rem; line-height: 1.6; overflow-y: auto; }
.eha-code-in b { display: block; margin-bottom: .3rem; font-size: .9rem; }
.eha-code-in ol { margin: .4rem 0; padding-inline-start: 1.1rem; list-style: decimal; }
.eha-code-in code { padding: .05rem .35rem; border-radius: .35rem; background: var(--color-base-200); font-family: ui-monospace, monospace; }
.eha-code-in input { width: 100%; height: 2.3rem; margin: .4rem 0 .6rem; padding: 0 .7rem; border: 1px solid var(--color-base-300); border-radius: .6rem; background: var(--color-base-200); color: inherit; }

/* owner's Code tab chat (code-bridge.js) */
.eha-code { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.eha-code[hidden] { display: none; }
.eha-code .eha-code-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
.eha-code .eha-code-bar small { margin-inline-end: auto; }
.ecb-gate { display: flex; flex-direction: column; gap: .6rem; align-items: center; margin: 2rem auto; max-width: 18rem; text-align: center; }
.ecb-gate input { width: 100%; padding: .55rem .8rem; border: 1px solid var(--eha-line, #ddd); border-radius: .7rem; font-size: 1.1rem; letter-spacing: .3em; text-align: center; background: var(--eha-b1, #fff); color: inherit; }
.ecb-tool { font-size: .74rem; }
.ecb-tool code { word-break: break-all; }
.ecb-pre { max-height: 22rem; overflow: auto; margin: .4rem 0 0; padding: .55rem .7rem; border-radius: .6rem; background: #0f172a; color: #e2e8f0; font: .74rem/1.45 ui-monospace, Consolas, monospace; white-space: pre; text-align: left; direction: ltr; }
.ecb-diff .add { color: #4ade80; }
.ecb-diff .del { color: #f87171; }

/* topbar: logo + wallet/points chips may be wider than the 16rem column, so the box grows instead of running into the search */
@media (min-width: 1024px) {
  .site-topbar .ehna-top-logo { width: auto !important; min-width: 16rem; }
  .site-topbar .site-topbar-search { min-width: 12rem; }
}

/* a little denser on tablets and computers: every rem-based size (cards, blocks, gaps, text) about 6% smaller */
@media (min-width: 768px) {
  html[data-theme] { font-size: 15px; }
}

/* "Upgrade your package" button under a limit message (assistant agent) */
.eha-sys .eha-upgrade { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .9rem; border-radius: 999px; background: var(--color-primary, #b4875a); color: var(--color-primary-content, #fff) !important; font-weight: 600; text-decoration: none; }

/* the chatbot header: 🎨 opens "Customize your agent" from any tab */
.eha-head .eha-head-cust{background:none;border:0;padding:0 .3rem;font-size:.95rem;line-height:1;cursor:pointer;opacity:.85;vertical-align:middle;transition:transform .2s}
.eha-head .eha-head-cust:hover{opacity:1;transform:scale(1.15) rotate(-8deg)}

/* chatbot header: the customize button sits with the header buttons, away from the title */
.eha-head .eha-cust-btn span{font-size:1.05rem;line-height:1}

/* /content/themes/giftun/css/ehna-assistant.css */

/* Ehna Assistant (__ehna_assistant.tpl, assistant.js) and the Support Center live chat (__support_live.tpl) */
.eha { --eha-p: var(--ehna-orange, #f97316); --eha-pc: var(--ehna-on-accent, #fff); --eha-b1: var(--color-base-100, #fff); --eha-b2: var(--color-base-200, #f4f4f5); --eha-b3: var(--color-base-300, #e4e4e7); --eha-fg: var(--color-base-content, #18181b); --eha-mute: color-mix(in oklab, var(--eha-fg) 58%, transparent); }
.eha[hidden] { display: none !important; }

/* launcher */
.eha-launcher { position: fixed; z-index: 1035; inset-inline-end: 1.25rem; bottom: 1.25rem; display: flex; align-items: center; justify-content: center; width: 3.5rem; height: 3.5rem; border-radius: 999px; border: 0; cursor: pointer; color: var(--eha-pc); background: linear-gradient(135deg, var(--eha-p), color-mix(in oklab, var(--eha-p) 78%, #be123c)); box-shadow: 0 10px 28px -6px color-mix(in oklab, var(--eha-p) 60%, transparent), 0 2px 6px rgb(0 0 0 / .15); transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s; }
.eha-launcher:hover { transform: translateY(-2px) scale(1.04); }
.eha-launcher:active { transform: scale(.95); }
.eha-launcher svg { position: absolute; transition: opacity .2s, transform .3s; }
.eha-l-close { opacity: 0; transform: rotate(-90deg) scale(.6); }
.eha.is-open .eha-l-open { opacity: 0; transform: rotate(90deg) scale(.6); }
.eha.is-open .eha-l-close { opacity: 1; transform: none; }
.eha-badge { position: absolute; top: -2px; inset-inline-end: -2px; min-width: 1.25rem; height: 1.25rem; padding: 0 .3rem; border-radius: 999px; background: #ef4444; color: #fff; font-size: .7rem; font-weight: 700; line-height: 1.25rem; text-align: center; box-shadow: 0 0 0 2px var(--eha-b1); }
@media (max-width: 767.98px) {
  .eha-launcher { width: 3.25rem; height: 3.25rem; bottom: calc(5rem + env(safe-area-inset-bottom)); inset-inline-end: .9rem; }
  html.eh-apps-on .eha-launcher, html.eh-adsticky-on .eha-launcher, html.eh-pwa-on .eha-launcher { bottom: calc(10.2rem + env(safe-area-inset-bottom)); }
  html.eha-open .eha-launcher { display: none; }
}
html.ehna-app-messenger .eha, body:has(.ehna-vr-page) .eha { display: none !important; }

/* panel */
.eha-panel { position: fixed; z-index: 1036; inset-inline-end: 1.25rem; bottom: 5.75rem; width: 25rem; height: min(42rem, calc(100vh - 7.5rem)); display: flex; flex-direction: column; overflow: hidden; border-radius: 1.5rem; border: 1px solid var(--eha-b3); background: var(--eha-b1); color: var(--eha-fg); box-shadow: 0 30px 70px -20px rgb(0 0 0 / .35), 0 8px 24px -8px rgb(0 0 0 / .15); opacity: 0; transform: translateY(16px) scale(.97); transform-origin: bottom right; pointer-events: none; visibility: hidden; transition: opacity .22s, transform .28s cubic-bezier(.22, 1, .36, 1), visibility 0s .28s; }
[dir="rtl"] .eha-panel { transform-origin: bottom left; }
.eha.is-open .eha-panel { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity .22s, transform .28s cubic-bezier(.22, 1, .36, 1); }
@media (max-width: 767.98px) {
  .eha-panel { inset: 0; width: auto; height: auto; border-radius: 0; border: 0; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
}

.eha-head { display: flex; align-items: center; gap: .7rem; padding: .85rem .9rem; color: var(--eha-pc); background: linear-gradient(135deg, var(--eha-p), color-mix(in oklab, var(--eha-p) 78%, #be123c)); }
.eha-avatar { display: flex; flex-shrink: 0; align-items: center; justify-content: center; width: 2.6rem; height: 2.6rem; overflow: hidden; border-radius: 999px; background: rgb(255 255 255 / .18); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .25); }
.eha-avatar img { width: 100%; height: 100%; object-fit: cover; }
.eha-title { display: flex; min-width: 0; flex: 1; flex-direction: column; line-height: 1.25; }
.eha-title b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; font-weight: 700; }
.eha-title small { display: flex; align-items: center; gap: .35rem; font-size: .75rem; opacity: .9; }
.eha-dot { width: .5rem; height: .5rem; border-radius: 999px; background: #4ade80; box-shadow: 0 0 0 2px rgb(255 255 255 / .35); }
.eha-icon { display: flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border: 0; border-radius: 999px; background: transparent; color: inherit; cursor: pointer; transition: background-color .2s; }
.eha-icon:hover { background: rgb(255 255 255 / .18); }
.eha-menu { position: relative; }
.eha-menu-list { position: absolute; z-index: 2; top: calc(100% + .35rem); inset-inline-end: 0; min-width: 14rem; padding: .35rem; border-radius: 1rem; border: 1px solid var(--eha-b3); background: var(--eha-b1); color: var(--eha-fg); box-shadow: 0 16px 40px -12px rgb(0 0 0 / .3); }
.eha-menu-list[hidden] { display: none; }
.eha-menu-list > * { display: block; width: 100%; padding: .6rem .75rem; border: 0; border-radius: .7rem; background: none; color: inherit; font-size: .875rem; text-align: start; text-decoration: none; cursor: pointer; }
.eha-menu-list > *:hover { background: var(--eha-b2); }

.eha-live { display: flex; align-items: center; gap: .5rem; padding: .5rem .9rem; border-bottom: 1px solid var(--eha-b3); background: color-mix(in oklab, #22c55e 10%, var(--eha-b1)); font-size: .8rem; font-weight: 600; }
.eha-live[hidden] { display: none; }
.eha-live span:nth-child(2) { flex: 1; }
.eha-live button { padding: .25rem .7rem; border: 1px solid var(--eha-b3); border-radius: 999px; background: var(--eha-b1); color: var(--eha-fg); font-size: .75rem; font-weight: 600; cursor: pointer; }
.eha-live-dot { width: .55rem; height: .55rem; border-radius: 999px; background: #22c55e; animation: eha-pulse 1.6s infinite; }
@keyframes eha-pulse { 0% { box-shadow: 0 0 0 0 rgb(34 197 94 / .55); } 70% { box-shadow: 0 0 0 7px rgb(34 197 94 / 0); } 100% { box-shadow: 0 0 0 0 rgb(34 197 94 / 0); } }

/* messages */
.eha-list { flex: 1; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: .65rem; padding: 1rem .9rem; background: radial-gradient(120% 60% at 50% 0%, color-mix(in oklab, var(--eha-p) 6%, var(--eha-b1)) 0%, var(--eha-b1) 70%); }
.eha-row { display: flex; align-items: flex-end; gap: .45rem; max-width: 100%; animation: eha-in .25s cubic-bezier(.22, 1, .36, 1); }
@keyframes eha-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.eha-user { justify-content: flex-end; }
.eha-col { display: flex; min-width: 0; max-width: 86%; flex-direction: column; gap: .35rem; }
.eha-user .eha-col { align-items: flex-end; }
.eha-row-av { width: 1.75rem; height: 1.75rem; flex-shrink: 0; border-radius: 999px; object-fit: cover; }
.eha-name { padding-inline: .5rem; font-size: .7rem; font-weight: 600; color: var(--eha-mute); }
.eha-bubble { padding: .6rem .85rem; border-radius: 1.15rem; font-size: .9rem; line-height: 1.55; overflow-wrap: anywhere; }
.eha-bubble p { margin: 0; }
.eha-bubble p + p { margin-top: .35rem; }
.eha-bubble ul { margin: .3rem 0; padding-inline-start: 1.1rem; list-style: disc; }
.eha-bubble li { margin: .15rem 0; }
.eha-bubble b { font-weight: 700; }
.eha-assistant .eha-bubble, .eha-agent .eha-bubble { border: 1px solid var(--eha-b3); border-end-start-radius: .35rem; background: var(--eha-b1); box-shadow: 0 1px 2px rgb(0 0 0 / .05); }
.eha-agent .eha-bubble { border-color: color-mix(in oklab, #22c55e 35%, var(--eha-b3)); background: color-mix(in oklab, #22c55e 6%, var(--eha-b1)); }
.eha-user .eha-bubble { border-end-end-radius: .35rem; background: linear-gradient(135deg, var(--eha-p), color-mix(in oklab, var(--eha-p) 85%, #be123c)); color: var(--eha-pc); }
.eha-temp { opacity: .7; }
.eha-time { padding-inline: .5rem; font-size: .68rem; color: var(--eha-mute); }
.eha-sys { align-self: center; max-width: 92%; padding: .45rem .8rem; border-radius: .8rem; background: var(--eha-b2); color: var(--eha-mute); font-size: .78rem; line-height: 1.45; text-align: center; }
.eha-sys p { margin: 0; }
.eha-err { background: color-mix(in oklab, #ef4444 10%, var(--eha-b1)); color: #dc2626; }

/* typing */
.eha-typing .eha-bubble { display: flex; gap: .3rem; padding: .8rem .95rem; }
.eha-typing .eha-bubble span { width: .45rem; height: .45rem; border-radius: 999px; background: var(--eha-mute); animation: eha-dots 1.2s infinite ease-in-out; }
.eha-typing .eha-bubble span:nth-child(2) { animation-delay: .15s; }
.eha-typing .eha-bubble span:nth-child(3) { animation-delay: .3s; }
@keyframes eha-dots { 0%, 80%, 100% { opacity: .35; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* link cards */
.eha-card { display: flex; align-items: center; gap: .7rem; width: 100%; min-width: 15rem; padding: .55rem .6rem; border: 1px solid var(--eha-b3); border-radius: 1rem; background: var(--eha-b1); color: var(--eha-fg); text-align: start; text-decoration: none; cursor: pointer; box-shadow: 0 1px 2px rgb(0 0 0 / .05); transition: border-color .2s, box-shadow .2s, transform .2s; }
.eha-card:hover { border-color: color-mix(in oklab, var(--eha-p) 45%, var(--eha-b3)); box-shadow: 0 8px 22px -10px rgb(0 0 0 / .25); transform: translateY(-1px); color: var(--eha-fg); }
.eha-card-img, .eha-card-emoji { display: flex; flex-shrink: 0; align-items: center; justify-content: center; width: 3rem; height: 3rem; overflow: hidden; border-radius: .8rem; background: linear-gradient(135deg, color-mix(in oklab, var(--eha-p) 18%, var(--eha-b1)), color-mix(in oklab, #be123c 10%, var(--eha-b1))); font-size: 1.45rem; }
.eha-card-img img { width: 100%; height: 100%; object-fit: cover; }
.eha-card-txt { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: .1rem; }
.eha-card-txt b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .875rem; font-weight: 700; }
.eha-card-txt small { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: .75rem; line-height: 1.35; color: var(--eha-mute); }
.eha-card-go { display: flex; flex-shrink: 0; align-items: center; justify-content: center; width: 1.9rem; height: 1.9rem; border-radius: 999px; background: var(--eha-b2); color: var(--eha-p); }
[dir="rtl"] .eha-card-go svg { transform: scaleX(-1); }
.eha-card-action { border-color: color-mix(in oklab, #22c55e 40%, var(--eha-b3)); background: color-mix(in oklab, #22c55e 7%, var(--eha-b1)); }
.eha-card-action .eha-card-go { color: #16a34a; }

/* quick replies */
.eha-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.eha-chip { padding: .4rem .8rem; border: 1px solid color-mix(in oklab, var(--eha-p) 35%, var(--eha-b3)); border-radius: 999px; background: var(--eha-b1); color: var(--eha-p); font-size: .8rem; font-weight: 600; cursor: pointer; transition: background-color .2s, color .2s; }
.eha-chip:hover { background: var(--eha-p); color: var(--eha-pc); }

/* composer */
.eha-compose { display: flex; align-items: flex-end; gap: .5rem; padding: .7rem .8rem; border-top: 1px solid var(--eha-b3); background: var(--eha-b1); }
.eha-compose textarea { flex: 1; min-height: 2.6rem; max-height: 8.75rem; padding: .62rem 1rem; resize: none; border: 1px solid var(--eha-b3); border-radius: 1.3rem; outline: none; background: var(--eha-b2); color: var(--eha-fg); font: inherit; font-size: .9rem; line-height: 1.35; transition: border-color .2s, background-color .2s; }
.eha-compose textarea:focus { border-color: color-mix(in oklab, var(--eha-p) 55%, transparent); background: var(--eha-b1); }
@media (max-width: 767.98px) { .eha-compose textarea { font-size: 16px; } }
.eha-send { display: flex; flex-shrink: 0; align-items: center; justify-content: center; width: 2.6rem; height: 2.6rem; border: 0; border-radius: 999px; background: var(--eha-p); color: var(--eha-pc); cursor: pointer; transition: transform .15s, opacity .2s; }
.eha-send:active { transform: scale(.92); }
[dir="rtl"] .eha-send svg { transform: scaleX(-1); }
.eha-foot { margin: 0; padding: 0 .9rem .55rem; background: var(--eha-b1); color: var(--eha-mute); font-size: .66rem; text-align: center; }

/* ============ Support Center: live chat (agent side) ============ */
.ehl { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--color-base-300); border-radius: 1.25rem; background: var(--color-base-100); }
.ehl-head { display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem; border-bottom: 1px solid var(--color-base-300); }
.ehl-avatar img { width: 2.75rem; height: 2.75rem; border-radius: 999px; object-fit: cover; }
.ehl-who { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.ehl-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.ehl-who small { display: flex; align-items: center; gap: .35rem; font-size: .75rem; color: color-mix(in oklab, var(--color-base-content) 60%, transparent); }
.ehl-dot { width: .5rem; height: .5rem; border-radius: 999px; background: #22c55e; animation: eha-pulse 1.6s infinite; }
.ehl.is-ended .ehl-dot { background: #a1a1aa; animation: none; }
.ehl-badge { padding: .2rem .55rem; border-radius: 999px; background: var(--color-base-200); font-family: ui-monospace, monospace; font-size: .75rem; }
.ehl-transcript { border-bottom: 1px solid var(--color-base-300); background: var(--color-base-200); }
.ehl-transcript summary { padding: .6rem 1rem; font-size: .8rem; font-weight: 600; cursor: pointer; }
.ehl-transcript-body { max-height: 16rem; overflow-y: auto; padding: 0 1rem .8rem; font-size: .8rem; line-height: 1.55; color: color-mix(in oklab, var(--color-base-content) 75%, transparent); }
.ehl-list { display: flex; height: min(60vh, 34rem); flex-direction: column; gap: .6rem; overflow-y: auto; padding: 1rem; }
.ehl-row { display: flex; align-items: flex-end; gap: .5rem; }
.ehl-me { justify-content: flex-end; }
.ehl-av { width: 2rem; height: 2rem; flex-shrink: 0; border-radius: 999px; object-fit: cover; }
.ehl-col { display: flex; min-width: 0; max-width: 75%; flex-direction: column; gap: .2rem; }
.ehl-me .ehl-col { align-items: flex-end; }
.ehl-name { padding-inline: .5rem; font-size: .7rem; font-weight: 600; color: color-mix(in oklab, var(--color-base-content) 55%, transparent); }
.ehl-bubble { padding: .6rem .9rem; border-radius: 1.15rem; font-size: .9rem; line-height: 1.55; overflow-wrap: anywhere; }
.ehl-them .ehl-bubble { border: 1px solid var(--color-base-300); border-end-start-radius: .35rem; background: var(--color-base-100); }
.ehl-team .ehl-bubble { border-end-start-radius: .35rem; background: color-mix(in oklab, #22c55e 10%, var(--color-base-100)); }
.ehl-me .ehl-bubble { border-end-end-radius: .35rem; background: var(--color-primary); color: var(--color-primary-content, #fff); }
.ehl-time { padding-inline: .5rem; font-size: .68rem; color: color-mix(in oklab, var(--color-base-content) 50%, transparent); }
.ehl-compose { display: flex; align-items: flex-end; gap: .5rem; padding: .75rem; border-top: 1px solid var(--color-base-300); }
.ehl-compose textarea { flex: 1; min-height: 2.75rem; max-height: 8.75rem; padding: .65rem 1rem; resize: none; border: 1px solid var(--color-base-300); border-radius: 1.4rem; outline: none; background: var(--color-base-200); color: var(--color-base-content); font: inherit; font-size: .9rem; }
.ehl-compose textarea:focus { border-color: color-mix(in oklab, var(--color-primary) 55%, transparent); background: var(--color-base-100); }
.ehl-compose textarea:disabled { opacity: .6; }
.ehl-send { display: flex; flex-shrink: 0; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; border: 0; border-radius: 999px; background: var(--color-primary); color: var(--color-primary-content, #fff); cursor: pointer; }
[dir="rtl"] .ehl-send svg { transform: scaleX(-1); }

/* the bot (launcher + header avatar) */
.eha-bot-visor { fill: #1e1b4b; }
.eha-bot-eyes { fill: #67e8f9; filter: drop-shadow(0 0 1.5px #22d3ee); transform-box: fill-box; transform-origin: center; animation: eha-blink 4.5s infinite; }
.eha-bot-led { fill: #fde047; animation: eha-led 2.4s infinite ease-in-out; }
@keyframes eha-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.12); } }
@keyframes eha-led { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.eha-launcher .eha-bot { width: 2rem; height: 2rem; }
.eha-launcher:hover .eha-bot { animation: eha-bob .9s ease-in-out infinite; }
@keyframes eha-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -2px; } }
@media (prefers-reduced-motion: reduce) { .eha-bot-eyes, .eha-bot-led, .eha-launcher:hover .eha-bot { animation: none; } }

/* draggable launcher: once moved it keeps its own place (left/top set by assistant.js) */
.eha-launcher { touch-action: none; user-select: none; -webkit-user-select: none; }
.eha-launcher.is-moved { inset-inline-end: auto; right: auto; bottom: auto; }
.eha-launcher.is-dragging { transition: none; cursor: grabbing; transform: scale(1.08); box-shadow: 0 18px 36px -8px rgb(0 0 0 / .4); }
.eha-launcher.is-snapping { transition: left .3s cubic-bezier(.22, 1, .36, 1), top .3s cubic-bezier(.22, 1, .36, 1); }
/* the panel opens on the launcher's side (desktop) */
@media (min-width: 768px) {
  .eha.eha-side-left .eha-panel { left: 1.25rem; right: auto; transform-origin: bottom left; }
  .eha.eha-side-right .eha-panel { right: 1.25rem; left: auto; transform-origin: bottom right; }
}

/* compact sizes that fit every screen */
.eha-panel { width: clamp(18rem, 92vw, 23rem); height: min(36rem, calc(100vh - 7.5rem)); }
.eha-head { padding: .65rem .75rem; gap: .55rem; }
.eha-avatar { width: 2.2rem; height: 2.2rem; }
.eha-title b { font-size: .9rem; }
.eha-title small { font-size: .7rem; }
.eha-list { padding: .8rem .7rem; gap: .55rem; }
.eha-bubble { padding: .5rem .75rem; font-size: .82rem; line-height: 1.5; border-radius: 1rem; }
.eha-col { max-width: 90%; }
.eha-card { min-width: 0; gap: .55rem; padding: .45rem .5rem; border-radius: .85rem; }
.eha-card-img, .eha-card-emoji { width: 2.5rem; height: 2.5rem; font-size: 1.2rem; border-radius: .65rem; }
.eha-card-txt b { font-size: .8rem; }
.eha-card-txt small { font-size: .7rem; }
.eha-card-go { width: 1.6rem; height: 1.6rem; }
.eha-chip { padding: .32rem .7rem; font-size: .74rem; }
.eha-sys { font-size: .72rem; }
.eha-time { font-size: .62rem; }
.eha-compose { padding: .55rem .6rem; }
.eha-compose textarea { min-height: 2.3rem; padding: .5rem .85rem; font-size: .84rem; }
.eha-send { width: 2.3rem; height: 2.3rem; }
.eha-foot { font-size: .62rem; padding-bottom: .45rem; }
.eha-bubble[dir="rtl"], .eha-bubble [dir="rtl"] { text-align: right; }
.eha-bubble[dir="ltr"] { text-align: left; }
@media (max-width: 767.98px) {
  .eha-panel { inset: auto .5rem calc(.5rem + env(safe-area-inset-bottom)) .5rem; width: auto; height: min(78vh, 38rem); border-radius: 1.25rem; border: 1px solid var(--eha-b3); padding: 0; }
  .eha-compose textarea { font-size: 16px; }
}

/* admin tab */
.eha-tabs { display: flex; gap: .25rem; padding: .4rem .5rem; border-bottom: 1px solid var(--eha-b3); background: var(--eha-b1); }
.eha-tabs button { flex: 1; padding: .4rem .5rem; border: 0; border-radius: .7rem; background: transparent; color: var(--eha-mute); font-size: .78rem; font-weight: 700; cursor: pointer; }
.eha-tabs button.is-on { background: color-mix(in oklab, var(--eha-p) 12%, var(--eha-b1)); color: var(--eha-p); }
.eha.is-admin-tab .js_eha-list, .eha.is-admin-tab .js_eha-form, .eha.is-admin-tab .js_eha-live, .eha.is-admin-tab .eha-foot { display: none !important; }
.eha-admin { display: flex; min-height: 0; flex: 1; flex-direction: column; }
.eha-admin[hidden] { display: none; }
.eha-admin .eha-list { background: radial-gradient(120% 60% at 50% 0%, color-mix(in oklab, #6366f1 7%, var(--eha-b1)) 0%, var(--eha-b1) 70%); }
.eha-mic { display: flex; flex-shrink: 0; align-items: center; justify-content: center; width: 2.3rem; height: 2.3rem; border: 1px solid var(--eha-b3); border-radius: 999px; background: var(--eha-b2); color: var(--eha-fg); cursor: pointer; }
.eha-mic.is-rec { border-color: #ef4444; background: #ef4444; color: #fff; animation: eha-rec 1.2s infinite; }
@keyframes eha-rec { 0% { box-shadow: 0 0 0 0 rgb(239 68 68 / .5); } 70% { box-shadow: 0 0 0 9px rgb(239 68 68 / 0); } 100% { box-shadow: 0 0 0 0 rgb(239 68 68 / 0); } }
.eha-plan { align-self: stretch; padding: .7rem .8rem; border: 1px solid color-mix(in oklab, #f59e0b 45%, var(--eha-b3)); border-radius: 1rem; background: color-mix(in oklab, #f59e0b 7%, var(--eha-b1)); font-size: .8rem; animation: eha-in .25s; }
.eha-plan-h { display: block; margin-bottom: .35rem; font-size: .84rem; }
.eha-plan ol { margin: 0 0 .55rem; padding-inline-start: 1.1rem; list-style: decimal; }
.eha-plan li { margin: .3rem 0; line-height: 1.45; }
.eha-plan li small { display: block; margin-top: .1rem; font-family: ui-monospace, monospace; font-size: .66rem; color: var(--eha-mute); overflow-wrap: anywhere; text-align: start; }
.eha-plan-act { display: flex; justify-content: flex-end; gap: .4rem; }
.eha-plan-act button { padding: .4rem .95rem; border: 0; border-radius: 999px; font-size: .78rem; font-weight: 700; cursor: pointer; }
.eha-plan-act button:disabled { opacity: .5; cursor: default; }
.eha-plan-no { background: var(--eha-b2); color: var(--eha-fg); }
.eha-plan-yes { background: #16a34a; color: #fff; }

/* bubble text blocks (EhnaAssistant::format): ✦ heading, ✧ sub-heading, • item, ✹ warning; Cairo for Arabic */
.eha-bubble, .eha-card, .eha-chip, .eha-sys, .eha-explain, .eha-compose textarea { font-family: 'Cairo', system-ui, -apple-system, 'Segoe UI', Tahoma, Arial, sans-serif; }
.eha-bubble p, .eha-bubble .eha-h, .eha-bubble .eha-sh, .eha-bubble .eha-li, .eha-bubble .eha-warn, .eha-explain p, .eha-explain .eha-h, .eha-explain .eha-sh, .eha-explain .eha-li, .eha-explain .eha-warn { display: block; text-align: start; unicode-bidi: plaintext; }
.eha-h, .eha-sh, .eha-li, .eha-warn { margin: 0; }
.eha-h { margin-top: .4rem; font-size: .9rem; font-weight: 800; line-height: 1.45; }
.eha-sh { margin-top: .3rem; font-size: .84rem; font-weight: 700; line-height: 1.45; }
.eha-h:first-child, .eha-sh:first-child { margin-top: 0; }
.eha-li { margin-top: .15rem; padding-inline-start: .95em; text-indent: -.95em; }
.eha-warn { margin: .35rem 0; padding: .35rem .6rem; border-inline-start: 3px solid #f59e0b; border-radius: .5rem; background: color-mix(in oklab, #f59e0b 12%, var(--eha-b1)); color: color-mix(in oklab, #92400e 80%, var(--eha-fg)); font-weight: 600; }
.eha-sym { color: var(--eha-p); font-weight: 800; }
.eha-li .eha-sym { display: inline-block; width: .6em; text-indent: 0; }
.eha-warn .eha-sym { color: #d97706; }
.eha-bubble p + .eha-li, .eha-bubble p + .eha-warn, .eha-bubble .eha-li + p { margin-top: .3rem; }

/* clickable important terms */
.eha-term { display: inline; margin: 0; padding: 0; border: 0; background: none; color: var(--eha-p); font: inherit; font-weight: 800; text-align: inherit; text-indent: 0; text-decoration: underline dotted; text-decoration-thickness: 1.5px; text-underline-offset: 3px; cursor: pointer; }
.eha-term:hover, .eha-term.is-on { text-decoration-style: solid; border-radius: .25rem; background: color-mix(in oklab, var(--eha-p) 10%, transparent); }
.eha-term:focus-visible { outline: 2px solid color-mix(in oklab, var(--eha-p) 55%, transparent); outline-offset: 1px; border-radius: .25rem; }

/* the explanation block under a bubble (tap a term) */
.eha-explain { display: flex; flex-direction: column; gap: .3rem; width: 100%; animation: eha-in .25s cubic-bezier(.22, 1, .36, 1); }
.eha-explain-body { padding: .65rem .85rem; border: 1px solid color-mix(in oklab, var(--eha-p) 35%, var(--eha-b3)); border-inline-start: 3px solid var(--eha-p); border-radius: 1rem; background: color-mix(in oklab, var(--eha-p) 4%, var(--eha-b1)); box-shadow: 0 1px 2px rgb(0 0 0 / .05); font-size: .82rem; line-height: 1.6; overflow-wrap: anywhere; text-align: start; }
.eha-explain-body p { margin: 0; }
.eha-explain-body p + p { margin-top: .35rem; }
.eha-explain-wait { display: flex; gap: .3rem; padding: .8rem .95rem; }
.eha-explain-wait span { width: .45rem; height: .45rem; border-radius: 999px; background: var(--eha-mute); animation: eha-dots 1.2s infinite ease-in-out; }
.eha-explain-wait span:nth-child(2) { animation-delay: .15s; }
.eha-explain-wait span:nth-child(3) { animation-delay: .3s; }
.eha-explain-err { border-color: color-mix(in oklab, #ef4444 35%, var(--eha-b3)); color: #dc2626; }

/* the small tools under a reply */
.eha-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .1rem; margin-top: -.15rem; padding-inline: .2rem; }
.eha-tool { display: inline-flex; align-items: center; justify-content: center; width: 1.45rem; height: 1.45rem; padding: 0; border: 0; border-radius: .4rem; background: transparent; color: var(--eha-mute); cursor: pointer; opacity: .75; transition: color .15s, background-color .15s, opacity .15s; }
.eha-tool svg { width: 14px; height: 14px; }
.eha-tool:hover, .eha-tool:focus-visible { color: var(--eha-p); background: color-mix(in oklab, var(--eha-p) 9%, transparent); opacity: 1; outline: none; }
.eha-tool.is-on, .eha-tool.is-done { color: var(--eha-p); opacity: 1; }
.eha-tool-dislike.is-on { color: #dc2626; }
.eha-tool.is-on svg { fill: color-mix(in oklab, currentColor 20%, transparent); }

/* ===== the bot v2: body in the theme colour, animated (__ehna_assistant.tpl) ===== */
.eha { --eha-p2: color-mix(in oklab, var(--eha-p) 62%, #ffffff); --eha-p3: color-mix(in oklab, var(--eha-p) 72%, #000000); }
.eha-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.eha-bot { overflow: visible; }
.eha-bot .eha-bot-head, .eha-bot .eha-bot-tail { fill: url(#eha-g-body); }
.eha-bot .eha-bot-ear { fill: var(--eha-p3); }
.eha-bot .eha-bot-shine { fill: #ffffff; opacity: .28; }
.eha-bot .eha-bot-visor { fill: #0b1220; }
.eha-bot .eha-bot-eyes ellipse { fill: url(#eha-g-eye); }
.eha-bot .eha-bot-eyes { filter: drop-shadow(0 0 2.5px rgb(34 211 238 / .85)); transform-box: fill-box; transform-origin: center; animation: eha-look 7s ease-in-out infinite, eha-blink2 5.5s infinite; }
.eha-bot .eha-bot-glint { fill: #ffffff; }
.eha-bot .eha-bot-smile { stroke: #67e8f9; opacity: .9; }
.eha-bot .eha-bot-led { fill: #fde047; filter: drop-shadow(0 0 3px #facc15); animation: eha-led2 2.2s ease-in-out infinite; }
.eha-bot .eha-bot-ant { transform-box: fill-box; transform-origin: 50% 100%; }
.eha-bot { animation: eha-float 3.4s ease-in-out infinite; }
@keyframes eha-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -2.5px; } }
@keyframes eha-look { 0%, 30%, 100% { translate: 0 0; } 38%, 52% { translate: -1.6px 0; } 60%, 74% { translate: 1.6px 0; } 82% { translate: 0 -.8px; } }
@keyframes eha-blink2 { 0%, 46%, 50%, 100% { scale: 1 1; } 48% { scale: 1 .1; } }
@keyframes eha-led2 { 0%, 100% { opacity: 1; scale: 1; } 50% { opacity: .55; scale: .82; } }
@keyframes eha-wiggle { 0%, 100% { rotate: 0deg; } 25% { rotate: -14deg; } 75% { rotate: 14deg; } }

/* launcher: a light disc with a theme ring, the bot inside takes the theme colour */
.eha-launcher { background: var(--eha-b1); color: var(--eha-p); border: 2px solid color-mix(in oklab, var(--eha-p) 38%, transparent); box-shadow: 0 12px 30px -8px color-mix(in oklab, var(--eha-p) 55%, transparent), 0 2px 8px rgb(0 0 0 / .12); }
.eha-launcher::before { content: ""; position: absolute; inset: -6px; border-radius: inherit; border: 2px solid color-mix(in oklab, var(--eha-p) 45%, transparent); opacity: 0; animation: eha-ring 3.2s ease-out infinite; pointer-events: none; }
@keyframes eha-ring { 0% { opacity: .7; scale: .9; } 70%, 100% { opacity: 0; scale: 1.25; } }
.eha.is-open .eha-launcher::before { animation: none; }
.eha-launcher .eha-bot { width: 2.45rem; height: 2.45rem; }
.eha-launcher:hover .eha-bot { animation: eha-float 1.2s ease-in-out infinite; }
.eha-launcher:hover .eha-bot-ant { animation: eha-wiggle .7s ease-in-out 2; }
.eha-l-close { color: var(--eha-p); }
@media (max-width: 767.98px) { .eha-launcher .eha-bot { width: 2.25rem; height: 2.25rem; } }

/* header avatar: white disc so the theme-coloured bot stands out on the theme header */
.eha-avatar { background: #ffffff; box-shadow: 0 2px 10px rgb(0 0 0 / .18), inset 0 0 0 1px rgb(255 255 255 / .6); }
.eha-avatar .eha-bot { width: 1.75rem; height: 1.75rem; }
.eha.is-live .eha-avatar { background: #ffffff; }

/* tab icons */
.eha-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; }
.eha-ti { flex-shrink: 0; fill: currentColor; stroke: currentColor; transition: transform .25s; }
.eha-ti-spark path { stroke: none; }
.eha-ti-spark .eha-ti-mini { opacity: .65; transform-box: fill-box; transform-origin: center; }
.eha-tabs button.is-on .eha-ti-spark path:first-child { transform-box: fill-box; transform-origin: center; animation: eha-twinkle 2.4s ease-in-out infinite; }
.eha-tabs button.is-on .eha-ti-spark .eha-ti-mini { animation: eha-twinkle 2.4s ease-in-out .6s infinite; }
@keyframes eha-twinkle { 0%, 100% { scale: 1; rotate: 0deg; } 50% { scale: .78; rotate: 20deg; } }
.eha-ti-agent rect { fill: none; stroke-width: 1.8; }
.eha-ti-agent path:last-child { fill: none; stroke-width: 1.6; stroke-linejoin: round; }
.eha-ti-agent .eha-ti-eyes circle { stroke: none; }
.eha-tabs button.is-on .eha-ti-agent .eha-ti-eyes { transform-box: fill-box; transform-origin: center; animation: eha-blink2 3.8s infinite; }
.eha-tabs button.is-on .eha-ti-agent .eha-ti-led { stroke: none; animation: eha-led2 1.8s infinite; transform-box: fill-box; transform-origin: center; }
.eha-ti-shield path:first-child { fill: none; stroke-width: 1.8; stroke-linejoin: round; }
.eha-ti-shield .eha-ti-check { stroke-dasharray: 12; stroke-dashoffset: 0; }
.eha-tabs button.is-on .eha-ti-shield .eha-ti-check { animation: eha-draw 2.6s ease-in-out infinite; }
@keyframes eha-draw { 0% { stroke-dashoffset: 12; } 35%, 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 12; } }
.eha-tabs button:hover .eha-ti { transform: translateY(-1px) scale(1.08); }

/* send: the plane takes off on hover / when pressed */
.eha-send svg, .ehl-send svg { transition: transform .25s cubic-bezier(.34, 1.56, .64, 1); }
.eha-send:hover svg, .ehl-send:hover svg { transform: translate(2px, -2px) rotate(-8deg); }
[dir="rtl"] .eha-send:hover svg, [dir="rtl"] .ehl-send:hover svg { transform: scaleX(-1) translate(2px, -2px) rotate(-8deg); }
.eha-send:active svg { transform: translate(6px, -6px) scale(.8); opacity: .6; }
.eha-mic svg { transition: transform .2s; }
.eha-mic:hover svg { transform: scale(1.12); }
@media (prefers-reduced-motion: reduce) { .eha-bot, .eha-bot *, .eha-launcher::before, .eha-ti, .eha-ti * { animation: none !important; } }

