/* Codeneo color mode. Loaded outside the compiled theme bundle so mode changes
   remain available even while PrestaShop rebuilds its asset cache. */
.codeneo-theme-toggle {
  align-items: center;
  background: transparent;
  border: 1px solid var(--codeneo-border);
  border-radius: 50%;
  color: var(--codeneo-ink);
  display: inline-flex;
  height: 2.7rem;
  justify-content: center;
  padding: 0;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
  width: 2.7rem;
}

.codeneo-theme-toggle:hover {
  background: var(--codeneo-cloud);
  border-color: var(--codeneo-action-hover);
  color: var(--codeneo-action-hover);
  transform: translateY(-1px);
}

.codeneo-theme-toggle:focus-visible {
  box-shadow: 0 0 0 0.24rem var(--codeneo-action-focus);
  outline: 0;
}

.codeneo-theme-toggle .material-icons { font-size: 1.2rem; }

/* Editorial product descriptions use the same vertical rhythm in both modes. */
.codeneo-product-description-section__content :is(h2, h3, h4) { color: var(--codeneo-ink); font-weight: 800; letter-spacing: -0.025em; }
.codeneo-product-description-section__content h2 { font-size: clamp(1.35rem, 2.1vw, 1.85rem); line-height: 1.2; margin: clamp(2.8rem, 5vw, 4.25rem) 0 clamp(1.15rem, 2vw, 1.45rem); }
.codeneo-product-description-section__content h3 { font-size: clamp(1.05rem, 1.65vw, 1.28rem); line-height: 1.35; margin: clamp(1.85rem, 3.5vw, 2.75rem) 0 clamp(0.85rem, 1.5vw, 1.05rem); }
.codeneo-product-description-section__content h4 { font-size: 1rem; line-height: 1.4; margin: 1.6rem 0 0.7rem; }
.codeneo-product-description-section__content :is(p, ul, ol) { margin-bottom: 1.35rem; }

html[data-codeneo-theme='dark'] {
  color-scheme: dark;
  --codeneo-ink: #f2f8fc;
  --codeneo-ink-deep: #07131e;
  --codeneo-brand: #20cfff;
  --codeneo-brand-strong: #00afd3;
  --codeneo-mint: #54dffb;
  --codeneo-action: #1c587b;
  --codeneo-action-hover: #0094ab;
  --codeneo-action-focus: rgba(32, 207, 255, 0.42);
  --codeneo-sand: #0a1722;
  --codeneo-cloud: #112435;
  --codeneo-white: #f5fbff;
  --codeneo-text: #d5e4ee;
  --codeneo-muted: #9ab1c1;
  --codeneo-border: #29485d;
  --codeneo-shadow: 0 1.25rem 3.75rem rgba(0, 0, 0, 0.34);
  --codeneo-link: #54dffb;
  --codeneo-link-hover: #20cfff;
  --bs-body-color: #d5e4ee;
  --bs-body-bg: #09141e;
  --bs-border-color: #29485d;
  --bs-secondary-bg: #112435;
  --bs-tertiary-bg: #112435;
  --bs-secondary-color: #9ab1c1;
}

html[data-codeneo-theme='dark'] body,
html[data-codeneo-theme='dark'] .page,
html[data-codeneo-theme='dark'] .columns-container { background: #09141e; }

html[data-codeneo-theme='dark'] .header,
html[data-codeneo-theme='dark'] .codeneo-header__main,
html[data-codeneo-theme='dark'] .codeneo-header__navigation {
  background: #0c1924;
  border-color: var(--codeneo-border);
}

html[data-codeneo-theme='dark'] .codeneo-header__main .navbar-brand .logo {
  filter: brightness(0) invert(1);
}

html[data-codeneo-theme='dark'] .codeneo-header__navigation .top-menu > li > .dropdown-item,
html[data-codeneo-theme='dark'] .codeneo-header__navigation .top-menu > li > a,
html[data-codeneo-theme='dark'] .codeneo-header__main .header-block__action-btn { color: var(--codeneo-text); }

html[data-codeneo-theme='dark'] .codeneo-header__main .ps-searchbar__input,
html[data-codeneo-theme='dark'] .form-control,
html[data-codeneo-theme='dark'] .form-select,
html[data-codeneo-theme='dark'] textarea {
  background: #112435;
  border-color: var(--codeneo-border);
  color: var(--codeneo-text);
}

html[data-codeneo-theme='dark'] .codeneo-header__main .ps-searchbar__input::placeholder,
html[data-codeneo-theme='dark'] .form-control::placeholder { color: #88a3b5; }

html[data-codeneo-theme='dark'] :is(.form-control, .form-select, textarea.form-control):focus,
html[data-codeneo-theme='dark'] :is(.form-control, .form-select, textarea.form-control):focus-visible,
html[data-codeneo-theme='dark'] .codeneo-header__main .ps-searchbar__input:focus {
  background-color: #0e1d2a;
  border-color: var(--codeneo-field-focus-border, var(--codeneo-brand));
  box-shadow: var(--codeneo-field-focus-ring, 0 0 0 0.22rem rgba(4, 196, 253, 0.18));
}

html[data-codeneo-theme='dark'] .breadcrumb__wrapper { background: #0e1d2a; border-color: var(--codeneo-border); }
html[data-codeneo-theme='dark'] .breadcrumb-item:last-child { background: #132738; }

html[data-codeneo-theme='dark'] .codeneo-hero { background: radial-gradient(circle at 82% 45%, rgba(32, 207, 255, 0.14), transparent 28rem), var(--codeneo-sand); }
html[data-codeneo-theme='dark'] .codeneo-home-hooks { background: radial-gradient(circle at 94% 14%, rgba(32, 207, 255, 0.2), transparent 25rem), linear-gradient(135deg, #102334, #0b1823 76%) !important; }
html[data-codeneo-theme='dark'] .codeneo-solutions { background: radial-gradient(circle at 88% 18%, rgba(32, 207, 255, 0.2), transparent 26rem), linear-gradient(145deg, #0c1924 6%, #102536 100%) !important; }
html[data-codeneo-theme='dark'] .codeneo-about { background: radial-gradient(circle at 8% 6%, rgba(32, 207, 255, 0.15), transparent 28rem), linear-gradient(180deg, #0b1823 8%, #102536 100%) !important; }
html[data-codeneo-theme='dark'] .codeneo-contact-panel { background: linear-gradient(118deg, #0b2130, #123f5b); }
html[data-codeneo-theme='dark'] .codeneo-contact-panel h2 { color: #f5fbff; }

html[data-codeneo-theme='dark'] .codeneo-feature-card,
html[data-codeneo-theme='dark'] .codeneo-about__copy,
html[data-codeneo-theme='dark'] .codeneo-new-products__card,
html[data-codeneo-theme='dark'] .codeneo-products-grid .product-miniature__inner,
html[data-codeneo-theme='dark'] .page-product .product__container,
html[data-codeneo-theme='dark'] .page-order .checkout-grid__content,
html[data-codeneo-theme='dark'] .page-cart .cart__item {
  background: #102131;
  border-color: var(--codeneo-border);
  box-shadow: 0 0.75rem 1.8rem rgba(0, 0, 0, 0.22);
}

html[data-codeneo-theme='dark'] .codeneo-feature-card:hover,
html[data-codeneo-theme='dark'] .codeneo-products-grid .product-miniature__inner:hover { background: #142a3c; }

html[data-codeneo-theme='dark'] .codeneo-new-products__media { background: #dfeaf0; }
html[data-codeneo-theme='dark'] .codeneo-products-grid .product-miniature__top { background: linear-gradient(145deg, #142a3c, #102131); }
html[data-codeneo-theme='dark'] .codeneo-products-grid .product-miniature__image-link,
html[data-codeneo-theme='dark'] .page-product .product__carousel,
html[data-codeneo-theme='dark'] .page-product .product__thumbnail-image { background: #dfeaf0; }
html[data-codeneo-theme='dark'] .page-product .product__left,
html[data-codeneo-theme='dark'] .codeneo-product-status,
html[data-codeneo-theme='dark'] .codeneo-product-value__card,
html[data-codeneo-theme='dark'] .page-order .checkout-grid__aside-wrapper,
html[data-codeneo-theme='dark'] .page-cart .product-line__img { background: #112435; }

html[data-codeneo-theme='dark'] .codeneo-product-showcase__media { background: radial-gradient(circle at 50% 42%, rgba(32, 207, 255, 0.24), transparent 48%), #102536; }
html[data-codeneo-theme='dark'] .codeneo-product-value__heading,
html[data-codeneo-theme='dark'] .codeneo-product-showcase,
html[data-codeneo-theme='dark'] .page-order .checkout-steps,
html[data-codeneo-theme='dark'] .codeneo-footer,
html[data-codeneo-theme='dark'] .codeneo-footer__before { background: #07131e; }

html[data-codeneo-theme='dark'] :is(.codeneo-product-showcase, .codeneo-product-value__heading, .codeneo-footer) :is(h1, h2, h3, h4, strong, a) { color: #f5fbff; }
html[data-codeneo-theme='dark'] .codeneo-product-showcase .product__price { color: #f5fbff; }

html[data-codeneo-theme='dark'] .codeneo-product-tabs {
  background: linear-gradient(165deg, #0c1924 0%, #102536 55%, #0a1722 100%);
  border-color: var(--codeneo-border);
}
html[data-codeneo-theme='dark'] .codeneo-product-tabs__nav {
  background: #112435;
  border-color: var(--codeneo-border);
  box-shadow: 0 0.55rem 1.35rem rgba(0, 0, 0, 0.22);
}
html[data-codeneo-theme='dark'] .codeneo-product-tabs__nav .nav-link { color: #91aabb; }
html[data-codeneo-theme='dark'] .codeneo-product-tabs__nav .nav-link:hover {
  background: #142a3c;
  border-color: rgba(32, 207, 255, 0.28);
  color: #f5fbff;
}
html[data-codeneo-theme='dark'] .codeneo-product-tabs__nav .nav-link.active {
  background: linear-gradient(135deg, var(--codeneo-brand), #54dffb);
  color: var(--codeneo-ink-deep);
}
html[data-codeneo-theme='dark'] .codeneo-product-tabs__badge {
  background: rgba(245, 251, 255, 0.12);
  color: #c8e4f0;
}
html[data-codeneo-theme='dark'] .codeneo-product-tabs__nav .nav-link.active .codeneo-product-tabs__badge {
  background: rgba(7, 27, 44, 0.2);
  color: var(--codeneo-ink-deep);
}
html[data-codeneo-theme='dark'] .codeneo-product-tabs__panels {
  background: #112435;
  border-color: var(--codeneo-border);
  box-shadow: 0 0.7rem 1.75rem rgba(0, 0, 0, 0.18);
}
html[data-codeneo-theme='dark'] .codeneo-cart-customization__domain { color: #91aabb; }
html[data-codeneo-theme='dark'] .codeneo-changelog-release,
html[data-codeneo-theme='dark'] .codeneo-changelog-empty { background: #112435; border-color: var(--codeneo-border); }
html[data-codeneo-theme='dark'] .codeneo-changelog-release__version { color: #f5fbff; }

html[data-codeneo-theme='dark'] .codeneo-footer__before .ps-emailsubscription { background: linear-gradient(120deg, #07131e, #10344e) !important; }
html[data-codeneo-theme='dark'] .codeneo-footer__before .ps-emailsubscription input[type='email'] { background: #112435; border-color: #31566e; color: #f5fbff; }
html[data-codeneo-theme='dark'] .codeneo-footer__before .ps-emailsubscription .form-control::placeholder { color: #91aabb; }

html[data-codeneo-theme='dark'] .codeneo-text-link--outlined:hover { background: #142a3c; }
html[data-codeneo-theme='dark'] .codeneo-empty-cart { background: linear-gradient(135deg, #112435, #0c1924); border-color: var(--codeneo-border); }
html[data-codeneo-theme='dark'] .codeneo-error-404__header .display-1 { color: var(--codeneo-ink); }

html[data-codeneo-theme='dark'] .accordion-item,
html[data-codeneo-theme='dark'] .accordion-button,
html[data-codeneo-theme='dark'] .modal-content,
html[data-codeneo-theme='dark'] .dropdown-menu { background-color: #102131; border-color: var(--codeneo-border); color: var(--codeneo-text); }

html[data-codeneo-theme='dark'] .accordion-button:not(.collapsed) { color: var(--codeneo-ink); }
html[data-codeneo-theme='dark'] .table { --bs-table-bg: transparent; --bs-table-color: var(--codeneo-text); --bs-table-border-color: var(--codeneo-border); }

/* CMS legal documents keep readable contrast in the dark theme. */
html[data-codeneo-theme='dark'] .codeneo-legal {
  color: #d7e8f1;
}

html[data-codeneo-theme='dark'] .codeneo-legal :is(h1, h2, h3, h4, strong) {
  color: #f5fbff;
}

html[data-codeneo-theme='dark'] .codeneo-legal a {
  color: var(--codeneo-brand);
}

html[data-codeneo-theme='dark'] .codeneo-legal ol > li::marker,
html[data-codeneo-theme='dark'] .codeneo-legal ol ol > li::marker {
  color: var(--codeneo-brand);
}

@media (prefers-reduced-motion: reduce) {
  .codeneo-theme-toggle { transition: none; }
}
