/*@import url('https://early.webawesome.com/webawesome@3.0.0-beta.2/dist/styles/webawesome.css');
@import url('https://early.webawesome.com/webawesome@3.0.0-beta.2/dist/styles/themes/brutalist.css');
@import url('https://early.webawesome.com/webawesome@3.0.0-beta.2/dist/styles/color/palettes/anodized.css');
@import url('https://early.webawesome.com/webawesome@3.0.0-alpha.13/dist/styles/themes/glossy/typography.css');*/

:root, :host {
  --fa-style-family-classic: 'Font Awesome 6 Pro';
  --fa-font-solid: normal 900 1em/1 'Font Awesome 6 Pro'; 
}

@font-face {
  font-family: 'Font Awesome 6 Pro';
  font-style: normal;
  font-weight: 900;
  font-display: block;
  src: url("../webfonts/fa-solid-900.woff2") format("woff2"); 
}

.fas,
.fa-solid {
  font-weight: 900; }

:root {
  /*
  --wa-border-radius-scale: 0;
  --wa-space-scale: 1;
  --wa-border-width-scale: 3;
  */

  --wa-font-weight-semibold: 600;
  /* Override WebAwesome's surface colors for a light tinted background */
  --wa-color-surface-default: var(--wa-color-gray-95);
  --wa-color-surface-raised: white;
  --wa-color-surface-lowered: var(--wa-color-gray-80, #f1f3f4);

  --wa-color-neutral-fill-quiet: var(--wa-color-surface-default);

  --wa-color-text-inverse: #f1f2f4;

  --wa-color-icon-normal: var(--wa-color-text-quiet);
  /*--wa-color-neutral-fill-quiet: */

  scrollbar-color: var(--wa-color-neutral-fill-normal) #f1f2f4;
  --my-header-height: auto;
  --my-header-offset: 20px;

  /* Use the overridden surface system */
  --app-page-background: var(--wa-color-cyan-60);

  /* For subtle decorative panels - slightly more visible than background */
  --app-panel-base: var(--wa-color-blue-80);
}

html {
  scroll-behavior: smooth;
}

header {
  position: absolute;
  top: var(--my-header-offset);
  justify-content: center;
  padding: 0;
  background-color: var(--wa-color-neutral-fill-quiet);
  border-bottom: var(--wa-border-width-s) solid var(--wa-color-neutral-border-normal);
  border-top: var(--wa-border-width-s) solid var(--wa-color-neutral-border-normal);
  box-shadow: var(--wa-shadow-s);
  width: 100%;
  display: flex;
  pointer-events: none;
  flex-direction: column;
  gap: var(--wa-space-2xs);
}

.header-div {
  height: var(--my-header-height);
  pointer-events: auto;
  display: flex;
  gap: var(--wa-space-m);
  justify-content: space-between;
}

nav .nav-container {
  display: flex;
  flex-direction: column;
  gap: var(--wa-space-s);
  align-items: center;
}

#header-buttons {
  display: flex;
  gap: var(--wa-space-s);
  align-items: center;
}

@media (max-width: 880px) {
  #header-buttons {
    display: contents;
  }
  .header-div {
    gap: 0;
  }
}

#countdown-container {
  position: fixed;
  bottom: var(--wa-space-l);
  right: var(--wa-space-l);
  padding: var(--wa-space-s);
  width: fit-content;
  margin: 0;
  z-index: 10;
  background-color: var(--wa-color-surface-default);
  border: var(--wa-border-width-s) solid var(--wa-color-neutral-border-normal);
  box-shadow: var(--wa-shadow-s);
}

wa-page.receipt-page::part(navigation-toggle){
  display: none;
}

main > *:not(.hero-div, .fw-panel) {
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
}

wa-button.order-waiting::after {
  content: '1';
  position: absolute;
  inset-block-start: 0;
  inset-inline-end: 0;
  translate: 50% -50%;
  pointer-events: none;
  color: var(--wa-color-on-loud, var(--wa-color-brand-on-loud));
  background-color: var(--wa-color-danger-fill-loud);
  border-radius: var(--wa-border-radius-pill);
  padding: 0.375em 0.625em;
  font-size: max(var(--wa-font-size-2xs), 0.75em);
  font-weight: var(--wa-font-weight-semibold);
  line-height: 1;
  border-width: var(--wa-border-width-s);
  border-color: var(--wa-color-surface-default);
  border-style: solid;
}

/* Cart badge on Order button */
wa-button.order-button.has-cart-items {
  position: relative;
}

wa-button.order-button::part(label)::before {
  content: "Order";
}

wa-button.order-button.has-cart-items::part(label)::before {
  content: "Cart";
}

wa-button.order-button.has-cart-items::after {
  content: attr(data-cart-count);
  position: absolute;
  inset-block-start: 0;
  inset-inline-end: 0;
  translate: 50% -50%;
  pointer-events: none;
  color: var(--wa-color-on-loud, var(--wa-color-brand-on-loud));
  background-color: var(--wa-color-danger-fill-loud);
  border-radius: var(--wa-border-radius-pill);
  padding: 0.375em 0.625em;
  font-size: max(var(--wa-font-size-2xs), 0.75em);
  font-weight: var(--wa-font-weight-semibold);
  line-height: 1;
  border-width: var(--wa-border-width-s);
  border-color: var(--wa-color-surface-default);
  border-style: solid;
}

/* Landing Page Blocks */

main > * {
  margin: var(--wa-space-3xl) 0;
}

@media (max-width: 680px) {
  main > * {
    margin: var(--wa-space-xl) 0;
  }
}

.under-block {
    color: var(--wa-color-text-inverse);
    padding: 0 var(--wa-space-3xl);
}

.under-block.wide {
  padding: 0;
}

/*Default size; minimal*/
.hero-panel-text {
  padding: var(--wa-space-2xl);
}

@media (max-width: 879.9px) or (max-height: 600px) {
  .under-block, .under-block.wide {
    padding: 0 var(--wa-space-s);
  }
}

@media (max-width: 879.9px) {
  .hero-div .hero-panel-text {
    padding: var(--wa-space-2xl);
    width:100%;
  }
}

@media (min-width: 680.1px) and (max-width: 879.9px) {
  .header-logo-container {
    margin-left: var(--wa-space-m);
  }
}

@media (min-width: 880px) and (min-height: 800px) {
  .hero-div .hero-panel-text {
    width: 50%;
    padding-right: calc(var(--wa-space-4xl) *2);
  }
}

@media (min-width: 680px) {
  nav {
    display: none;
  }
}



.step-grid {
  display: grid;
  justify-items: center;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--wa-space-xl);
  margin-top: var(--wa-space-3xl);
}

.step-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  --step-icon-multiplier: 3;
  font-size: calc(var(--step-icon-multiplier) * 1rem);
  width: calc(var(--step-icon-multiplier) * 2rem);
  height: calc(var(--step-icon-multiplier) * 2rem);
  color: var(--wa-color-icon-normal);
  background-color: var(--wa-color-neutral-fill-quiet);
  border-radius: 50%;
  padding: var(--wa-space-m);

  border: var(--wa-border-width-s) solid var(--wa-color-neutral-border-normal);
  box-shadow: var(--wa-shadow-s);
}

@media (max-width:650px) {
  .step-grid {
    grid-template-columns: unset;
    grid-template-rows: repeat(3, auto);
    grid-auto-flow: column;
    align-items: center;
    justify-items: start;
    row-gap: var(--wa-space-l);
    text-align: left;
    column-gap: var(--wa-space-xl);
    margin-top: var(--wa-space-l);
  }

  .step-icon {
    --step-icon-multiplier: 2;
  }
}

.step-grid > div:not(.step-icon) {
  line-height: 1.2;
}

.step-grid h4 {
  margin-bottom: var(--wa-space-xs);
}

.fw-panel {
  border-top: var(--wa-border-width-l) solid var(--wa-color-neutral-border-loud);
  border-bottom: var(--wa-border-width-l) solid var(--wa-color-neutral-border-loud);
  box-shadow: var(--wa-shadow-s);
  padding: 0;
  margin-left: calc(var(--wa-space-3xl) * -1);
  margin-right: calc(var(--wa-space-3xl) * -1);
  --min-height: 500px;
  min-height: var(--min-height);
}

.surface-panel {
  background-color: var(--wa-color-neutral-fill-quiet);
}

/* class img-split-left is used in about-us modal, uses different approach from img-left*/
.img-split-left {
  display: flex;
  gap: var(--wa-space-xl);
}

@media (max-width: 800px) or (max-height: 600px) {
  #about-us .wa-frame {
    display: none;
  }
}

#about-us .wa-frame img {
  height: 100%;
}

.wa-frame img {
  transform: translate3d(0, 0, 1px);
}

/* class img-left is used in services tabs; uses different approach from img-split-left*/
@media (min-width: 800px) {
  .img-left {
    display: flex;
    align-items: center;
    --img-width: 50%;
    position: relative;
  }

  .img-left .wa-frame {
    top: 0;
    position: absolute;
    width: var(--img-width);
    padding-right: var(--wa-space-xl);
    height: 100%;
    object-fit: cover;
  }

  .img-left .img-panel-text {
    margin-left: var(--img-width);
    padding: var(--wa-space-xl);
  }
}

  /* class img-left is used in services tabs; uses different approach from img-split-left*/
@media (max-width: 800px) {
  .img-left {
    display: flex;
    flex-direction: column;
    gap: var(--wa-space-m);
    padding-top: var(--wa-space-m);
  }

  .img-left img, .img-left .wa-frame {
    order: 2;
  }

  .img-left img {
    border-radius: 10px;
  }
}

.fw-panel .img-panel-text {
  width: calc(var(--container-width) * 0.5);
}

wa-tab-panel::part(base) {
  padding: 0;
}

.details-table {
  display: grid;
  grid-template-columns: minmax(auto, 35%) 1fr;
  column-gap: var(--wa-space-xl);
  row-gap: var(--wa-space-xs);
  align-items: center;
}

.details-table.indented {
  margin-left: var(--wa-space-m);
}

.details-table div:nth-child(even) {
  font-weight: var(--wa-font-weight-semibold);
}

.details-table.extra-bold-items div:nth-child(even) {
  font-weight: var(--wa-font-weight-bold);
}

span.discounted {
  text-decoration: line-through;
  text-decoration-color: var(--wa-color-danger-on-quiet);
  font-size: var(--wa-font-size-smaller);
  font-weight: var(--wa-font-weight-light);
  color: var(--wa-color-text-quiet);
}

.receipt-page .discount {
  color: var(--wa-color-success-on-quiet);
  font-weight: var(--wa-font-weight-semibold);
}

/* Tab Panels */

wa-tab-group.end-tabs::part(tabs) {
  display: flex;
  justify-content: end;
}

wa-tab-group.with-title-tab::part(tabs) {
  align-items: end;
  --indicator-color: var(--wa-color-blue-70);
  --track-width: 3px;
}

wa-tab.title-tab {
  pointer-events: none;
  user-select: none;
  flex-grow: 1;
  margin-top: auto;
  margin-bottom: auto;
}

wa-tab.title-tab::part(base) {
  font-size: var(--wa-font-size-xl);
  line-height: var(--wa-line-height-condensed);
  font-weight: var(--wa-font-weight-semibold);
  opacity: 1;
  padding: 0 var(--wa-space-l);
}

@media (max-width: 879.9px) {
  #services-card wa-tab::part(base) {
    padding: var(--wa-space-xs) var(--wa-space-s);
  }
}

@media (max-width: 600px) {
  wa-tab.title-tab{
    display: none;
  }

  wa-tab-group.end-tabs::part(tabs) {
    justify-content: start;
  }
}

/*@media (min-width: 600px) {
  #services-card div[slot="header"] {
    display: none;
  }

  #services-card.card-header::part(header) {
    display: none!important;
  }
}*/

.expandable-service {
  border-top: var(--wa-border-width-s) solid var(--wa-color-neutral-border-normal);
  border-bottom: var(--wa-border-width-s) solid var(--wa-color-neutral-border-normal);
}

#services-card-header~.expandable-service {
  border-top: 0;
}

.expandable-service:last-child {
  border-bottom: 0;
}

.service-card-spread {
  display: flex;
  gap: var(--wa-space-l);
  padding: var(--wa-space-l);
}

.service-card-options {
  display: flex;
  gap: var(--wa-space-m);
  flex-direction: column;
  min-width: 250px;
  width: 250px;
  border-left: solid var(--wa-border-width-s) var(--wa-color-border-quiet);
  padding-left: var(--wa-space-l);
  justify-content: space-between;
}

.expandable-service .expandable-details {
  overflow: hidden;
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease-in-out;
}

.expandable-service .expandable-details > div {
  overflow: hidden;
}

.expandable-service.expanded .expandable-details {
  grid-template-rows: 1fr;
}

.expandable-service .service-option-buttons, .expandable-service .pricing-snippet {
  display: flex;
  gap: var(--wa-space-s);
  flex-direction: column;
}

.expandable-service .expand-icon {
  transition: transform 0.5s ease-in-out;
}

.expandable-service .expand-button::part(label)::before {
  content: "More Details";
}

.expandable-service.expanded .expand-button::part(label)::before {
  content: "Fewer Details";
}

.expandable-service.expanded .expand-icon {
  transform: rotate(-90deg);
}

.service-card-spread img {
  object-fit: contain;
}

.service-card-spread .wa-frame {
  height: fit-content;
  width: 250px;
  min-width: 250px;
}

#services-card::part(body) {
  padding: 0;
}

wa-tab[active] {
  --active-tab-color: var(--wa-color-text-inverse);
  color: var(--wa-color-text-inverse);
  background-color: var(--wa-color-brand-fill-loud);
}

@media (max-width:900px) {
  .service-card-spread .wa-frame {
    display: none;
  }
}

@media (max-width: 600px) {
  .service-card-spread {
    flex-direction: column;
    gap: 0;
    padding: var(--wa-space-m);
  }

  .service-card-spread .wa-frame {
    display: none;
  }

  .service-card-spread .service-card-options {
    border-left: none;
    padding-left: 0;
    padding-top: var(--wa-space-s);
    border-top: var(--wa-border-width-s) solid var(--wa-color-neutral-border-quiet);

    width: 100%;
  }

  .expandable-service.expanded .hide-mobile {
    display: block;
  }
  
  .expandable-service .hide-mobile {
    display: none;
  }

  p {
    margin-bottom: var(--wa-space-s);
  }

  .under-block p {
    margin-bottom: var(--wa-space-l);
  }

  .under-block.text-large {
    font-size: var(--wa-font-size-m);
  }

  
  .service-card-spread h3, .service-card-spread h4, .service-card-spread h5, .service-card-spread h6 {
    margin-bottom: var(--wa-space-m);
  }

  .mobile-hide {
    display: none;
  }

  .under-block.text-center {
    text-align: left;
  }

  .under-block h1 {
    font-size: var(--wa-font-size-2xl);
  }

  .under-block h2 {
    font-size: var(--wa-font-size-xl);
  }

  .under-block h3 {
    font-size: var(--wa-font-size-l);
  }

  .under-block h4 {
    font-size: var(--wa-font-size-m);
  }

  .under-block h5 {
    font-size: var(--wa-font-size-s);
  }

  .under-block h6 {
    font-size: var(--wa-font-size-xs);
  }
}

@media (max-width: 680px) {
  .normal-page .mobile-hide {
    display: none;
  }
}

@media (min-width: 680.01px) {
  .mobile-only {
    display: none;
  }
}

/* Indices Grid */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

#paralegal-prices.pricing-grid {
  grid-template-columns: repeat(2, 1fr);
}

.pricing-grid .grid-headers :first-child{
  grid-column-start: 2;
}

.pricing-grid .grid-headers {
    font-family: var(--wa-font-family-heading);
    font-weight: var(--wa-font-weight-heading);
    line-height: var(--wa-line-height-condensed);
    text-wrap: balance;
}

.pricing-grid .grid-headers div, .pricing-grid .grid-row div:not(:first-child) {
  justify-self: right;
  align-self: center;
}

.pricing-grid .grid-row.new-set > div {
  margin-top: var(--wa-space-s);
}

.grid-headers, .grid-row {
  display: contents;
}

/* Invoice Table */

.invoice-table {
  width: 100%;
}

.invoice-table th:last-child, .invoice-table td:last-child {
  text-align: right;
}

.invoice-table tbody tr:last-child {
  border-bottom: solid var(--wa-border-width-s) var(--wa-color-border-quiet);
}

.invoice-table tbody tr:last-child:hover {
  border-bottom-color: var(--wa-color-border-normal);
}

.invoice-table .outstanding-row {
  border-top: var(--wa-border-width-s) solid var(--wa-color-border-quiet);
}

.invoice-table .outstanding-row:hover {
  border-top-color: var(--wa-color-border-normal);
}

/* Order Status Container */

.order-status-page {
  margin-top: 5rem;
}

/* FAQ Drawer */

#faq-drawer p {
  line-height: var(--wa-line-height-condensed);
  margin-bottom: var(--wa-space-m);
}

/* Hero Div */

.hero-div {
  position: relative;
  border-bottom: var(--wa-border-width-l) solid var(--wa-color-neutral-border-loud);
  margin-left: calc(var(--main-padding) * -1);
  margin-right: calc(var(--main-padding) * -1);
  margin-top: calc(var(--main-padding) * -1);
  height: 80vh;
}

.hero-panel-text h1 {
  pointer-events: none;
  user-select: none;
  font-size: min(calc(var(--wa-font-size-4xl) * 1.6), min(14.22vw, 10.22vh));
  text-align: right;
  font-weight: calc(var(--wa-font-weight-heading) * 1.2);
  margin: 0;
  line-height: 1.2;
}

.hero-panel-text {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
}

.hero-div .hero-panel-text {
  color: white;
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
}

.hero-div img {
  max-height: 100%;
  height: 100%;
  width: 100%;
  object-fit: cover;
  filter: brightness(0.95);
}

/* Modal Styling */

wa-dialog {
  --box-shadow: var(--wa-shadow-m);
}

wa-dialog * { --box-shadow: 0; }

wa-dialog::part(dialog) {
  border: var(--wa-border-width-m) solid var(--wa-color-neutral-border-loud);
}

.wide-modal {
  --width: var(--container-width);
}

/* Details Accordion Styling */

wa-details {
  padding: var(--wa-space-xs);
}

wa-details::part(summary) {
  font-weight: var(--wa-font-weight-semibold);
}

wa-details::part(header) {
  line-height: var(--wa-line-height-condensed);
  gap: var(--wa-space-s);
}

wa-details::part(content) {
  margin-left: var(--wa-space-m);
}

/* Review Carousel */

/*
no longer necessary?
wa-carousel#review-carousel::part(scroll-container) {
  --slide-size: calc((100% - (var(--slides-per-page) - 2) * var(--slide-gap)) / var(--slides-per-page));
}*/

wa-carousel.review-carousel::part(scroll-container) {
  --slides-per-page: 3;
}

@media (max-width: 1000px) {
  wa-carousel.review-carousel::part(scroll-container) {
    --slides-per-page: 2;
  }
}

@media (max-width: 700px) {
  wa-carousel.review-carousel::part(scroll-container) {
    --slides-per-page: 1;
  }
  wa-carousel.review-carousel::part(base) {
    gap: var(--wa-space-xs);
  }
}

wa-carousel-item.review-card {
  color: var(--wa-color-text-normal);
  background-color: var(--wa-color-neutral-fill-quiet);
  height: 100%;
  padding: var(--wa-space-m);
  border: var(--wa-border-width-s) solid var(--wa-color-neutral-border-normal);
}

wa-carousel-item.review-card .wa-frame {
  height: 40px;
}

wa-carousel-item.review-card .review-header {
  display: flex;
  align-items: start;
  flex-wrap: nowrap;
}

wa-carousel-item.review-card .review-header::after {
  content: "";
  width: 40px;
  min-width: 40px;
  height: 40px;
  background: url('../img/google_g.png') no-repeat;
  background-size: 40px 40px;
  display: block;
}

wa-carousel-item.review-card wa-divider {
  --color: var(--wa-color-neutral-border-normal);
}

.review-card wa-rating {
  align-self: center;
  --symbol-color-active: var(--wa-color-blue-70);
}

.review-card p {
  margin-bottom: var(--wa-space-s);
  line-height: var(--wa-line-height-condensed);
}

.review-carousel {
  height:350px;
}

.review-card wa-scroller {
  overflow: hidden;
}

.border-text-header {
  border-bottom: var(--wa-border-width-s) var(--wa-border-style) var(--wa-color-neutral-border-quiet);
  margin-bottom: var(--wa-space-s);
}

/* Countdown */

/*this should be defined prior to the media query adjustments*/
#countdown div {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}

@media (min-width: 1500.01px) and (max-width: 1700px) and (min-height: 600px) {
  div#countdown-seconds {
    display: none;
  }
}

#countdown div::after {
  content: attr(data-label);

  font-size: var(--wa-font-size-s);
  color: var(--wa-color-text-quiet);
}

#countdown div:not(:first-child)::before {
  position: absolute;
  content: ":";
  gap: var(--wa-space-m);
  left: calc(var(--wa-space-m) * -0.5);
  font-size: var(--wa-font-size-s);
  color: var(--wa-color-text-quiet);
}

#countdown-text {
  font-size: var(--wa-font-size-xs); 
  color: var(--wa-color-text-normal);
  font-weight: var(--wa-font-weight-semibold);
  text-transform: uppercase;
  line-height: 1;
}

/*Order Status Page*/
span.file-info {
  text-overflow: ellipsis;
  overflow: hidden;
}

#hst-div {
  font-size: var(--wa-font-size-s);
}

/*Order Form*/

#checkout-modal.mode-product-selection {
  --width: 610px;
}

#checkout-modal.mode-product-selection::part(footer)
{
  display: none;
}

#checkout-modal h4 {
  margin-block-end: 0;
}

.email-input, .addr1-input {
  width: clamp(150px, 300px, 100%);
}

.addr2-input {
  width: clamp(100px, 120px, 100%);
}

.phone-input {
  width: clamp(100px, 150px, 100%);
}

#postal-input {
  max-width: 140px;
}

.order-panel {
  width: 100%;
  height: 100%;
  overflow: auto;
}

.addon-product wa-checkbox {
  width: 100%;
}

.checkout-panel-container {
  position: relative;
  flex: 1;
}

#category-selection-container > *:not(:first-child), #addon-products-container > *:not(:first-child), #product-options-container > *:not(:first-child), #product-details-container > *:not(:first-child) {
  margin-left: var(--wa-space-m);
}

@media (max-width: 600px) {
  #category-selection-container > *:not(:first-child), #addon-products-container > *:not(:first-child), #product-options-container > *:not(:first-child), #product-details-container > *:not(:first-child) {
    margin-left: 0;
  }
}

@media (max-width: 600px) {
  .dialog {
    max-height: 95vh;
  }
}

#checkout-panel {
  display: none;
}

#checkout-panel.active {
  display: block;
  position: relative;
  top: 0;
}

#product-selection-panel {
  opacity: 0;
  left: -100%;
  transition: opacity 0.25s, left 0.25s;
  position: absolute;
  background: white;
  z-index: 1;
  pointer-events: none;
}

#product-selection-panel.active {
  position: relative;
  opacity: 1;
  left: 0;
  pointer-events: auto;
}

/* ===========================================
   CHECKOUT MODAL - 4-MODE SYSTEM
   Modes: mode-product-selection, mode-product-options, mode-cart, mode-checkout
   =========================================== */

/* --- Default: Hide all optional elements --- */
#checkout-modal #image-preview-container,
#checkout-modal #order-summary,
#checkout-modal #checkout-panel,
#checkout-modal #checkout-actions,
#checkout-modal #coupon-code-container,
#checkout-modal #user-notes-container {
  display: none;
}

#checkout-modal #product-selection-panel {
  display: none;
}

#checkout-modal #product-actions {
  display: none;
}

#checkout-form {
  padding: var(--wa-space-m) var(--wa-space-l);
  height: 100%;
}

#checkout-modal::part(footer)
{
  padding: var(--wa-space-m) var(--wa-space-m);
}

#checkout-modal h6 {
  margin: 0;
}

#checkout-modal::part(dialog){
  max-height: calc(100% - var(--wa-space-2xl));
}

.panel-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--wa-space-m);
}

@media (min-width: 570.1px) {
  #checkout-modal #continue-to-checkout::part(label)::before {
    content: "Continue to Checkout";
  }
}

@media (max-width: 570px) {
  #checkout-modal #continue-to-checkout::part(label)::before {
    content: "Checkout";
  }
}

@media (max-width: 445px) {
  #checkout-modal #product-actions wa-button, #checkout-modal #checkout-actions wa-button {
    font-size: var(--wa-font-size-s);
  }

  #checkout-modal #product-actions, #checkout-modal #checkout-actions {
    gap: var(--wa-space-s);
  }
}

/* --- MODE 1: Product Selection Mode ---
   Only shows #product-selection-panel */
#checkout-modal.mode-product-selection #product-selection-panel {
  display: block;
  position: relative;
  opacity: 1;
  left: 0;
  pointer-events: auto;
}

/* --- MODE 2: Product Options Mode ---
   Shows #product-selection-panel and #image-preview-container */
#checkout-modal.mode-product-options #product-selection-panel {
  display: flex;
  position: relative;
  opacity: 1;
  left: 0;
  pointer-events: auto;
}

#checkout-modal.mode-product-options #product-actions {
  display: flex;
}

#checkout-modal.mode-product-options #image-preview-container {
  background: var(--wa-color-gray-80);
  border-radius: 10px;
  height: min-content;
}
/* Order Preview Carousel */

@media (min-width: 992.1px) {
  #checkout-modal.mode-product-options #image-preview-container.active {
    width: 40%;
    display: flex;
  }

  #checkout-modal.mode-product-options:has(#image-preview-container.active) {
    --width: min(90%, 1000px);
  }
}

#image-preview-container {
  align-items: center;
  display: none;
}

#order-preview-carousel {
  margin: var(--wa-space-m);
  border: var(--wa-border-width-s) solid var(--wa-color-neutral-border-normal);
}

#order-preview-carousel::part(scroll-container) {
  grid-area: unset;
  grid-column-start: 1;
  grid-column-end: 4;
  grid-row-start: 1;
}

.addon-product wa-checkbox::part(label){
  display: contents;
}

/* --- MODE 3: Pure Cart Mode ---
   Only shows #order-summary */
#checkout-modal.mode-cart #order-summary {
  display: flex;
  flex-direction: column;
  width: 100%;
}

#checkout-modal.mode-cart .checkout-panel-container {
  display: none;
}

#checkout-modal.mode-cart #product-actions {
  display: flex;
}

#checkout-modal.mode-cart {
  --width: 550px;
}

/* --- MODE 4: Checkout View ---
   Shows #checkout-panel and #order-summary */
#checkout-modal.mode-checkout #checkout-panel {
  display: block;
  overflow: auto;
}

#checkout-modal.mode-checkout::part(dialog) {
  height: fit-content;
}

#checkout-modal.mode-checkout::part(body) {
  overflow: hidden;
}

#checkout-modal.mode-checkout #order-summary {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

#checkout-modal.mode-checkout .checkout-panel-container {
  flex-grow: 2;
  flex-basis: auto;
}

#checkout-modal.mode-checkout #checkout-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--wa-space-m);
  width: 100%;
}

#checkout-modal.mode-checkout #checkout-actions #back-to-cart {
  flex-shrink: 0;
}

#checkout-modal.mode-checkout #checkout-actions #checkout-error-callout {
  flex-grow: 1;
  margin: 0;
}

#checkout-modal.mode-checkout #checkout-actions #confirm-purchase {
  flex-shrink: 0;
}

#checkout-modal.mode-checkout #coupon-code-container {
  display: flex;
}

#checkout-modal.mode-checkout #user-notes-container {
  display: flex;
}

#checkout-modal.mode-checkout {
  --width: 1000px;
}

#checkout-modal.mode-checkout .order-form-container {
  gap: var(--wa-space-xs);
}

#checkout-error-details:empty {
  display: none;
}

@media (min-width: 768.1px)
{
  #checkout-modal.mode-checkout #checkout-form {
    height: 700px;
  }

  #checkout-modal.mode-checkout #order-summary {
    overflow: auto;
  }

  #checkout-modal.mode-checkout #checkout-panel {
    padding-right: var(--wa-space-xs);
  }

  #checkout-modal.mode-checkout #order-summary {
    padding-left: var(--wa-space-xs);
    max-width: 360px;
  }
}

@media (max-width: 768px) {
  .order-form-container {
    flex-direction: column;
  }

  .order-total-card {
    position: static;
    flex: none;
    width: 100%;
  }

  #checkout-modal.mode-checkout::part(body) {
    overflow: auto;
  }

  #checkout-modal.mode-checkout #checkout-panel {
    overflow: visible;
  }

  #checkout-modal.mode-checkout #order-summary {
    margin-top: var(--wa-space-xl);
  }
}


/* --- BUTTON VISIBILITY ---
   #add-more-products: Only in mode-cart
   #add-to-cart: Only in mode-product-options
   #continue-to-checkout: In mode-product-options and mode-cart */

#checkout-modal #add-more-products,
#checkout-modal #add-to-cart,
#checkout-modal #continue-to-checkout {
  display: none !important;
}

/* Cart mode: show Add More Products + Continue to Checkout */
#checkout-modal.mode-cart #add-more-products,
#checkout-modal.mode-cart #continue-to-checkout {
  display: inline-flex !important;
}

/* Product options mode: show Add to Cart + Continue to Checkout */
#checkout-modal.mode-product-options #add-to-cart,
#checkout-modal.mode-product-options #continue-to-checkout {
  display: inline-flex !important;
}

/* ===========================================
   END CHECKOUT MODAL - 4-MODE SYSTEM
   =========================================== */

/* Legacy classes (for backward compatibility during transition) */
#checkout-modal.checkout-active #product-actions {
  display: none;
}

#checkout-modal.product-active #checkout-actions {
  display: none;
}

/* Cart item group styling */
.cart-item-group {
  display: flex;
  align-items: center;
  gap: var(--wa-space-s);
  padding: var(--wa-space-xs) 0;
  border-bottom: 1px dashed var(--wa-color-neutral-border-quiet);
}

.cart-item-group:last-child {
  border-bottom: none;
}

/* Item listings container (between edit and trash buttons) */
.cart-item-group .item-listings {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: var(--wa-space-2xs);
}

/* Edit/remove buttons */
.cart-item-group > .edit-cart-item,
.cart-item-group > .remove-cart-item {
  opacity: 0.5;
  transition: opacity 0.2s;
  flex-shrink: 0;
}

.cart-item-group:hover > .edit-cart-item,
.cart-item-group:hover > .remove-cart-item {
  opacity: 1;
}

/* Pending item styling (green tint for items not yet added to cart) */
.cart-item-group.pending {
  background-color: var(--wa-color-success-fill-quiet);
  padding: var(--wa-space-xs);
  margin: var(--wa-space-xs) calc(var(--wa-space-xs) * -1);
  border-radius: var(--wa-border-radius-s);
}

.cart-item-group.pending .order-item {
  color: var(--wa-color-success-on-quiet);
}

/* Order item rows (core product and addons) */
.order-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--wa-space-xs);
}

.order-item .product-name {
  flex-grow: 1;
}

.order-item.addon {
  font-size: var(--wa-font-size-s);
  color: var(--wa-color-text-quiet);
  padding-left: var(--wa-space-s);
}

/* Hide image preview in cart view and checkout */
#checkout-modal.cart-view #image-preview-container,
#checkout-modal.checkout-active #image-preview-container {
  display: none !important;
}

#checkout-modal::part(body) {
  padding: 0;
}

#checkout-modal::part(title) {
  font-size: var(--wa-font-size-xl);
}

#order-items-list {
  border-top: var(--wa-border-width-s) solid var(--wa-color-neutral-border-normal);
  border-bottom: var(--wa-border-width-s) solid var(--wa-color-neutral-border-normal);
  padding-top: var(--wa-space-xs);
  padding-bottom: var(--wa-space-xs);
}

#order-items-list:empty {
  border-top: none;
  border-bottom: none;
  padding-top: 0;
  padding-bottom: 0;
  display: none;
}

.order-item.discount {
  color: var(--wa-color-success-on-quiet);
  margin-top: var(--wa-space-s);
}

.order-form-container {
  display: flex;
  height: 100%;
  gap: var(--wa-space-m);
}

.category-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--wa-space-s);
  font-size: var(--wa-font-size-l);
}

#selected-product {
  font-size: var(--wa-font-size-l);
  flex-grow: 1;
}

#selected-product-container {
  display: flex;
  align-items: center;
  gap: var(--wa-space-s);
}


#checkout-modal .category-radio-group wa-radio {
  flex-grow: 1;
}

#checkout-modal .category-radio-group::part(form-control-input) {
  flex-wrap: nowrap;
}

#aggregates > div {
  display: flex;
  justify-content: space-between;
}

#checkout-modal .upload-area label[data-pending-file="true"] {
  justify-content: space-between;
}

#upload-files-container wa-progress-bar::part(base) {
  --track-height: 40px;
  height: 40px;
  border: var(--wa-border-width-s) solid var(--wa-color-neutral-border-loud);
}

#upload-files-container wa-progress-bar.error::part(base) {
  --indicator-color: var(--wa-color-danger-fill-loud);
  color: var(--wa-color-danger-on-loud);
}

#upload-progress-results {
  display: flex;
  flex-direction: column;
  gap: var(--wa-space-2xs);
}

#upload-progress-results .upload-result {
  display: flex;
  align-items: center;
  gap: var(--wa-space-s);
  font-size: var(--wa-font-size-s);
}

#upload-progress-results .upload-result.success wa-icon {
  color: var(--wa-color-success-fill-loud);
}

#upload-progress-results .upload-result.error wa-icon {
  color: var(--wa-color-danger-fill-loud);
}

#upload-progress-results .upload-result .fix-upload-link {
  margin-left: auto;
  color: var(--wa-color-brand-fill-loud);
  cursor: pointer;
}

#upload-progress-results .upload-result-details {
  display: flex;
  flex-direction: column;
  gap: var(--wa-space-3xs);
  flex: 1;
}

#upload-progress-results .upload-error-message {
  font-size: var(--wa-font-size-xs);
  color: var(--wa-color-danger-text);
}

#checkout-actions {
  justify-content: end;
}

.icon-label {
  display: flex;
  align-items: center;
  gap: var(--wa-space-s);
}

.error-text {
  color: var(--wa-color-danger-on-quiet);
}

.success-text {
  color: var(--wa-color-success-on-quiet);
}

.category-radio-group div:not(.radio-caption) {
  font-family: var(--wa-font-family-heading);
  font-weight: var(--wa-font-weight-heading);
  line-height: var(--wa-line-height-condensed);
  text-wrap: balance;
}

.category-radio-group div.radio-caption {
  color: var(--wa-color-text-quiet);
  font-family: var(--wa-font-family-body);
  font-weight: var(--wa-font-weight-body);
  line-height: var(--wa-line-height-condensed);
  font-size: var(--wa-font-size-s);
}

.category-radio-group wa-radio::part(label) {
  display: flex;
  flex-grow: 1;
}

.category-radio-group wa-radio > div {
  flex-grow: 1;
}

.category-radio-group wa-radio {
  padding-top: var(--wa-space-xs);
  padding-bottom: var(--wa-space-xs);
}

.gallery-magnify {
  position: absolute;
  bottom: var(--wa-space-s);
  right: var(--wa-space-s);
  opacity: 0.5;
}

.gallery-magnify wa-icon {
  color: var(--wa-color-neutral-on-quiet);
  font-size: var(--wa-font-size-l);
}

#product-gallery-carousel {
  --slides-per-page: 1;
}

#product-gallery-carousel wa-carousel-item img {
  border: var(--wa-border-width-s) solid var(--wa-color-neutral-border-normal);
}

#product-gallery-carousel::part(scroll-container)
{
  padding: 0;
}

#product-gallery-carousel wa-carousel-item.no-cover img {
  object-fit: contain;
  max-width: fit-content;
}

.service-card-spread .wa-frame {
  aspect-ratio: 3 / 4;
}

.service-card-spread .wa-frame img {
  object-fit: cover;
  height: 100%;
}

/* Small Product Carousel */
.small-product-carousel {
  --slides-per-page: 1;
}

.small-product-carousel wa-carousel-item {
  height: 100%;
}

wa-carousel.small-product-carousel::part(scroll-container) {
  padding: 0;
}

wa-carousel.small-product-carousel::part(base) {
  gap: 0;
  --aspect-ratio: 0;
}

.small-product-carousel wa-carousel-item img {
  object-fit: cover;
}

.small-product-carousel wa-carousel-item .wa-frame {
  height: 100%;
}
/* End Small Product Carousel */

.wa-frame {
  position: relative;
}

.wa-frame.no-aspect {
  aspect-ratio: unset;
}

/* For "step progress bar" (used on order status page)*/

.wrapper-progressBar li {
  margin-inline-start: 0;
}