/* ================================================================
   Urban Hydro Cookie Consent — Banner Styles
   Colors and radius are injected dynamically via JS from admin settings
================================================================ */

#uhcc-banner {
  position: fixed;
  z-index: 999999;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  box-shadow: 0 -4px 24px rgba(27,46,30,.12);
  transition: transform .35s ease, opacity .35s ease;
}

/* Bottom bar */
#uhcc-banner.uhcc-bar {
  bottom: 0;
  left: 0;
  right: 0;
  border-radius: 0;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* Bottom-left box */
#uhcc-banner.uhcc-box {
  bottom: 1.5rem;
  left: 1.5rem;
  width: 360px;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 8px 32px rgba(27,46,30,.15);
}

/* Hidden state */
#uhcc-banner.uhcc-hidden {
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
}

/* Text block */
.uhcc-text { flex: 1; min-width: 200px; }
.uhcc-text strong {
  display: block;
  font-size: 15px;
  margin-bottom: .3rem;
  font-weight: 600;
}
.uhcc-text p { margin: 0; font-size: 13px; opacity: .8; }
.uhcc-text a { opacity: 1; font-weight: 500; }

/* Buttons */
.uhcc-actions {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  align-items: center;
  flex-shrink: 0;
}
.uhcc-box .uhcc-actions { margin-top: 1rem; flex-direction: column; }
.uhcc-box .uhcc-actions button { width: 100%; }

.uhcc-btn {
  padding: .6rem 1.2rem;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: opacity .2s, transform .15s;
  white-space: nowrap;
  letter-spacing: .01em;
}
.uhcc-btn:hover { opacity: .88; transform: translateY(-1px); }
.uhcc-btn:active { transform: translateY(0); }

/* Settings panel */
#uhcc-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000000;
  background: #fff;
  border-top: 1px solid rgba(27,46,30,.1);
  box-shadow: 0 -8px 32px rgba(27,46,30,.12);
  padding: 2rem;
  display: none;
  font-family: 'DM Sans', system-ui, sans-serif;
}
#uhcc-panel.uhcc-open { display: block; }

.uhcc-panel-inner {
  max-width: 640px;
  margin: 0 auto;
}
.uhcc-panel-inner h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1B2E1E;
  margin: 0 0 1.2rem;
}

/* Category toggles */
.uhcc-category {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(27,46,30,.07);
}
.uhcc-category:last-of-type { border-bottom: none; }
.uhcc-cat-text h4 {
  font-size: .9rem;
  font-weight: 600;
  color: #1B2E1E;
  margin: 0 0 .2rem;
}
.uhcc-cat-text p {
  font-size: .8rem;
  color: #5C6B5E;
  margin: 0;
  line-height: 1.6;
}

/* Toggle switch */
.uhcc-toggle {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 24px;
}
.uhcc-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.uhcc-toggle-slider {
  position: absolute;
  inset: 0;
  background: #D4E8D8;
  border-radius: 100px;
  cursor: pointer;
  transition: background .25s;
}
.uhcc-toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .25s;
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.uhcc-toggle input:checked + .uhcc-toggle-slider { background: #1B2E1E; }
.uhcc-toggle input:checked + .uhcc-toggle-slider::before { transform: translateX(20px); }

/* Necessary badge */
.uhcc-necessary {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #7AAE87;
  padding: .25rem .6rem;
  background: #D4E8D8;
  border-radius: 100px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Panel actions */
.uhcc-panel-actions {
  display: flex;
  gap: .75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

/* Overlay */
#uhcc-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(27,46,30,.3);
  z-index: 999998;
  backdrop-filter: blur(2px);
}
#uhcc-overlay.uhcc-open { display: block; }

/* Mobile */
@media (max-width: 640px) {
  #uhcc-banner.uhcc-bar {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.25rem 1.25rem 1.5rem;
  }
  .uhcc-actions { width: 100%; flex-direction: column; }
  .uhcc-actions button { width: 100%; justify-content: center; }
  #uhcc-banner.uhcc-box { left: 0; right: 0; bottom: 0; width: 100%; border-radius: 16px 16px 0 0; }
  #uhcc-panel { padding: 1.5rem 1.25rem; }
  .uhcc-panel-actions { flex-direction: column; }
  .uhcc-panel-actions button { width: 100%; }
}
