/* iHoster24 Cookie Consent Manager */
.ih-cookie-banner {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 99990;
  width: min(560px, calc(100vw - 2rem));
  max-height: min(70vh, 420px);
  overflow: auto;
  background: #fff;
  color: #1a1a1a;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14);
  font-family: inherit;
}

html[data-theme="dark"] .ih-cookie-banner,
[data-bs-theme="dark"] .ih-cookie-banner {
  background: #1c1f26;
  color: #f2f4f7;
  border-color: rgba(255, 255, 255, 0.12);
}

.ih-cookie-banner__inner {
  padding: 1rem 1.1rem 1.1rem;
}

.ih-cookie-banner__title {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 650;
}

.ih-cookie-banner__copy {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: inherit;
  opacity: 0.9;
}

.ih-cookie-banner__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 0 0.9rem;
  font-size: 0.85rem;
}

.ih-cookie-banner__links a {
  color: inherit;
  text-decoration: none;
  opacity: 0.85;
  transition: color 0.15s ease, opacity 0.15s ease;
}

.ih-cookie-banner__links a:hover {
  color: #2563eb;
  opacity: 1;
  text-decoration: none;
}

.ih-cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ih-cookie-btn {
  appearance: none;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.55rem 0.9rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 2.5rem;
}

.ih-cookie-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.ih-cookie-btn--primary {
  background: #1d4ed8;
  color: #fff;
}

.ih-cookie-btn--ghost {
  background: transparent;
  border-color: rgba(0, 0, 0, 0.22);
  color: inherit;
}

html[data-theme="dark"] .ih-cookie-btn--ghost,
[data-bs-theme="dark"] .ih-cookie-btn--ghost {
  border-color: rgba(255, 255, 255, 0.28);
}

.ih-cookie-panel {
  position: fixed;
  inset: 0;
  z-index: 99995;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.ih-cookie-panel__dialog {
  width: min(480px, 100%);
  background: #fff;
  color: #1a1a1a;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}

html[data-theme="dark"] .ih-cookie-panel__dialog,
[data-bs-theme="dark"] .ih-cookie-panel__dialog {
  background: #1c1f26;
  color: #f2f4f7;
}

.ih-cookie-panel__dialog h2 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.ih-cookie-panel__copy {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  line-height: 1.45;
}

.ih-cookie-panel__row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
}

.ih-cookie-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

@media print {
  .ih-cookie-banner,
  .ih-cookie-panel,
  #amevia-root,
  [id^="amevia"],
  .amevia-widget {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ih-cookie-banner,
  .ih-cookie-panel {
    transition: none !important;
  }
}

/* Dedicated cookie preferences page — compact utility layout */
.ih-pref-section {
  padding-top: 1.5rem !important;
  padding-bottom: 2rem !important;
}

.ih-pref-page {
  max-width: 46rem;
}
body.legal-pref .ih-pref-page {
  max-width: none;
}

.ih-pref-page__header {
  margin-bottom: 1rem;
}

.ih-pref-page__header h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.35rem, 2.5vw, 1.6rem);
  font-weight: 700;
  line-height: 1.2;
}

.ih-pref-page__header > p {
  margin: 0 0 0.55rem;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--color-text-secondary, #555);
}

.ih-pref-page__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  font-size: 0.85rem;
}

.ih-pref-form {
  display: grid;
  gap: 0.55rem;
}

.ih-pref-card {
  margin: 0;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--color-border-light, rgba(0, 0, 0, 0.12));
  border-radius: 8px;
}

.ih-pref-card--locked {
  background: var(--color-surface-muted, rgba(0, 0, 0, 0.03));
}

.ih-pref-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.2rem;
}

.ih-pref-card__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 650;
}

.ih-pref-card__desc {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--color-text-secondary, #555);
}

.ih-pref-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 650;
  color: var(--color-text-secondary, #555);
  background: rgba(0, 0, 0, 0.06);
  white-space: nowrap;
}

.ih-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  user-select: none;
}

.ih-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.ih-switch__ui {
  position: relative;
  width: 2.4rem;
  height: 1.35rem;
  border-radius: 999px;
  background: #c5cad3;
  transition: background-color 0.15s ease;
  flex-shrink: 0;
}

.ih-switch__ui::after {
  content: "";
  position: absolute;
  top: 0.15rem;
  left: 0.15rem;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease;
}

.ih-switch input:checked + .ih-switch__ui {
  background: #1d4ed8;
}

.ih-switch input:checked + .ih-switch__ui::after {
  transform: translateX(1.05rem);
}

.ih-switch input:focus-visible + .ih-switch__ui {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.ih-switch__label {
  font-size: 0.8rem;
  font-weight: 650;
  min-width: 1.5rem;
}

.ih-pref-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.25rem;
}

.ih-pref-actions .btn {
  padding: 0.45rem 0.85rem;
  font-size: 0.9rem;
  min-height: 2.25rem;
}

.ih-pref-status {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--color-text-secondary, #555);
}

.ih-pref-toast {
  position: fixed;
  inset: 0;
  z-index: 99996;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.45);
}

.ih-pref-toast__dialog {
  width: min(22rem, 100%);
  padding: 1.35rem 1.25rem 1.2rem;
  border-radius: 12px;
  background: #fff;
  color: #1a1a1a;
  text-align: center;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
}

.ih-pref-toast__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  font-size: 1.15rem;
  font-weight: 700;
}

.ih-pref-toast__dialog h2 {
  margin: 0 0 0.45rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.ih-pref-toast__body {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #444;
}

.ih-pref-toast__hint {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  color: #6b7280;
}

.ih-pref-toast__dialog .btn {
  min-width: 8rem;
}

html[data-theme="dark"] .ih-pref-toast__dialog {
  background: #1c1f26;
  color: #f2f4f7;
}

html[data-theme="dark"] .ih-pref-toast__body {
  color: #c5cad3;
}

html[data-theme="dark"] .ih-pref-toast__hint {
  color: #9aa3b2;
}

html[data-theme="dark"] .ih-pref-toast__icon {
  background: rgba(74, 158, 255, 0.16);
  color: #4a9eff;
}

html[data-theme="dark"] .ih-pref-card {
  border-color: rgba(255, 255, 255, 0.14);
}

html[data-theme="dark"] .ih-pref-card--locked {
  background: rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .ih-pref-page__header > p,
html[data-theme="dark"] .ih-pref-card__desc,
html[data-theme="dark"] .ih-pref-status {
  color: #b8c0cc;
}

html[data-theme="dark"] .ih-pref-badge {
  background: rgba(255, 255, 255, 0.08);
  color: #c5cad3;
}

html[data-theme="dark"] .ih-switch__ui {
  background: #4b5563;
}
