/**
 * Cookie consent banner styled for ismatdecor.ru.
 *
 * Palette, font and radii mirror assets/css/custom-styles.css of the
 * storefront theme: Roboto, #a89d8b / #948074, 10px corners.
 */

.idcc-banner[hidden],
.idcc-settings[hidden],
.idcc-preferences[hidden],
.idcc-status[hidden] {
  display: none !important;
}

.idcc-banner {
  --idcc-ink: #404041;
  --idcc-muted: #6d6e71;
  --idcc-accent: #a89d8b;
  --idcc-accent-hover: #948074;
  --idcc-border: #e3e3e3;
  --idcc-surface: #ffffff;
  --idcc-soft: #f8f8f8;
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 2147483000;
  box-sizing: border-box;
  max-height: calc(var(--idcc-vh, 100vh) - 32px);
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--idcc-border);
  border-radius: 10px;
  background: var(--idcc-surface);
  box-shadow: 0 12px 44px rgba(64, 64, 65, 0.18);
  color: var(--idcc-ink);
  font-family: "Roboto", sans-serif;
  font-size: 15px;
  font-weight: 300;
  letter-spacing: 0.2px;
  line-height: 1.5;
}

.idcc-title {
  margin: 0 36px 8px 0;
  color: var(--idcc-ink);
  font-size: clamp(19px, 2vw, 22px);
  font-weight: 500;
  line-height: 1.25;
}

.idcc-title:focus {
  outline: none;
}

.idcc-description,
.idcc-policy {
  margin: 0 0 12px;
  color: var(--idcc-muted);
}

.idcc-policy a {
  color: var(--idcc-accent-hover);
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.idcc-policy a:hover {
  color: var(--idcc-ink);
}

.idcc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.idcc-button {
  display: inline-flex;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
  transition: 0.2s ease-in-out all;
}

.idcc-banner .idcc-button--primary {
  border-color: var(--idcc-accent);
  background-color: var(--idcc-accent);
  color: #ffffff;
}

.idcc-banner .idcc-button--primary:hover {
  border-color: var(--idcc-accent-hover);
  background-color: var(--idcc-accent-hover);
  color: #ffffff;
}

.idcc-banner .idcc-button--reject {
  border-color: var(--idcc-border);
  background-color: #ffffff;
  color: var(--idcc-ink);
}

.idcc-banner .idcc-button--reject:hover {
  border-color: #d1d1d1;
  background-color: var(--idcc-soft);
}

.idcc-banner .idcc-button--text {
  padding-right: 8px;
  padding-left: 8px;
  background: transparent;
  color: var(--idcc-accent-hover);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.idcc-banner .idcc-button--text:hover {
  color: var(--idcc-ink);
}

.idcc-button:focus-visible,
.idcc-close:focus-visible,
.idcc-settings:focus-visible,
.idcc-option input:focus-visible {
  outline: 3px solid rgba(168, 157, 139, 0.55);
  outline-offset: 3px;
}

.idcc-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--idcc-ink);
  cursor: pointer;
  font-family: inherit;
  font-size: 26px;
  line-height: 1;
}

.idcc-close:hover {
  background: var(--idcc-soft);
}

.idcc-preferences {
  margin-top: 20px;
  padding: 18px;
  border-radius: 10px;
  background: var(--idcc-soft);
}

.idcc-preferences fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.idcc-preferences legend {
  margin: 0 0 14px;
  color: var(--idcc-ink);
  font-size: 17px;
  font-weight: 500;
}

.idcc-option {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-top: 1px solid var(--idcc-border);
  cursor: pointer;
}

.idcc-option input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--idcc-accent);
}

.idcc-option strong,
.idcc-option small {
  display: block;
}

.idcc-option strong {
  margin-bottom: 2px;
  color: var(--idcc-ink);
  font-weight: 500;
}

.idcc-option small {
  color: var(--idcc-muted);
  font-size: 13px;
  line-height: 1.4;
}

.idcc-status {
  margin: 12px 0 0;
  color: #b91c1c;
  font-weight: 400;
}

.idcc-preferences > .idcc-button {
  margin-top: 16px;
}

body .idcc-settings {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 2147482999;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid var(--idcc-border, #e3e3e3);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 5px 20px rgba(64, 64, 65, 0.12);
  color: #404041;
  cursor: pointer;
  font-family: "Roboto", sans-serif;
  font-size: 12px;
  font-weight: 400;
  transition: 0.2s ease-in-out all;
}

body .idcc-settings:hover {
  border-color: var(--idcc-accent, #a89d8b);
  color: var(--idcc-accent-hover, #948074);
}

.idcc-settings__icon {
  display: none;
  flex: 0 0 auto;
}

@media (min-width: 1024px) {
  .idcc-banner {
    right: auto;
    width: min(720px, calc(100vw - 48px));
    padding: 26px;
  }
}

@media (max-width: 1023px) {
  /* The theme pins .bottom-nav (70px) to the bottom edge on phones. */
  body .idcc-settings {
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    left: 12px;
    width: 46px;
    height: 46px;
    min-height: 46px;
    padding: 0;
    border-radius: 40px;
  }

  /* Product pages add a buy-buttons row above the nav items, so .bottom-nav
     grows to ~129px. The default 80px offset would put the settings button
     right on top of "Купить в 1 клик". */
  body.single-product .idcc-settings {
    bottom: calc(141px + env(safe-area-inset-bottom, 0px));
  }

  .idcc-settings__label {
    display: none;
  }

  .idcc-settings__icon {
    display: block;
  }

  .idcc-banner {
    right: 10px;
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    left: 10px;
    max-height: calc(var(--idcc-vh, 100vh) - 100px);
    padding: 20px;
  }

  /* The settings panel is a dialog: it may cover the fixed bottom nav so the
     whole form fits one screen without an inner scrollbar. */
  .idcc-banner--prefs {
    bottom: 10px;
    max-height: calc(var(--idcc-vh, 100vh) - 20px);
  }

  /* Stacked buttons eat ~140px of height. In the settings view they shrink to
     one compact row so the whole form stays on screen. */
  .idcc-banner--prefs .idcc-actions {
    display: flex;
    gap: 6px;
    margin-top: 12px;
  }

  /* Already inside the settings panel — nothing to open. */
  .idcc-banner--prefs .idcc-button--text {
    display: none;
  }

  .idcc-banner--prefs .idcc-button {
    flex: 1 1 0;
    min-width: 0;
    min-height: 40px;
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.15;
    white-space: nowrap;
  }
}

@media (max-width: 560px) {
  .idcc-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .idcc-button {
    width: 100%;
  }

  .idcc-title {
    font-size: 18px;
  }
}

.idcc-banner--compact {
  padding: 16px;
}

.idcc-banner--compact .idcc-title {
  margin-bottom: 6px;
  font-size: 18px;
}

.idcc-banner--compact .idcc-policy {
  margin-bottom: 8px;
}

.idcc-banner--compact .idcc-actions {
  margin-top: 12px;
  gap: 8px;
}

.idcc-banner--compact .idcc-preferences {
  margin-top: 10px;
  padding: 12px;
}

.idcc-banner--compact .idcc-option {
  gap: 10px;
  padding: 6px 0;
}

.idcc-banner--compact .idcc-option small {
  font-size: 12.5px;
  line-height: 1.3;
}

.idcc-banner--compact .idcc-button {
  min-height: 42px;
  padding: 8px 16px;
}

.idcc-banner--compact .idcc-preferences > .idcc-button {
  margin-top: 10px;
}

.idcc-banner--compact.idcc-banner--prefs .idcc-description {
  display: none;
}

.idcc-banner--tiny .idcc-description {
  font-size: 14px;
}

.idcc-banner--tiny.idcc-banner--prefs .idcc-actions {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .idcc-button,
  body .idcc-settings {
    transition: none;
  }
}

@media print {
  .idcc-banner,
  .idcc-settings {
    display: none !important;
  }
}
