/* Keep these consent styles in sync with the wrapper styles in portal/frontend/index.php. */
.mu-cookie-consent {
  position: fixed;
  z-index: 10000;
  right: 16px;
  bottom: 16px;
  width: 29vw;
  min-width: 405px;
  max-width: 440px;
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 16px 20px;
  box-sizing: border-box;
  border: 1px solid #3c4d60;
  border-radius: 6px;
  background: #fff;
  color: #111;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
}

.mu-cookie-settings__category-header,
.mu-cookie-settings__actions,
.mu-cookie-consent__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mu-cookie-consent__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.mu-cookie-consent__title {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.mu-cookie-consent__description {
  margin: 0 0 10px;
  line-height: 1.5;
}

.mu-cookie-consent__policy {
  display: inline-block;
  margin-bottom: 12px;
}

.mu-cookie-consent__actions {
  flex-wrap: wrap;
  gap: 8px;
}

.mu-cookie-consent__button,
.mu-cookie-settings__action,
.mu-cookie-settings__close,
.mu-cookie-settings__disclosure {
  cursor: pointer;
  font: inherit;
}

.mu-cookie-consent__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 14px;
  border: 2px solid currentColor;
  border-radius: 4px;
  background: #fff;
  color: #111;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.mu-cookie-consent__button--choice {
  border-color: #111;
  background: #fff;
  color: #111;
}

.mu-cookie-consent__button--choice svg {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mu-cookie-consent__button:hover {
  border-color: #3c4d60;
  background: #e8eef3;
}

.mu-cookie-consent__button:active {
  background: #d9e3eb;
}

.mu-cookie-consent__button:focus-visible,
.mu-cookie-consent__footer-link:focus-visible,
.mu-cookie-settings__action:focus-visible,
.mu-cookie-settings__close:focus-visible,
.mu-cookie-settings__disclosure:focus-visible {
  outline: 3px dotted #00a88f;
  outline-offset: 3px;
}

.mu-cookie-consent__backdrop {
  position: fixed;
  z-index: 10001;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 24px;
  background: rgba(0, 0, 0, 0.6);
}

.mu-cookie-consent--modal {
  position: relative;
  inset: auto;
  width: min(100%, 980px);
  min-width: 0;
  max-width: 980px;
  max-height: calc(100vh - 48px);
  margin: 0;
  padding: 24px 30px;
  overflow: auto;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3);
}

.mu-cookie-consent--modal .mu-cookie-consent__title {
  font-size: 1.5rem;
}

.mu-cookie-settings__category {
  border-top: 1px solid #ddd;
}

.mu-cookie-settings__category-header {
  min-height: 60px;
}

.mu-cookie-settings__close,
.mu-cookie-settings__disclosure {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 4px;
  border: 0;
  background: transparent;
  color: #777;
  cursor: pointer;
}

.mu-cookie-settings__close {
  width: 40px;
  height: 40px;
  margin: -4px -6px 0 0;
  font-size: 28px;
}

.mu-cookie-settings__close svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.mu-cookie-settings__close:hover,
.mu-cookie-settings__disclosure:hover {
  color: #111;
}

.mu-cookie-settings__heading {
  margin: 22px 0 8px;
  font-size: 1rem;
}

.mu-cookie-settings__disclosure {
  width: 28px;
  height: 32px;
}

.mu-cookie-settings__disclosure svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.15s ease;
}

.mu-cookie-settings__disclosure[aria-expanded='true'] svg {
  transform: rotate(180deg);
}

.mu-cookie-settings__category-label {
  flex: 1 1 auto;
  font-weight: 600;
}

.mu-cookie-settings__details {
  padding: 0 48px 16px 40px;
  line-height: 1.5;
}

.mu-cookie-settings__details p {
  margin: 0;
}

.mu-cookie-settings__provider {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid #e5e5e5;
}

.mu-cookie-settings__provider-label {
  font-weight: 600;
}

.mu-cookie-settings__provider-description {
  margin: 0 0 8px 64px !important;
  color: #555;
}

.mu-cookie-settings__switch {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  cursor: pointer;
}

.mu-cookie-settings__switch--disabled {
  cursor: not-allowed;
}

.mu-cookie-settings__switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.mu-cookie-settings__switch-track {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  border-radius: 20px;
  background: #858585;
  transition: background-color 0.15s ease;
}

.mu-cookie-settings__switch-track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  content: '';
  transition: transform 0.15s ease;
}

.mu-cookie-settings__switch input:checked + .mu-cookie-settings__switch-track {
  background: #111;
}

.mu-cookie-settings__switch input:checked + .mu-cookie-settings__switch-track::after {
  transform: translateX(24px);
}

.mu-cookie-settings__switch input:disabled + .mu-cookie-settings__switch-track {
  background: #bcbcbc;
  cursor: not-allowed;
}

.mu-cookie-settings__switch input:focus-visible + .mu-cookie-settings__switch-track {
  outline: 3px dotted #00a88f;
  outline-offset: 3px;
}

.mu-cookie-settings__actions {
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid #ddd;
}

.mu-cookie-settings__action {
  padding: 12px 8px;
  border: 0;
  background: transparent;
  color: #008b75;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.mu-cookie-settings__action:hover {
  color: #005e50;
  text-decoration: underline;
}

.mu-cookie-consent__footer-link {
  margin-left: 0.75em;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  transition: color 300ms ease;
  cursor: pointer;
}

.mu-cookie-consent__footer-link:hover,
.mu-cookie-consent__footer-link:focus {
  color: #3c4d60;
}

.mu-cookie-consent__footer-fallback {
  margin: 16px;
  text-align: center;
}

@media (max-width: 575px) {
  .mu-cookie-consent {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    min-width: 0;
    max-width: none;
    padding: 14px;
  }

  .mu-cookie-consent--modal {
    width: 100%;
    max-height: calc(100vh - 24px);
    padding: 18px 16px;
  }

  .mu-cookie-consent__button {
    flex: 1 1 100%;
  }

  .mu-cookie-settings__details {
    padding-right: 8px;
    padding-left: 40px;
  }

  .mu-cookie-settings__actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .mu-cookie-settings__action {
    text-align: center;
  }
}
