/* EasyWeb cookie consent — layer 1 (base, theme-independent).
   Layer 2: #ew-consent-site-theme from CMS Cookies tab (privacy.json).
   Layer 3: theme assets/css/custom.css (.ew-consent-* overrides). */
.ew-consent-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2147483647;
  margin: 0;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.12);
}

.ew-consent-bar[hidden] {
  display: none !important;
}

.ew-consent-text a.ew-consent-privacy-link {
  color: inherit;
  text-decoration: underline;
}

.ew-consent-actions .btn {
  white-space: nowrap;
  border-width: 1px;
  border-style: solid;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.ew-consent-bar .ew-consent-actions .btn.ew-consent-btn-reject,
.ew-consent-bar .ew-consent-actions .btn.ew-consent-btn-settings,
.ew-consent-bar .ew-consent-actions .btn.ew-consent-btn-details {
  --bs-btn-color: inherit;
  --bs-btn-bg: transparent;
  --bs-btn-border-color: rgba(255, 255, 255, 0.4);
  --bs-btn-hover-color: inherit;
  --bs-btn-hover-bg: rgba(255, 255, 255, 0.12);
  --bs-btn-hover-border-color: rgba(255, 255, 255, 0.55);
  color: inherit !important;
  background-color: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  border-color: color-mix(in srgb, currentColor 40%, transparent) !important;
}

.ew-consent-bar .ew-consent-actions .btn.ew-consent-btn-reject:hover,
.ew-consent-bar .ew-consent-actions .btn.ew-consent-btn-settings:hover,
.ew-consent-bar .ew-consent-actions .btn.ew-consent-btn-details:hover,
.ew-consent-bar .ew-consent-actions .btn.ew-consent-btn-reject:focus-visible,
.ew-consent-bar .ew-consent-actions .btn.ew-consent-btn-settings:focus-visible,
.ew-consent-bar .ew-consent-actions .btn.ew-consent-btn-details:focus-visible {
  background-color: color-mix(in srgb, currentColor 14%, transparent) !important;
  border-color: color-mix(in srgb, currentColor 55%, transparent) !important;
  color: inherit !important;
  opacity: 1;
}

.ew-consent-bar .ew-consent-actions .btn.ew-consent-btn-accept {
  --bs-btn-bg: var(--bs-btn-bg, initial);
}

.ew-consent-open {
  cursor: pointer;
}

#ewConsentCategories {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ew-consent-toggle-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
  font-size: 0.9rem;
  color: #18181b;
  margin: 0;
}

.ew-consent-toggle-row--disabled {
  cursor: default;
  color: rgba(0, 0, 0, 0.45);
}

.ew-consent-toggle-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ew-consent-toggle-track {
  position: relative;
  display: inline-flex;
  width: 2.75rem;
  height: 1.5rem;
  flex-shrink: 0;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #e4e4e7;
  background: rgba(228, 228, 231, 0.85);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ew-consent-toggle-thumb {
  position: absolute;
  top: 50%;
  left: 0.125rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.14);
  transform: translateY(-50%);
  transition: transform 0.15s ease;
}

.ew-consent-toggle-input:checked + .ew-consent-toggle-track {
  border-color: #27272a;
  background: #18181b;
}

.ew-consent-toggle-input:checked + .ew-consent-toggle-track .ew-consent-toggle-thumb {
  transform: translate(1.25rem, -50%);
}

.ew-consent-toggle-input:focus-visible + .ew-consent-toggle-track {
  outline: 2px solid rgba(0, 0, 0, 0.28);
  outline-offset: 2px;
}

.ew-consent-toggle-input:disabled + .ew-consent-toggle-track {
  opacity: 0.7;
}

.ew-consent-toggle-label {
  line-height: 1.35;
}

.ew-consent-details-modal .modal-dialog {
  max-width: 36rem;
}

.ew-consent-details-groups {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.ew-consent-detail-group {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.5rem;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.ew-consent-detail-group[open] {
  border-color: rgba(0, 0, 0, 0.12);
}

.ew-consent-detail-summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.75rem 0.875rem;
  list-style: none;
  user-select: none;
  background: #f8f9fa;
}

.ew-consent-detail-summary::-webkit-details-marker {
  display: none;
}

.ew-consent-detail-chevron {
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
  flex-shrink: 0;
  opacity: 0.65;
  margin-top: -0.1rem;
}

.ew-consent-detail-group[open] .ew-consent-detail-chevron {
  transform: rotate(45deg);
  margin-top: 0.1rem;
}

.ew-consent-detail-label {
  flex: 1 1 auto;
}

.ew-consent-detail-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.06);
  color: inherit;
}

.ew-consent-detail-body {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ew-consent-detail-card {
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 0.375rem;
  padding: 0.625rem 0.75rem;
  background: #fcfcfd;
}

.ew-consent-detail-title {
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.35;
  margin: 0 0 0.35rem;
}

.ew-consent-detail-meta {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.ew-consent-detail-row {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.35rem 0.5rem;
  align-items: start;
  font-size: 0.8rem;
  line-height: 1.4;
}

.ew-consent-detail-row dt {
  margin: 0;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.55);
}

.ew-consent-detail-row dd {
  margin: 0;
  min-width: 0;
}

.ew-consent-detail-url {
  display: block;
  padding: 0.3rem 0.45rem;
  border-radius: 0.25rem;
  background: rgba(0, 0, 0, 0.04);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  word-break: break-all;
  color: rgba(0, 0, 0, 0.72);
}

.ew-consent-detail-cookie-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.ew-consent-detail-cookie-tag {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  font-size: 0.72rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.ew-consent-detail-empty {
  margin: 0;
  padding: 0.75rem;
  font-size: 0.85rem;
  color: rgba(0, 0, 0, 0.55);
  font-style: italic;
}
