
:root {
  color-scheme: dark;
  --vcs-overlay: rgba(0, 5, 11, .77);
  --vcs-page: #020811;
  --vcs-modal: linear-gradient(180deg, rgba(6,22,38,.99), rgba(3,14,27,.99));
  --vcs-panel: linear-gradient(180deg, rgba(10,28,47,.78), rgba(4,17,30,.82));
  --vcs-border: rgba(58,153,238,.64);
  --vcs-border-soft: rgba(63,153,230,.18);
  --vcs-text: #f7fbff;
  --vcs-muted: #bac6d2;
  --vcs-footer: #c2ccd6;
  --vcs-close-bg: rgba(5,14,25,.72);
  --vcs-close-border: rgba(80,175,255,.34);
  --vcs-shadow: 0 34px 88px rgba(0,0,0,.62);
  --vcs-blue: #25b6ff;
  --vcs-qr-bg: linear-gradient(180deg, rgba(8,22,37,.96), rgba(4,13,24,.98));
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.vcs-demo-dark {
  background: #020811;
}

body.vcs-demo-light {
  background: #f4f8fc;
}

.demo-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.vcs-demo-dark .demo-page {
  background:
    radial-gradient(circle at 50% 42%, rgba(20,92,154,.16), transparent 34%),
    linear-gradient(180deg, #05101c, #020811 72%);
}

.vcs-demo-light .demo-page {
  background:
    radial-gradient(circle at 50% 42%, rgba(57,149,230,.12), transparent 36%),
    linear-gradient(180deg, #ffffff, #eef4fa 76%);
}

.demo-label {
  color: rgba(110,130,150,.32);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

/* Light theme variables */
.vcsw-root[data-theme="light"] {
  --vcs-overlay: rgba(229,238,247,.72);
  --vcs-modal: linear-gradient(180deg, rgba(255,255,255,.985), rgba(247,250,253,.99));
  --vcs-panel: linear-gradient(180deg, rgba(255,255,255,.94), rgba(247,250,253,.96));
  --vcs-border: rgba(59,157,239,.55);
  --vcs-border-soft: rgba(75,136,190,.18);
  --vcs-text: #13263b;
  --vcs-muted: #53677b;
  --vcs-footer: #273b50;
  --vcs-close-bg: rgba(255,255,255,.84);
  --vcs-close-border: rgba(90,130,165,.24);
  --vcs-shadow: 0 28px 74px rgba(54,91,125,.22);
  --vcs-qr-bg: linear-gradient(180deg, #ffffff, #f7fbff);
}

/* Floating launcher */
.vcsw-launcher {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 2147483600;
  width: 56px;
  height: 56px;
  border: 1px solid rgba(81,188,255,.9);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, rgba(255,255,255,.28), transparent 24%),
    linear-gradient(145deg, #168fdc, #0457ae);
  box-shadow:
    0 0 0 8px rgba(25,143,230,.08),
    0 0 28px rgba(38,175,255,.58),
    0 18px 34px rgba(0,0,0,.5),
    inset 0 1px 0 rgba(255,255,255,.32);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform .22s ease, box-shadow .22s ease;
}

.vcsw-root[data-theme="light"] .vcsw-launcher {
  background:
    radial-gradient(circle at 35% 28%, rgba(255,255,255,.38), transparent 24%),
    linear-gradient(145deg, #22c96a, #0aa64f);
  box-shadow:
    0 0 0 8px rgba(23,171,93,.08),
    0 0 26px rgba(23,171,93,.36),
    0 16px 30px rgba(62,96,126,.22),
    inset 0 1px 0 rgba(255,255,255,.36);
  border-color: rgba(76,211,137,.92);
}

.vcsw-launcher::before,
.vcsw-launcher::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.vcsw-launcher::before {
  inset: -8px;
  border: 1px solid rgba(57,186,255,.22);
  animation: vcsw-ring 3.2s ease-in-out infinite;
}

.vcsw-root[data-theme="light"] .vcsw-launcher::before {
  border-color: rgba(37,190,109,.22);
}

.vcsw-launcher::after {
  inset: -15px;
  background:
    radial-gradient(circle, rgba(46,171,255,.8) 0 1px, transparent 1.5px) 4px 3px/13px 13px;
  opacity: .24;
  animation: vcsw-dots 8s linear infinite;
}

.vcsw-root[data-theme="light"] .vcsw-launcher::after {
  background:
    radial-gradient(circle, rgba(24,179,97,.68) 0 1px, transparent 1.5px) 4px 3px/13px 13px;
}

.vcsw-launcher:hover {
  transform: translateY(-3px) scale(1.02);
}

.vcsw-launcher__icon {
  position: absolute;
  width: 27px;
  height: 27px;
  opacity: 0;
  transform: scale(.72) rotate(-14deg);
  transition: opacity .45s ease, transform .45s ease;
}

.vcsw-launcher__icon.is-active {
  opacity: 1;
  transform: scale(1) rotate(0);
}

.vcsw-launcher svg {
  width: 100%;
  height: 100%;
  fill: white;
  overflow: visible;
}

/* Overlay */
.vcsw-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483500;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--vcs-overlay);
  backdrop-filter: blur(9px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .24s ease, visibility .24s ease;
}

.vcsw-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.vcsw-modal {
  position: relative;
  width: min(520px, calc(100vw - 24px));
  padding: 17px 19px 13px;
  border: 1px solid var(--vcs-border);
  border-radius: 19px;
  background: var(--vcs-modal);
  color: var(--vcs-text);
  box-shadow: var(--vcs-shadow);
  transform: translateY(18px) scale(.97);
  opacity: 0;
  overflow: hidden;
  transition: transform .34s cubic-bezier(.18,.84,.26,1), opacity .28s ease;
}

.vcsw-overlay.is-open .vcsw-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.vcsw-modal::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(61,184,255,.96), transparent);
  box-shadow: 0 0 14px rgba(61,184,255,.72);
}

.vcsw-close {
  position: absolute;
  right: 13px;
  top: 13px;
  width: 29px;
  height: 29px;
  border: 1px solid var(--vcs-close-border);
  border-radius: 50%;
  background: var(--vcs-close-bg);
  color: var(--vcs-text);
  font-size: 20px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 3;
}

.vcsw-brand {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 11px;
  padding: 1px 39px 0;
}

.vcsw-brand::before,
.vcsw-brand::after {
  content: "";
  height: 1px;
  background: linear-gradient(90deg, transparent, #32b7ff);
  box-shadow: 0 0 8px rgba(50,183,255,.8);
}

.vcsw-brand::after {
  background: linear-gradient(90deg, #32b7ff, transparent);
}

.vcsw-brand img {
  display: block;
  width: 180px;
  max-width: 100%;
  height: auto;
  filter: brightness(1.1) saturate(.95);
}

.vcsw-root[data-theme="light"] .vcsw-brand img {
  filter: none;
}

.vcsw-head {
  text-align: center;
  padding: 16px 25px;
}

.vcsw-title {
  margin: 0;
  color: var(--vcs-text);
  font-size: 23px;
  line-height: 1.12;
  letter-spacing: -.028em;
  font-weight: 760;
}

.vcsw-subtitle {
  margin: 7px auto 0;
  max-width: 380px;
  color: var(--vcs-muted);
  font-size: 11px;
  line-height: 1.52;
}

.vcsw-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 13px;
  align-items: stretch;
}

.vcsw-panel {
  border: 1px solid var(--vcs-border-soft);
  border-radius: 16px;
  background: var(--vcs-panel);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.vcsw-qr-panel {
  padding: 12px 12px 13px;
}

.vcsw-qr-label {
  margin: 0 0 9px;
  color: var(--vcs-text);
  font-size: 10px;
  font-weight: 650;
  text-align: center;
}

.vcsw-qr-box {
  position: relative;
  width: 190px;
  height: 190px;
  margin: auto;
  padding: 11px;
  border-radius: 12px;
  background: var(--vcs-qr-bg);
  overflow: hidden;
}

.vcsw-qr-box img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.vcsw-corner {
  position: absolute;
  width: 27px;
  height: 27px;
  border-color: #54c7ff;
  border-style: solid;
  filter: drop-shadow(0 0 6px rgba(70,192,255,.92));
  opacity: .92;
}

.vcsw-corner.tl { left: 6px; top: 6px; border-width: 3px 0 0 3px; border-radius: 9px 0 0 0; }
.vcsw-corner.tr { right: 6px; top: 6px; border-width: 3px 3px 0 0; border-radius: 0 9px 0 0; }
.vcsw-corner.bl { left: 6px; bottom: 6px; border-width: 0 0 3px 3px; border-radius: 0 0 0 9px; }
.vcsw-corner.br { right: 6px; bottom: 6px; border-width: 0 3px 3px 0; border-radius: 0 0 9px 0; }

.vcsw-scan {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 7px;
  height: 19px;
  background:
    linear-gradient(to bottom,
      transparent,
      rgba(31,169,255,.14) 22%,
      rgba(82,207,255,.98) 50%,
      rgba(31,169,255,.14) 78%,
      transparent);
  filter: drop-shadow(0 0 8px rgba(61,189,255,.92));
  opacity: 0;
  animation: vcsw-scan 4.5s ease-in-out infinite;
  pointer-events: none;
}

.vcsw-actions {
  display: grid;
  gap: 13px;
  align-content: center;
  padding: 14px;
}

.vcsw-action {
  min-height: 66px;
  border-radius: 14px;
  padding: 0 13px;
  display: grid;
  grid-template-columns: 46px 1fr 13px;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  border: 1px solid;
  position: relative;
  overflow: hidden;
  transition: transform .22s ease, filter .22s ease;
}

.vcsw-action:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
}

.vcsw-action--wa {
  background:
    radial-gradient(circle at 18% 35%, rgba(43,255,132,.22), transparent 25%),
    linear-gradient(135deg, rgba(13,132,63,.98), rgba(2,57,34,.98));
  border-color: rgba(29,231,114,.72);
}

.vcsw-action--tg {
  background:
    radial-gradient(circle at 18% 35%, rgba(66,190,255,.24), transparent 25%),
    linear-gradient(135deg, rgba(13,121,220,.98), rgba(3,45,105,.98));
  border-color: rgba(48,165,255,.72);
}

.vcsw-action__icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.26), 0 0 17px rgba(255,255,255,.11);
}

.vcsw-action--wa .vcsw-action__icon {
  background: linear-gradient(145deg, #27dd75, #0aa64f);
}

.vcsw-action--tg .vcsw-action__icon {
  background: linear-gradient(145deg, #39c6ff, #0871d4);
}

.vcsw-action__icon svg {
  width: 31px;
  height: 31px;
  fill: white;
  overflow: visible;
}

.vcsw-action__title {
  display: block;
  font-size: 16px;
  line-height: 1.05;
  font-weight: 750;
}

.vcsw-action__sub {
  display: block;
  margin-top: 4px;
  color: rgba(255,255,255,.82);
  font-size: 9px;
}

.vcsw-action__arrow {
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
}

.vcsw-foot {
  display: grid;
  place-items: center;
  gap: 3px;
  min-height: 42px;
  margin-top: 10px;
  border-top: 1px solid var(--vcs-border-soft);
  color: var(--vcs-footer);
  text-align: center;
}

.vcsw-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 700;
}

.vcsw-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #15db69;
  box-shadow: 0 0 0 5px rgba(21,219,105,.08), 0 0 14px rgba(21,219,105,.72);
}

.vcsw-status.is-offline::before {
  background: #ff3b30;
  box-shadow: 0 0 0 5px rgba(255,59,48,.08), 0 0 14px rgba(255,59,48,.72);
}

.vcsw-foot-note {
  font-size: 9px;
  opacity: .76;
}

@keyframes vcsw-scan {
  0%, 16% { transform: translateY(-24px); opacity: 0; }
  23% { opacity: 1; }
  68% { transform: translateY(151px); opacity: 1; }
  77%, 100% { transform: translateY(151px); opacity: 0; }
}

@keyframes vcsw-ring {
  0%, 100% { transform: scale(.96); opacity: .45; }
  50% { transform: scale(1.04); opacity: .95; }
}

@keyframes vcsw-dots {
  to { transform: rotate(360deg); }
}

@media (max-width: 700px) {
  .vcsw-overlay {
    align-items: end;
    padding: 0;
  }

  .vcsw-modal {
    width: 100%;
    max-width: none;
    border-radius: 22px 22px 0 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    padding: 20px 17px calc(16px + env(safe-area-inset-bottom));
  }

  .vcsw-brand {
    padding: 0 44px;
  }

  .vcsw-brand img {
    width: 190px;
  }

  .vcsw-title {
    font-size: 25px;
  }

  .vcsw-subtitle {
    font-size: 13px;
  }

  .vcsw-grid {
    grid-template-columns: 1fr;
  }

  .vcsw-qr-panel {
    display: none;
  }

  .vcsw-actions {
    padding: 12px;
    gap: 11px;
  }

  .vcsw-action {
    min-height: 76px;
    grid-template-columns: 48px 1fr 16px;
  }

  .vcsw-action__title {
    font-size: 19px;
  }

  .vcsw-action__sub {
    font-size: 11px;
  }

  .vcsw-launcher {
    right: 17px;
    bottom: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Joomla plugin options */
.vcsw-root[data-position="left"] .vcsw-launcher {
  left: 28px;
  right: auto;
}

.vcsw-qr-panel[hidden] {
  display: none !important;
}

.vcsw-root:has(.vcsw-qr-panel[hidden]) .vcsw-grid {
  grid-template-columns: 1fr;
}

@media (max-width: 700px) {
  .vcsw-root[data-position="left"] .vcsw-launcher {
    left: 17px;
    right: auto;
  }
}


/* VCS Widget PRO 2.0: protect buttons from Joomla/SP Page Builder link styles */
.vcsw-root .vcsw-action,
.vcsw-root .vcsw-action:link,
.vcsw-root .vcsw-action:visited,
.vcsw-root .vcsw-action:hover,
.vcsw-root .vcsw-action:focus,
.vcsw-root .vcsw-action:active {
  color: #fff !important;
  text-decoration: none !important;
}

.vcsw-root .vcsw-action *,
.vcsw-root .vcsw-action:hover *,
.vcsw-root .vcsw-action:focus *,
.vcsw-root .vcsw-action:active * {
  color: #fff !important;
}

.vcsw-root .vcsw-action__sub,
.vcsw-root .vcsw-action:hover .vcsw-action__sub,
.vcsw-root .vcsw-action:focus .vcsw-action__sub {
  color: rgba(255,255,255,.86) !important;
}

.vcsw-root .vcsw-action svg,
.vcsw-root .vcsw-action:hover svg,
.vcsw-root .vcsw-launcher svg {
  fill: #fff !important;
}

.vcsw-root .vcsw-action:hover,
.vcsw-root .vcsw-action:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.08) saturate(1.05);
  outline: none;
}

.vcsw-root .vcsw-action::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 8%, rgba(255,255,255,.16), transparent 42%);
  transform: translateX(-125%);
  transition: transform .55s ease;
}

.vcsw-root .vcsw-action:hover::after,
.vcsw-root .vcsw-action:focus-visible::after {
  transform: translateX(125%);
}

.vcsw-root .vcsw-action__icon,
.vcsw-root .vcsw-action__arrow {
  transition: transform .22s ease, filter .22s ease;
}

.vcsw-root .vcsw-action:hover .vcsw-action__icon,
.vcsw-root .vcsw-action:focus-visible .vcsw-action__icon {
  transform: scale(1.08);
  filter: brightness(1.08);
}

.vcsw-root .vcsw-action:hover .vcsw-action__arrow,
.vcsw-root .vcsw-action:focus-visible .vcsw-action__arrow {
  transform: translateX(4px);
}

.vcsw-root[data-size="compact"] .vcsw-modal { zoom: .88; }
.vcsw-root[data-size="large"] .vcsw-modal { zoom: 1.12; }

.vcsw-root.vcsw-no-qr .vcsw-modal {
  width: min(330px, calc(100vw - 24px));
}
.vcsw-root.vcsw-no-qr .vcsw-grid {
  grid-template-columns: 1fr;
}

@media (max-width: 700px) {
  .vcsw-root[data-size="compact"] .vcsw-modal,
  .vcsw-root[data-size="large"] .vcsw-modal {
    zoom: 1;
  }
}
