/* ==========================================================================
   Z-Line Traffic-Light Cookie Banner & Preference Center
   ========================================================================== */

/* Suppress GTM-injected default banners (Orestbida CookieConsent v3/v2, Cookiebot, OneTrust, Osano) */
#cc-main .cm,
#cc-main .cm-wrapper,
.cc-window,
.cc-banner,
#cookie-law-info-bar,
#cookie-notice,
.osano-cm-window,
#CybotCookiebotDialog:not([class*="Preference"]),
#onetrust-banner-sdk {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Fallback dark glassmorphism theme if CookieConsent v3 Preferences Modal (#cc-main .pm) is ever triggered */
#cc-main .pm {
  background: rgba(10, 10, 14, 0.94) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #ffffff !important;
  font-family: "proxima-nova", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
}

#spwk-cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 520px;
  max-width: calc(100vw - 48px);
  background: rgba(10, 10, 14, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 22px 24px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.68), 0 4px 14px rgba(0, 0, 0, 0.45);
  z-index: 2147483647;
  font-family: "proxima-nova", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transform: translateY(150%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.4s ease,
              width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

#spwk-cookie-banner.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

#spwk-cookie-banner.is-managing {
  width: 460px;
}

/* Header: White Wave Logo + 3-Bulb Traffic Light Housing */
.cookie-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: -2px;
}

.cookie-header .cookie-logo {
  display: block;
  height: 48px;
  width: auto;
  aspect-ratio: 857.33 / 1125.07;
  background-color: #ffffff;
  -webkit-mask: url("/images/wavelogo-spwk-black.svg") center / contain no-repeat;
  mask: url("/images/wavelogo-spwk-black.svg") center / contain no-repeat;
  opacity: 0.95;
}

.traffic-light-housing {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.65);
}

.tl-bulb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease, background-color 0.25s ease;
  opacity: 0.42;
}

.tl-bulb.red {
  background-color: #e43e2b;
}

.tl-bulb.yellow {
  background-color: #f7ca18;
}

.tl-bulb.green {
  background-color: #64b20e;
}

/* Active / lit bulb states */
.traffic-light-housing.lit-red .tl-bulb.red,
.traffic-light-housing.lit-all .tl-bulb.red {
  opacity: 1;
  transform: scale(1.18);
  box-shadow: 0 0 8px #e43e2b, 0 0 16px rgba(228, 62, 43, 0.75);
}

.traffic-light-housing.lit-yellow .tl-bulb.yellow,
.traffic-light-housing.lit-all .tl-bulb.yellow {
  opacity: 1;
  transform: scale(1.18);
  box-shadow: 0 0 8px #f7ca18, 0 0 16px rgba(247, 202, 24, 0.75);
}

.traffic-light-housing.lit-green .tl-bulb.green,
.traffic-light-housing.lit-all .tl-bulb.green {
  opacity: 1;
  transform: scale(1.18);
  box-shadow: 0 0 8px #64b20e, 0 0 16px rgba(100, 178, 14, 0.75);
}

#spwk-cookie-banner p {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.78);
}

#spwk-cookie-banner p strong {
  color: #ffffff;
  font-weight: 700;
}

/* Traffic-Light Action Buttons */
.cookie-actions {
  display: flex;
  flex-direction: row;
  gap: 9px;
  margin-top: 2px;
}

#spwk-cookie-banner.is-managing #cookie-main-actions {
  display: none;
}

.cookie-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 6px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  text-align: center;
  border: 1px solid transparent;
  transition: all 0.22s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.03);
  white-space: nowrap;
}

.cookie-btn .btn-led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background-color 0.22s ease, box-shadow 0.22s ease;
}

/* Red Signal Button */
.cookie-btn.red {
  color: #f05a49;
  border-color: rgba(228, 62, 43, 0.42);
}
.cookie-btn.red .btn-led {
  background-color: #e43e2b;
  box-shadow: 0 0 6px rgba(228, 62, 43, 0.8);
}
.cookie-btn.red:hover,
.cookie-btn.red:focus-visible {
  background: #e43e2b;
  color: #ffffff;
  border-color: #e43e2b;
  box-shadow: 0 4px 16px rgba(228, 62, 43, 0.4);
  transform: translateY(-1px);
}
.cookie-btn.red:hover .btn-led {
  background-color: #ffffff;
  box-shadow: 0 0 6px #ffffff;
}

/* Yellow / Amber Signal Button */
.cookie-btn.yellow {
  color: #f7ca18;
  border-color: rgba(247, 202, 24, 0.42);
}
.cookie-btn.yellow .btn-led {
  background-color: #f7ca18;
  box-shadow: 0 0 6px rgba(247, 202, 24, 0.8);
}
.cookie-btn.yellow:hover,
.cookie-btn.yellow:focus-visible {
  background: #f7ca18;
  color: #111111;
  border-color: #f7ca18;
  box-shadow: 0 4px 16px rgba(247, 202, 24, 0.4);
  transform: translateY(-1px);
}
.cookie-btn.yellow:hover .btn-led {
  background-color: #111111;
  box-shadow: none;
}

/* Green Signal Button */
.cookie-btn.green {
  color: #78cc18;
  border-color: rgba(100, 178, 14, 0.42);
}
.cookie-btn.green .btn-led {
  background-color: #64b20e;
  box-shadow: 0 0 6px rgba(100, 178, 14, 0.8);
}
.cookie-btn.green:hover,
.cookie-btn.green:focus-visible {
  background: #64b20e;
  color: #ffffff;
  border-color: #64b20e;
  box-shadow: 0 4px 16px rgba(100, 178, 14, 0.4);
  transform: translateY(-1px);
}
.cookie-btn.green:hover .btn-led {
  background-color: #ffffff;
  box-shadow: 0 0 6px #ffffff;
}

/* ==========================================================================
   Traffic-Light Manage Panel
   ========================================================================== */
.cookie-manage-panel {
  display: none;
  flex-direction: column;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

#spwk-cookie-banner.is-managing .cookie-manage-panel {
  display: flex;
}

.manage-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.manage-title {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.65);
}

.manage-status-pill {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(247, 202, 24, 0.16);
  color: #f7ca18;
  border: 1px solid rgba(247, 202, 24, 0.35);
  transition: all 0.25s ease;
}

.manage-status-pill.status-green {
  background: rgba(100, 178, 14, 0.18);
  color: #84db21;
  border-color: rgba(100, 178, 14, 0.4);
}

.manage-status-pill.status-red {
  background: rgba(228, 62, 43, 0.18);
  color: #ff6b5b;
  border-color: rgba(228, 62, 43, 0.4);
}

.tl-category-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tl-category-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-left-width: 3px;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}

.tl-category-row.is-green {
  border-left-color: #64b20e;
}

.tl-category-row.is-yellow {
  border-left-color: #f7ca18;
}

.tl-category-row.is-red {
  border-left-color: #e43e2b;
}

.tl-cat-signal {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.tl-category-row.is-green .tl-cat-signal {
  background-color: #64b20e;
  box-shadow: 0 0 8px rgba(100, 178, 14, 0.85);
}

.tl-category-row.is-yellow .tl-cat-signal {
  background-color: #f7ca18;
  box-shadow: 0 0 8px rgba(247, 202, 24, 0.85);
}

.tl-category-row.is-red .tl-cat-signal {
  background-color: #e43e2b;
  box-shadow: 0 0 8px rgba(228, 62, 43, 0.85);
}

.tl-cat-info {
  flex: 1;
  min-width: 0;
}

.tl-cat-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  line-height: 1.25;
}

.tl-cat-badge {
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.75);
}

.tl-category-row.is-green .tl-cat-badge {
  background: rgba(100, 178, 14, 0.2);
  color: #8ce329;
}

.tl-category-row.is-yellow .tl-cat-badge {
  background: rgba(247, 202, 24, 0.2);
  color: #f7ca18;
}

.tl-category-row.is-red .tl-cat-badge {
  background: rgba(228, 62, 43, 0.2);
  color: #ff7060;
}

.tl-cat-desc {
  font-size: 0.76rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.62);
  margin-top: 2px;
}

/* Tactile Traffic-Light Toggle Switch */
.tl-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
  margin: 0 !important;
  cursor: pointer;
}

.tl-switch.is-locked {
  cursor: not-allowed;
  opacity: 0.8;
}

.tl-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.tl-slider {
  position: absolute;
  inset: 0;
  background-color: rgba(228, 62, 43, 0.35);
  border: 1px solid rgba(228, 62, 43, 0.6);
  border-radius: 999px;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.tl-category-row.is-yellow .tl-slider {
  background-color: rgba(247, 202, 24, 0.3);
  border-color: rgba(247, 202, 24, 0.6);
}

.tl-slider::before {
  content: "";
  position: absolute;
  height: 16px;
  width: 16px;
  left: 2px;
  top: 2px;
  background-color: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.tl-switch input:checked + .tl-slider {
  background-color: #64b20e;
  border-color: #64b20e;
}

.tl-switch input:checked + .tl-slider::before {
  transform: translateX(18px);
}

.manage-actions {
  margin-top: 4px;
}

@media screen and (max-width: 760px) {
  #spwk-cookie-banner,
  #spwk-cookie-banner.is-managing {
    bottom: 14px;
    left: 14px;
    right: 14px;
    width: auto;
    max-width: none;
    padding: 18px;
  }

  .cookie-btn {
    font-size: 0.72rem;
    padding: 9px 4px;
    gap: 4px;
  }
}
