body.panel-open {
  overflow: hidden;
}

.whatsapp-panel-trigger {
  position: fixed;
  top: 118px;
  right: 22px;
  z-index: 1300;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 19px;
  border-radius: 999px;
  border: 1px solid rgba(var(--site-accent-rgb, 218, 35, 42), 0.75);
  background: rgba(var(--site-accent-rgb, 218, 35, 42), 0.24);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: right 0.35s ease, left 0.35s ease, padding 0.35s ease, gap 0.35s ease, transform 0.35s ease;
  max-width: calc(100vw - 44px);
}

.whatsapp-panel-trigger .trigger-label {
  display: inline-block;
  max-width: 320px;
  opacity: 1;
  overflow: hidden;
  white-space: nowrap;
  transition: max-width 0.35s ease, opacity 0.28s ease, margin 0.35s ease;
}

.whatsapp-panel-trigger.is-collapsed,
.whatsapp-panel-trigger.is-nav-shifted {
  right: 12px;
  left: auto;
  padding: 12px;
  gap: 0;
}

.whatsapp-panel-trigger.is-collapsed .trigger-label,
.whatsapp-panel-trigger.is-nav-shifted .trigger-label {
  max-width: 0;
  opacity: 0;
  margin: 0;
}

.trigger-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  font-size: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  transform-origin: center 4px;
  animation: bellGrowShake 3s ease-in-out infinite;
  will-change: transform;
  flex-shrink: 0;
}

.whatsapp-panel-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 10, 0.55);
  z-index: 1380;
  opacity: 0;
  transition: opacity 0.24s ease;
}

.whatsapp-panel-backdrop.is-visible {
  opacity: 1;
}

.whatsapp-pref-panel {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: min(420px, 92vw);
  z-index: 1400;
  background: #0f1114;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 48px rgba(0, 0, 0, 0.45);
  transform: translateX(-104%);
  transition: transform 0.25s ease;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.whatsapp-pref-panel.is-open {
  transform: translateX(0);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.panel-head h2 {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
}

.panel-close {
  border: 0;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.panel-form {
  overflow-y: auto;
  padding: 12px 14px 20px;
  display: grid;
  gap: 12px;
}

.panel-alert {
  margin: 10px 14px 0;
  border-radius: 10px;
  padding: 10px 11px;
  font-size: 13px;
}

.panel-alert.success {
  border: 1px solid rgba(22, 163, 74, 0.55);
  background: rgba(22, 163, 74, 0.17);
}

.panel-alert.error {
  border: 1px solid rgba(220, 38, 38, 0.55);
  background: rgba(220, 38, 38, 0.17);
}

.panel-master-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 10px 12px;
}

.panel-master-switch-copy {
  display: grid;
  gap: 4px;
}

.panel-master-switch-copy strong {
  font-size: 13px;
  font-weight: 700;
}

.panel-master-switch-copy small {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.35;
}

.panel-master-switch-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 28px;
}

.panel-master-switch-control input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.panel-master-switch-slider {
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: background 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.panel-master-switch-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease;
}

.panel-master-switch-control input:checked + .panel-master-switch-slider {
  background: rgba(var(--site-accent-rgb, 218, 35, 42), 0.95);
  border-color: rgba(var(--site-accent-rgb, 218, 35, 42), 1);
}

.panel-master-switch-control input:checked + .panel-master-switch-slider::after {
  transform: translateX(20px);
}

.panel-master-switch-control input:focus-visible + .panel-master-switch-slider {
  box-shadow: 0 0 0 3px rgba(var(--site-accent-rgb, 218, 35, 42), 0.35);
}

.panel-fields {
  display: none;
  gap: 10px;
}

.panel-fields.is-visible {
  display: grid;
}

.panel-field {
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 10px;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.panel-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.panel-field label {
  font-size: 13px;
  font-weight: 600;
}

.panel-field input[type="text"],
.panel-field input[type="tel"] {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 13px;
}

.panel-field input[type="text"]::placeholder,
.panel-field input[type="tel"]::placeholder {
  color: rgba(255, 255, 255, 0.58);
}

.panel-field input[type="text"]:focus,
.panel-field input[type="tel"]:focus {
  outline: none;
  border-color: rgba(var(--site-accent-rgb, 218, 35, 42), 0.85);
  box-shadow: 0 0 0 2px rgba(var(--site-accent-rgb, 218, 35, 42), 0.22);
}

.panel-consent-field {
  gap: 6px;
}

.panel-consent-label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-weight: 500;
}

.panel-consent-label span {
  font-size: 12px;
  line-height: 1.45;
  color: #ececec;
}

.panel-consent-label a {
  color: #fff;
  text-decoration: underline;
}

.panel-consent-error {
  color: #fca5a5;
  font-size: 12px;
}

.select-all-btn {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 11px;
  padding: 4px 9px;
  cursor: pointer;
}

.panel-options-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 230px;
  overflow: auto;
  padding-right: 2px;
}

.panel-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 8px;
}

.panel-option span {
  font-size: 12px;
  color: #f4f4f4;
}

.panel-save {
  border: 1px solid rgba(var(--site-accent-rgb, 218, 35, 42), 0.72);
  border-radius: 10px;
  background: rgba(var(--site-accent-rgb, 218, 35, 42), 0.26);
  color: #fff;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.panel-save:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.panel-help {
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

@keyframes bellGrowShake {
  0%,
  72%,
  100% {
    transform: scale(1) rotate(0deg);
  }
  76% {
    transform: scale(1.38) rotate(-15deg);
  }
  80% {
    transform: scale(1.42) rotate(13deg);
  }
  84% {
    transform: scale(1.33) rotate(-10deg);
  }
  88% {
    transform: scale(1.24) rotate(8deg);
  }
  92% {
    transform: scale(1.12) rotate(-4deg);
  }
}

@media (max-width: 680px) {
  .whatsapp-panel-trigger {
    top: 92px;
    right: 12px;
    left: 12px;
    justify-content: center;
    font-size: 14px;
    padding: 12px 14px;
  }

  .whatsapp-panel-trigger.is-collapsed,
  .whatsapp-panel-trigger.is-nav-shifted {
    left: auto;
    right: 12px;
    width: auto;
    justify-content: center;
  }

  .trigger-icon {
    width: 32px;
    height: 32px;
    font-size: 22px;
  }

  .panel-options-grid {
    grid-template-columns: 1fr;
  }
}
