/*! WS Essentials 1.0.1 | (C) 2026 What Studio | GPL-2.0-or-later */
.wse-banner {
  position: fixed;
  /* valore massimo: deve stare sopra i widget di chat (onWebChat usa 2147483600) */
  z-index: 2147483647;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--wse-bg, #1f2328);
  color: var(--wse-fg, #fff);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  text-align: left;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, .25);
}
.wse-banner[hidden],
.wse-prefs[hidden],
.wse-revoke[hidden],
.wse-btn[hidden] { display: none !important; }
.wse-inner {
  position: relative;
  box-sizing: border-box;
  max-width: 1200px;
  max-height: 100vh;
  overflow: auto;
  margin: 0 auto;
  padding: 20px 60px 20px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  align-items: center;
}
.wse-body { flex: 1 1 420px; min-width: 0; }
.wse-title { margin: 0 0 4px; font-weight: 700; font-size: 1.05em; color: inherit; }
.wse-message p { margin: 0 0 .4em; color: inherit; }
.wse-message p:last-child { margin-bottom: 0; }
.wse-links { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.wse-banner a { color: inherit; text-decoration: underline; }
.wse-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.wse-btn {
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  min-height: 44px;
  margin: 0;
  padding: 9px 18px;
  border: 2px solid var(--wse-btn-bg, #fff);
  border-radius: 4px;
  background: var(--wse-btn-bg, #fff);
  color: var(--wse-btn-fg, #1f2328);
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-transform: none;
  letter-spacing: normal;
  cursor: pointer;
}
.wse-btn:hover { filter: brightness(.92); }
.wse-btn-secondary { background: transparent; color: var(--wse-fg, #fff); }
.wse-btn:focus-visible,
.wse-close:focus-visible,
.wse-revoke:focus-visible,
.wse-switch:focus-visible,
.wse-banner a:focus-visible { outline: 3px solid #4c9ffe; outline-offset: 2px; }
.wse-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.wse-prefs { flex: 1 1 100%; padding-top: 12px; border-top: 1px solid rgba(127, 127, 127, .4); }
.wse-prefs-title { margin: 0 0 6px; font-weight: 700; color: inherit; }
.wse-cat { padding: 8px 0; }
.wse-cat + .wse-cat { border-top: 1px solid rgba(127, 127, 127, .3); }
.wse-cat-head { display: flex; align-items: center; gap: 10px; }
.wse-cat-head label { margin: 0; font-weight: 600; color: inherit; cursor: pointer; }
.wse-always { margin-left: auto; font-size: .85em; opacity: .8; }
.wse-cat-desc { margin: 4px 0 0 46px; font-size: .9em; opacity: .85; color: inherit; }
.wse-switch {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  flex: 0 0 36px;
  width: 36px;
  height: 20px;
  margin: 0;
  border: 0;
  border-radius: 10px;
  background: rgba(127, 127, 127, .6);
  cursor: pointer;
  transition: background .15s;
}
.wse-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform .15s;
}
.wse-switch:checked { background: #2e7d32; }
.wse-switch:checked::after { transform: translateX(16px); }
.wse-switch:disabled { opacity: .6; cursor: not-allowed; }

.wse-layout-box { left: 16px; right: auto; bottom: 16px; max-width: 460px; border-radius: 8px; }
.wse-layout-box .wse-inner { display: block; padding: 20px 20px 20px 20px; }
.wse-layout-box .wse-body { padding-right: 28px; }
.wse-layout-box .wse-actions { margin-top: 14px; }

.wse-revoke {
  position: fixed;
  z-index: 2147483646;
  bottom: 16px;
  margin: 0;
  padding: 8px 14px;
  border: 0;
  border-radius: 20px;
  background: var(--wse-bg, #1f2328);
  color: var(--wse-fg, #fff);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  opacity: .9;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}
.wse-revoke:hover { opacity: 1; }
.wse-revoke-left { left: 16px; }
.wse-revoke-right { right: 16px; }

.wse-privacy { display: flex; align-items: flex-start; gap: 8px; margin: 10px 0 14px; text-align: left; }
.wse-privacy input { flex: 0 0 auto; width: 18px; height: 18px; margin: .2em 0 0; }
.wse-privacy label { display: inline; margin: 0; font-size: .95em; font-weight: normal; line-height: 1.4; }

.wse-placeholder {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 220px;
  padding: 24px;
  border: 1px dashed #adb5bd;
  background: #f1f3f5;
  color: #212529;
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
}
.wse-placeholder p { max-width: 520px; margin: 0; color: inherit; }
.wse-placeholder .wse-btn { border-color: #212529; background: #212529; color: #fff; }
iframe[data-wse-src] { display: none !important; }

@media (max-width: 640px) {
  .wse-inner { padding: 16px 52px 16px 16px; }
  .wse-actions { width: 100%; }
  .wse-actions .wse-btn { flex: 1 1 auto; }
  .wse-layout-box { left: 8px; right: 8px; bottom: 8px; max-width: none; }
  .wse-cat-desc { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .wse-switch, .wse-switch::after { transition: none; }
}
