/**
 * Cookie Consent (evcookieconsent) - banner styles
 * Uses CSS variables --evcc-accent / --evcc-bg / --evcc-text set inline.
 */

.evcc,
.evcc * {
  box-sizing: border-box;
}

/* [hidden] must win over the display rules below */
.evcc[hidden],
.evcc-float[hidden],
.evcc__settings[hidden],
.evcc [hidden] {
  display: none !important;
}

.evcc {
  position: fixed;
  z-index: 999999;
  background: var(--evcc-bg, #fff);
  color: var(--evcc-text, #1f2937);
  font-size: 14px;
  line-height: 1.5;
  box-shadow: 0 -6px 30px rgba(0, 0, 0, .18);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .25s ease, transform .25s ease;
}

.evcc--visible {
  opacity: 1;
  transform: translateY(0);
}

.evcc__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.evcc__title {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 600;
}

.evcc__text {
  margin: 0;
  opacity: .9;
}

.evcc__text p {
  margin: 0;
}

.evcc__link {
  display: inline-block;
  margin-top: 8px;
  color: var(--evcc-accent, #2563eb);
  text-decoration: underline;
  font-size: 13px;
}

/* ---------- settings panel ---------- */

.evcc__settings {
  display: grid;
  gap: 10px;
  border-top: 1px solid rgba(0, 0, 0, .08);
  padding-top: 12px;
}

.evcc__opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.evcc__opt-text strong {
  display: block;
  font-weight: 600;
}

.evcc__opt-text em {
  display: block;
  font-style: normal;
  font-size: 12.5px;
  opacity: .72;
}

/* ---------- switch ---------- */

.evcc__switch {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .18);
  cursor: pointer;
  transition: background .2s ease;
}

.evcc__switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.evcc__slider {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s ease;
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
}

.evcc__switch input:checked + .evcc__slider {
  transform: translateX(20px);
}

.evcc__switch input:checked ~ .evcc__slider {
  transform: translateX(20px);
}

.evcc__switch:has(input:checked) {
  background: var(--evcc-accent, #2563eb);
}

.evcc__switch--on {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: var(--evcc-accent, #2563eb);
  position: relative;
  display: inline-block;
  opacity: .65;
}

.evcc__switch--on::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
}

/* ---------- actions ---------- */

.evcc__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.evcc__btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: filter .15s ease, background .15s ease;
}

.evcc__btn--primary {
  background: var(--evcc-accent, #2563eb);
  color: #fff;
}

.evcc__btn--primary:hover {
  filter: brightness(1.08);
}

.evcc__btn--ghost {
  background: transparent;
  color: inherit;
  border-color: rgba(0, 0, 0, .22);
}

.evcc__btn--ghost:hover {
  background: rgba(0, 0, 0, .05);
}

/* ---------- positions ---------- */

.evcc--bottom {
  left: 0;
  right: 0;
  bottom: 0;
}

.evcc--bottom-left,
.evcc--bottom-right {
  bottom: 18px;
  width: min(420px, calc(100vw - 32px));
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .22);
}

.evcc--bottom-left { left: 18px; }
.evcc--bottom-right { right: 18px; }

.evcc--bottom-left .evcc__actions,
.evcc--bottom-right .evcc__actions,
.evcc--center .evcc__actions {
  justify-content: stretch;
}

.evcc--bottom-left .evcc__btn,
.evcc--bottom-right .evcc__btn,
.evcc--center .evcc__btn {
  flex: 1 1 auto;
}

.evcc--center {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -46%);
  width: min(560px, calc(100vw - 32px));
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}

.evcc--center.evcc--visible {
  transform: translate(-50%, -50%);
}

/* ---------- floating settings button ---------- */

.evcc-float {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 999998;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: var(--evcc-accent, #2563eb);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
}

.evcc-float:hover {
  filter: brightness(1.08);
}

/* ---------- scroll lock for centered modal ---------- */

.evcc-locked .evcc--center {
  overscroll-behavior: contain;
}

/* ---------- mobile ---------- */

@media (max-width: 600px) {
  .evcc__inner {
    padding: 16px;
  }

  .evcc__actions {
    justify-content: stretch;
  }

  .evcc__btn {
    flex: 1 1 auto;
    text-align: center;
  }

  .evcc--bottom-left,
  .evcc--bottom-right {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
  }
}
