/* AG Holdings — floating WhatsApp button (assets/ag-whatsapp.js) */
.ag-wa {
  --wa: #25d366;
  --wa-dark: #128c4b;
  position: fixed;
  inset-inline-end: clamp(16px, 2.4vw, 32px);
  bottom: calc(clamp(16px, 2.4vw, 32px) + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  font-family: inherit;
}
.ag-wa svg { width: 1em; height: 1em; display: block; }

.ag-wa__toggle {
  position: relative;
  width: 60px; height: 60px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: var(--wa); color: #fff;
  font-size: 32px; cursor: pointer;
  box-shadow: 0 10px 28px -8px rgba(18, 140, 75, .65), 0 2px 6px rgba(0, 0, 0, .12);
  transition: transform .3s cubic-bezier(.2, .7, .2, 1), background .25s;
  animation: ag-wa-in .6s .6s cubic-bezier(.2, .7, .2, 1) both;
}
.ag-wa__toggle::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(37, 211, 102, .55);
  animation: ag-wa-pulse 2.6s 1.4s ease-out infinite;
}
.ag-wa__toggle:hover { transform: scale(1.07); background: #1fbe5b; }
.ag-wa__toggle:focus-visible, .ag-wa__close:focus-visible, .ag-wa__cta:focus-visible {
  outline: 3px solid #b49c74; outline-offset: 3px;
}
.ag-wa.is-open .ag-wa__toggle::after { animation: none; }

.ag-wa__teaser {
  margin: 0; max-width: 240px;
  padding: 10px 14px;
  background: #fff; color: #28375c;
  font-size: 13px; line-height: 1.5;
  border-radius: 14px 14px 4px 14px;
  box-shadow: 0 12px 30px -12px rgba(40, 55, 92, .45);
  cursor: pointer;
  animation: ag-wa-pop .45s cubic-bezier(.2, .7, .2, 1) both;
}
[dir="rtl"] .ag-wa__teaser { border-radius: 14px 14px 14px 4px; font-size: 14px; }

.ag-wa__panel {
  width: min(340px, calc(100vw - 32px));
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 60px -18px rgba(40, 55, 92, .5), 0 2px 8px rgba(0, 0, 0, .08);
  transform-origin: bottom right;
  animation: ag-wa-pop .4s cubic-bezier(.2, .7, .2, 1) both;
}
[dir="rtl"] .ag-wa__panel { transform-origin: bottom left; }
.ag-wa__panel[hidden] { display: none; }

.ag-wa__head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 16px 16px 18px;
  background: #28375c; color: #fff;
}
.ag-wa__avatar {
  flex: none; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--wa); font-size: 24px;
}
.ag-wa__head strong { display: block; font-size: 15px; font-weight: 600; }
.ag-wa__head small { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #d6dbe6; margin-top: 2px; }
.ag-wa__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--wa); }
.ag-wa__close {
  margin-inline-start: auto; align-self: flex-start;
  width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: transparent; color: #fff; font-size: 24px; line-height: 1; cursor: pointer;
}
.ag-wa__close:hover { background: rgba(255, 255, 255, .12); }

.ag-wa__body { padding: 18px; background: #f3efe7; }
.ag-wa__bubble {
  margin: 0; padding: 12px 14px;
  background: #fff; color: #37466b;
  font-size: 14px; line-height: 1.7;
  border-radius: 4px 14px 14px 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}
[dir="rtl"] .ag-wa__bubble { border-radius: 14px 4px 14px 14px; }

.ag-wa__cta {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 16px 18px 6px;
  padding: 13px 18px;
  background: var(--wa); color: #fff !important;
  font-size: 14px; font-weight: 600; text-decoration: none;
  border-radius: 999px;
  transition: background .25s, transform .25s;
}
.ag-wa__cta svg { font-size: 20px; }
.ag-wa__cta:hover { background: var(--wa-dark); transform: translateY(-1px); }
.ag-wa__number { margin: 0 0 14px; text-align: center; font-size: 12px; color: #727b80; letter-spacing: .04em; }

@keyframes ag-wa-in { from { opacity: 0; transform: translateY(20px) scale(.8); } to { opacity: 1; transform: none; } }
@keyframes ag-wa-pop { from { opacity: 0; transform: translateY(10px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes ag-wa-pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, .55); }
  70%, 100% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
}

@media (max-width: 600px) {
  .ag-wa__toggle { width: 54px; height: 54px; font-size: 29px; }
}
@media print { .ag-wa { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .ag-wa__toggle, .ag-wa__toggle::after, .ag-wa__panel, .ag-wa__teaser { animation: none !important; }
}
