/* Front-end styles for Richway WhatsApp Button (unchanged look) */

:root{
  --orb-size:72px;
  --orb-gap:12px;
  --rw-right:22px;
  --rw-bottom:22px;

  --rw-green-border:#7FBC11;
  --rw-green-top:#73A813;
  --rw-green-bot:#3E6B09;
  --rw-green-solid:#73A813;

  --orb-shadow: rgba(0,0,0,.45);
  --orb-shine: rgba(255,255,255,.38);
}

/* ORB */
.wa-orb{
  position: fixed;
  right: max(var(--rw-right), env(safe-area-inset-right));
  bottom: max(var(--rw-bottom), env(safe-area-inset-bottom));
  z-index: 2147483000;

  width: var(--orb-size);
  height: var(--orb-size);
  border-radius: 50%;
  display: grid;
  place-items: center;

  background: linear-gradient(180deg, var(--rw-green-top) 0%, var(--rw-green-bot) 100%);
  border: 3px solid var(--rw-green-border);

  box-shadow:
    0 10px 26px var(--orb-shadow),
    inset 0 2px 6px rgba(255,255,255,.15),
    inset 0 -10px 20px rgba(0,0,0,.25);
  isolation: isolate;
  overflow: hidden;

  transition: transform .15s ease, box-shadow .15s ease;
}
.wa-orb::before{
  content: "";
  position: absolute; inset: 0; border-radius: 50%;
  background:
    radial-gradient(100% 80% at 50% -10%,
      var(--orb-shine) 0%,
      rgba(255,255,255,.15) 20%,
      transparent 40%);
  pointer-events: none;
}
.wa-orb:hover{ transform: translateY(-2px) scale(1.03); }

.wa-orb svg{
  width: 60%;
  height: 60%;
  color: #fff;
  filter: drop-shadow(0 0 4px rgba(0,0,0,.35));
  transition: transform .2s ease, color .25s ease;
  padding-left: 3px;
  padding-bottom: 3px;
}
.wa-orb:hover svg{ transform: scale(1.05); color: #ffffff; }

/* NUDGE */
.wa-nudge{
  position: fixed;
  z-index: 2147483001;

  bottom: max(var(--rw-bottom), env(safe-area-inset-bottom));
  right: calc(max(var(--rw-right), env(safe-area-inset-right)) + var(--orb-size) + var(--orb-gap));

  display: flex;
  align-items: center;
  gap: 10px;

  padding: 10px 14px 10px 10px;
  border-radius: 18px;
  text-decoration: none;

  background: rgba(8,16,6,.92);
  border: 1px solid color-mix(in oklab, var(--rw-green-border) 45%, transparent);
  box-shadow: 0 8px 28px rgba(0,0,0,.25);

  opacity: 0;
  transform: translateX(14px) scale(.98);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  max-width: 280px;
}
.wa-nudge.--show{
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}
.wa-nudge-avatar{
  width: 34px; height: 34px;
  border-radius: 50%;
  flex-shrink: 0; object-fit: cover;
  border: 2px solid var(--rw-green-border);
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.wa-nudge-text{
  font: 600 14px/1.35 system-ui,-apple-system,"Segoe UI",Roboto,Inter,Arial,sans-serif;
  color: #f5ffe8;
  flex: 1;
}
.wa-nudge-close{
  appearance: none; border: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  position: relative; cursor: pointer; flex-shrink: 0;
  transition: background .2s ease, transform .15s ease;
}
.wa-nudge-close::before,
.wa-nudge-close::after{
  content:"";
  position:absolute; top:50%; left:50%;
  width: 12px; height: 2px; border-radius: 1px;
  background: #d6eac1; transform-origin: center;
}
.wa-nudge-close::before{ transform: translate(-50%,-50%) rotate(45deg); }
.wa-nudge-close::after { transform: translate(-50%,-50%) rotate(-45deg); }
.wa-nudge-close:hover{ background: rgba(255,255,255,.12); }
.wa-nudge.--show .wa-nudge-close{ animation: rw-close-pop .18s ease both; }
@keyframes rw-close-pop{ from{ transform: scale(.9); opacity:.85 } to{ transform: scale(1); opacity:1 } }

@media (max-width: 640px){
  .wa-nudge{
    width: min(90vw, 250px);
    max-width: none;
    gap: 8px;
    padding: 9px 12px 9px 9px;
  }
  .wa-nudge-avatar{ width: 30px; height: 30px; }
  .wa-nudge-text{ font-size: 13px; }
}

@media (max-height: 520px){
  .wa-nudge{ display: none; }
}

@media (prefers-reduced-motion: reduce){
  .wa-orb,.wa-nudge{ transition: none !important; }
}


/* Force isolation of close button to prevent theme overrides */
.wa-nudge button.wa-nudge-close {
  all: unset !important;
  display: inline-block !important;
  appearance: none !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,.06) !important;
  cursor: pointer !important;
  position: relative !important;
  flex-shrink: 0 !important;
  transition: background .2s ease, transform .15s ease !important;
}
.wa-nudge button.wa-nudge-close::before,
.wa-nudge button.wa-nudge-close::after {
  content: "" !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 12px !important;
  height: 2px !important;
  border-radius: 1px !important;
  background: var(--rw-nudge-close, #d6eac1) !important;
  transform-origin: center !important;
}
.wa-nudge button.wa-nudge-close::before {
  transform: translate(-50%, -50%) rotate(45deg) !important;
}
.wa-nudge button.wa-nudge-close::after {
  transform: translate(-50%, -50%) rotate(-45deg) !important;
}
.wa-nudge button.wa-nudge-close:hover {
  background: rgba(255,255,255,.12) !important;
}
