/*
 * Shell styles on top of the EcommerceBackend Sneat build (ADR 0020).
 * Load order: core.css -> demo.css -> loader.css -> theme-tokens.css -> backoffice.css -> shell.css.
 * Only tokens and Sneat/Bootstrap custom properties; no colour literals except the loader overlay tint.
 */

/* ---------- Brand (company logo and name) ---------- */
.igv-brand-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: var(--app-radius);
}

.igv-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--app-radius);
  background: var(--bs-primary);
  color: var(--app-on-primary);
  font-weight: 700;
  font-size: 1rem;
}

/* demo.css lowercases the brand; a company name keeps its own spelling and long names are cut. */
.app-brand-text.demo.igv-brand-text {
  text-transform: none;
  font-size: 1.125rem;
  letter-spacing: 0;
  max-width: 10.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* A company without a logo shows its initials (ADR 0023), never the product logo. */
.igv-brand-mark { font-size: 0.875rem; letter-spacing: 0.02em; }

/* ---------- Product brand: footer credit, loader, light/dark artwork ---------- */
.igv-product-credit { display: inline-flex; align-items: center; gap: 0.375rem; }
.igv-loader-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
  color: var(--bs-heading-color);
  font-weight: 700;
  letter-spacing: -0.01em;
}
[data-bs-theme="dark"] .igv-only-light,
[data-bs-theme="light"] .igv-only-dark,
:root:not([data-bs-theme]) .igv-only-dark { display: none !important; }

/* ---------- Sign-in (Sneat auth-login-cover) ---------- */
.igv-auth { position: relative; }
.igv-auth-brand { position: absolute; top: 2rem; left: 2rem; z-index: 2; line-height: 0; }
.igv-auth-cover {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 20%, rgba(var(--bs-primary-rgb), 0.14), transparent 55%),
    radial-gradient(circle at 85% 80%, rgba(var(--app-brand-lime-rgb), 0.16), transparent 50%),
    var(--app-bg, var(--bs-body-bg));
}
.igv-auth-cover-inner { max-width: 34rem; }
/* Sneat sets .light-style .authentication-wrapper .authentication-bg to white; the paper token follows the theme. */
.igv-auth.authentication-wrapper .authentication-bg { min-height: 100vh; background: var(--bs-paper-bg); }
@media (max-width: 991.98px) {
  .igv-auth-brand { left: 50%; transform: translateX(-50%); }
}

/* ---------- Sidebar ---------- */
.bo-menu-planned .menu-link {
  cursor: default;
  opacity: 0.55;
}
.bo-menu-planned .badge { font-size: 0.625rem; }

/* ---------- Navbar ---------- */
.igv-search { min-width: 0; flex: 1 1 auto; }
.igv-search .form-control { min-width: 0; }
@media (min-width: 768px) {
  .igv-search { flex: 0 1 auto; }
  .igv-search .form-control { min-width: 14rem; }
}
.min-w-0 { min-width: 0; }
/* Ecommerce's floating toggler duplicates the navbar button on small screens. */
.menu-mobile-toggler { display: none !important; }
.igv-kbd {
  padding: 0.125rem 0.375rem;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--app-radius);
  background: transparent;
  color: var(--bs-secondary-color);
  font-size: 0.6875rem;
  font-family: var(--app-font);
  white-space: nowrap;
}
.igv-shop-btn { min-height: 2.25rem; }

/* ---------- Page progress bar (shown while the next page loads) ---------- */
.igv-progress {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 2000;
  height: 3px;
  width: 0;
  background: var(--bs-primary);
  box-shadow: 0 0 8px rgba(var(--bs-primary-rgb), 0.6);
  opacity: 0;
  transition: width 0.4s ease, opacity 0.2s ease;
  pointer-events: none;
}
.igv-progress.is-active { opacity: 1; width: 75%; transition: width 8s cubic-bezier(0.1, 0.6, 0.2, 1), opacity 0.1s; }

/* ---------- Content fades in, so navigation feels smooth rather than a hard swap ---------- */
@media (prefers-reduced-motion: no-preference) {
  #main { animation: igv-fade-in 0.18s ease-out both; }
}
/* Opacity only: a transform (even a finished one) would make #main the containing block of fixed
   elements, and offcanvas panels and modals would open inside the content instead of the window. */
@keyframes igv-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- Loader in dark mode ---------- */
[data-bs-theme="dark"] .global-loader-blur { background-color: rgba(0, 0, 0, 0.25); }

/* ---------- Dashboard quick actions ---------- */
.igv-quick {
  display: flex;
  align-items: center;
  gap: var(--app-space-3);
  height: 100%;
  padding: var(--app-space-3);
  border: 1px solid var(--bs-border-color);
  border-radius: var(--app-radius-lg);
  color: var(--bs-heading-color);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.igv-quick:hover,
.igv-quick:focus-visible {
  border-color: var(--bs-primary);
  box-shadow: var(--app-shadow);
  color: var(--bs-heading-color);
}
@media (prefers-reduced-motion: no-preference) {
  .igv-quick:hover { transform: translateY(-2px); }
}
.igv-quick > i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 2.5rem;
  height: 2.5rem;
  border-radius: var(--app-radius);
  background: rgba(var(--bs-primary-rgb), 0.12);
  color: var(--bs-primary);
  font-size: 1.375rem;
}
.igv-quick span { display: flex; flex-direction: column; }
.igv-quick small { color: var(--bs-secondary-color); }
