/* Product catalogue layout inspired by the reference cloud storefront. */
:root {
  --hosu-cat-ink: #172236;
  --hosu-cat-muted: #6c7b90;
  --hosu-cat-blue: #1769e8;
  --hosu-cat-line: #e8edf3;
  --hosu-cat-panel: #f1f3f6;
}

/* The cart template can be rendered inside the client console shell. */
body:has(.aurora-cart-page) .aurora-console-sidebar,
body:has(.aurora-cart-page) .aurora-console-main > .aurora-page-head {
  display: none !important;
}

body:has(.aurora-cart-page) > .aurora-cart-topbar,
body:has(.aurora-cart-page) .aurora-console-topbar {
  display: none !important;
}

body:has(.aurora-cart-page) .aurora-console-main,
body:has(.aurora-cart-page) .aurora-console-content {
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Catalogue grid: left categories, right products. */
.aurora-catalog-layout {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  width: min(calc(100% - 48px), 1440px);
  margin: 0 auto;
}

.hosu-category-sidebar {
  min-height: 620px;
  padding: 24px 22px 30px;
  background: var(--hosu-cat-panel);
}

.hosu-category-sidebar h2 {
  margin: 0 0 28px;
  color: var(--hosu-cat-ink);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.hosu-category-sidebar-heading {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-align: center;
  gap: 12px;
  margin-bottom: 24px;
}

.hosu-category-sidebar-heading h2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hosu-category-heading-icon {
  width: 20px;
  height: 20px;
  color: var(--hosu-cat-blue);
  flex: 0 0 auto;
}

.hosu-category-sidebar-heading h2 {
  margin: 0;
}

.hosu-category-sidebar-heading > span {
  color: var(--hosu-cat-muted);
  font-size: 9px;
  letter-spacing: .12em;
  white-space: nowrap;
}

.hosu-category-nav {
  display: grid;
  gap: 4px;
}

.hosu-category-tree {
  display: grid;
  gap: 4px;
}

.hosu-category-first,
.hosu-category-second {
  min-width: 0;
}

.hosu-category-first-title {
  display: flex;
  align-items: baseline;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding: 4px 10px 10px;
  color: var(--hosu-cat-ink);
  font-size: 16px;
  font-weight: 700;
}

.hosu-category-first-title small {
  color: var(--hosu-cat-muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .06em;
  white-space: nowrap;
}

.hosu-category-first-toggle > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.hosu-category-first-toggle > summary::-webkit-details-marker {
  display: none;
}

.hosu-category-first-toggle > summary:hover {
  color: var(--hosu-cat-blue);
}

.hosu-category-first-toggle .hosu-category-first-title small {
  margin-left: auto;
}

.hosu-category-chevron {
  flex: 0 0 auto;
  color: var(--hosu-cat-muted);
  font-size: 12px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.hosu-category-first-toggle[open] .hosu-category-chevron {
  transform: rotate(180deg);
}

.hosu-category-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.hosu-category-link > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hosu-category-link-mark {
  flex: 0 0 auto;
  color: #9aa8bb;
  font-size: 13px;
  line-height: 1;
}

.hosu-category-link-primary {
  display: block;
  padding: 9px 10px;
  color: var(--hosu-cat-ink);
  font-size: 14px;
  line-height: 1.45;
}

.hosu-category-link-primary:hover {
  color: var(--hosu-cat-blue);
  background: rgba(255,255,255,.75);
}

.hosu-category-link-primary.is-active {
  color: var(--hosu-cat-blue);
  font-weight: 650;
  background: #fff;
  box-shadow: inset 3px 0 0 var(--hosu-cat-blue);
}

.hosu-category-second-list {
  display: grid;
  gap: 2px;
  margin: 0;
}

.hosu-category-link-secondary {
  padding: 9px 10px;
  color: var(--hosu-cat-ink);
  font-size: 14px;
  line-height: 1.5;
}

.hosu-category-link-secondary:hover,
.hosu-category-link-secondary.is-active {
  color: var(--hosu-cat-blue);
  background: rgba(255,255,255,.78);
}

.hosu-category-link-secondary.is-active {
  font-weight: 650;
  background: #fff;
  box-shadow: inset 3px 0 0 var(--hosu-cat-blue);
}

.hosu-category-third-list {
  display: grid;
  gap: 1px;
  margin: 2px 0 7px 8px;
  padding-left: 10px;
  border-left: 1px dashed #dce3ec;
}

.hosu-category-link-third {
  padding: 6px 8px;
  color: var(--hosu-cat-muted);
  font-size: 13px;
  line-height: 1.45;
}

.hosu-category-link-third small {
  flex: 0 0 auto;
  color: #9aa8bb;
  font-size: 9px;
}

.hosu-category-link-third:hover,
.hosu-category-link-third.is-active {
  color: var(--hosu-cat-blue);
  background: rgba(255,255,255,.75);
}

.hosu-category-link-third.is-active small {
  color: var(--hosu-cat-blue);
}

.hosu-category-empty {
  padding: 32px 10px;
  color: var(--hosu-cat-muted);
  font-size: 12px;
  text-align: center;
}

.aurora-catalog-main {
  min-width: 0;
  padding: 20px 0 0;
}

.hosu-catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  margin-bottom: 20px;
}

.hosu-catalog-search {
  position: relative;
}

.hosu-catalog-search input {
  width: 100%;
  height: 36px;
  padding: 0 15px 0 40px;
  color: var(--hosu-cat-ink);
  border: 0;
  border-bottom: 1px solid var(--hosu-cat-line);
  outline: 0;
  background: #f8faff;
  font: inherit;
  font-size: 12px;
}

.hosu-catalog-search::before {
  position: absolute;
  left: 14px;
  top: 10px;
  width: 12px;
  height: 12px;
  color: var(--hosu-cat-blue);
  border: 1.5px solid currentColor;
  border-radius: 50%;
  content: "";
}

.hosu-catalog-search::after {
  position: absolute;
  left: 26px;
  top: 22px;
  width: 6px;
  height: 1.5px;
  background: var(--hosu-cat-blue);
  content: "";
  transform: rotate(45deg);
  transform-origin: left center;
}

.hosu-catalog-filters {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hosu-catalog-filter-label {
  color: var(--hosu-cat-muted);
  font-size: 11px;
}

.hosu-catalog-filter {
  display: inline-flex;
  min-width: 74px;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  color: var(--hosu-cat-ink);
  border: 0;
  background: #f1f3f6;
  font-size: 12px;
  text-decoration: none;
}

.hosu-catalog-filter:hover,
.hosu-catalog-filter.is-active {
  color: #fff;
  background: var(--hosu-cat-blue);
}

/* Product description rendered from the product table is a list fragment;
   keep it tidy inside the plan row. */
.aurora-plan-description li {
  margin-left: 1.1em;
  color: var(--hosu-cat-muted);
}

.aurora-empty {
  padding: 78px 20px;
  border: 1px solid var(--hosu-cat-line);
  border-radius: 2px;
  background: #fbfcff;
  text-align: center;
}

/* API-rendered price summary (configurator page). */
.aurora-api-summary-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.aurora-api-summary-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 5px;
}

.aurora-api-summary-price strong {
  color: var(--aurora-ink, #071b45);
  font-size: 27px;
}

.aurora-api-summary-price span,
.aurora-api-summary-price small {
  color: var(--aurora-muted, #66758e);
}

.aurora-api-breakdown {
  position: relative;
}

.aurora-api-breakdown summary {
  cursor: pointer;
  color: var(--hosu-cat-blue);
  font-size: 13px;
}

.aurora-api-breakdown-list {
  position: absolute;
  z-index: 4;
  right: 0;
  top: 28px;
  width: 300px;
  max-height: 60vh;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--hosu-cat-line);
  background: #fff;
  box-shadow: 0 12px 28px rgba(30, 67, 113, .12);
}

.aurora-api-breakdown-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  padding: 6px 0;
  color: var(--hosu-cat-muted);
  font-size: 12px;
}

.aurora-api-breakdown-row strong {
  color: var(--hosu-cat-ink);
  font-weight: 500;
}

.aurora-api-breakdown-row em {
  color: var(--hosu-cat-ink);
  font-style: normal;
}

.aurora-clear-cart {
  margin: 0 0 12px;
  padding: 7px 12px;
  font-size: 12px;
}

.aurora-config-form .aurora-billing-cycle {
  margin-bottom: 14px;
}

.aurora-summary-loading,
.configoption_total.is-loading {
  opacity: .7;
}

@media (max-width: 720px) {
  .aurora-api-summary-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .aurora-api-breakdown-list {
    left: 0;
    right: auto;
    width: min(300px, calc(100vw - 52px));
  }
}

@media (max-width: 900px) {
  .aurora-catalog-layout {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 20px;
    width: min(calc(100% - 30px), 1280px);
  }

  .hosu-category-sidebar {
    padding-inline: 16px;
  }

  .hosu-category-sidebar h2 {
    font-size: 16px;
  }

  .hosu-catalog-toolbar {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .hosu-catalog-filters {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .aurora-catalog-layout {
    display: block;
    width: min(calc(100% - 24px), 1280px);
  }

  .hosu-category-sidebar {
    display: none;
  }

  .aurora-catalog-main {
    padding-top: 14px;
  }
}