/*******************************
 * Buttons
 ******************************/
/*
 * Applies the complete set of button styles with all desired style variations.
 * This mixin is normally applied to form buttons or links with
 * the desired button classes eg. .button.style-xxx.
 */
/*
 * Contains styles that all of the buttons have in common.
 * Some button styles might opt out or override some of these styles.
 * One benefit of this approach is that all of the buttons will be consistently
 * configurable with the CSS variables defined below.
 */
/*******************************
 * Button Styles
 *
 * Styles should define the way the buttons look. Depending on the project,
 * you may need to optimize each style based on the section / element that
 * a button is used in. For that purpose you can use the predefined CSS
 * variables to easily overwrite the desired colors based on your need.
 ******************************/
/*******************************
 * Inputs
 ******************************/
.box {
  --box-padding: 2rem;
  --box-padding-x: var(--box-padding);
  --box-padding-y: var(--box-padding);
  --box-padding-left: var(--box-padding-x);
  --box-padding-right: var(--box-padding-x);
  --box-padding-top: var(--box-padding-y);
  --box-padding-bottom: var(--box-padding-y);
  --box-border-width: 1px;
  --box-background: var(--white);
  --box-interaction-duration: 400ms;
  --box-interaction-shadow: var(--drop-shadow);
}
.box:where([data-variant=shaded]) {
  --box-background: var(--shade-color);
  --box-border-width: 0px;
}
.box:where([data-variant=ghost]) {
  --box-border-width: 0px;
  --box-padding-top: 0px;
  --box-padding-left: 0px;
  --box-padding-right: 0px;
  --box-padding-bottom: 0px;
}
.box:where([data-variant=ghost]):where(.with-image) {
  --box-padding-top: 1.5rem;
}
.box:where([data-variant=poster]) {
  --box-border-width: 0px;
  --box-padding-y: /* grow(20, 46) */ clamp(1.25rem, 0.6705426357rem + 2.519379845vw, 2.875rem);
  --box-padding-x: /* grow(20, 50) */ clamp(1.25rem, 0.5813953488rem + 2.9069767442vw, 3.125rem);
  --box-interaction-duration: 600ms;
}
.box {
  display: flex;
  position: relative;
  transition-property: box-shadow, transform;
  transition-duration: 125ms;
  justify-content: stretch;
  background-color: var(--box-background);
  border-radius: var(--rounded);
  max-width: var(--box-max-width);
  color: var(--text-color);
  transition: filter var(--box-interaction-duration);
}
.box::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  border-radius: var(--rounded);
  border: var(--box-border-width) solid var(--border-color);
}
.box:is(a):focus:not(:focus-visible) {
  outline: none;
}
.box:is(a):focus-visible {
  outline: 2px solid var(--focus-color, var(--primary-color));
  outline-offset: var(--focus-offset, 3px);
}
@media (hover: hover) and (pointer: fine) {
  .box:is(a):is([data-variant=default], [data-variant=shaded]):hover {
    filter: var(--box-interaction-shadow);
  }
}
.box:not(a):not([data-link-expander=none]):not(:has(.content-lead a)):has(.content-trail .button.style-text:only-child):has(a:focus-visible) {
  outline: 2px solid var(--focus-color, var(--primary-color));
  outline-offset: var(--focus-offset, 3px);
}
@media (hover: hover) and (pointer: fine) {
  .box:not(a):not([data-link-expander=none]):not(:has(.content-lead a)):has(.content-trail .button.style-text:only-child):is([data-variant=default], [data-variant=shaded]):hover {
    filter: var(--box-interaction-shadow);
  }
}
.box:not(a):not([data-link-expander=none]):not(:has(.content-lead a)):has(.content-trail .button.style-text:only-child) .button.style-text:focus {
  outline: none;
}
.box:not(a):not([data-link-expander=none]):not(:has(.content-lead a)):has(.content-trail .button.style-text:only-child) .button.style-text:not(.box[data-link-expander=after] *)::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--rounded);
}
.box:not(a):not([data-link-expander=none]):not(:has(.content-lead a)):has(.content-trail .button.style-text:only-child) .button.style-text:is(.box[data-link-expander=after] *)::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--rounded);
}
.box.with-image {
  flex-flow: column;
  max-width: var(--box-max-width, min(100%, var(--image-width)));
  min-width: 0;
}
.box img {
  align-self: center;
}
.box .img-wrap {
  display: block;
  flex-shrink: 0;
  overflow: hidden;
  border-top-left-radius: var(--rounded);
  border-top-right-radius: var(--rounded);
}
.box .img-wrap:is(.box[data-variant=poster] *, .box[data-variant=ghost] *) {
  border-radius: var(--rounded);
}
.box .img-wrap:is(a.box[data-variant=poster] *) img {
  transition: transform var(--box-interaction-duration);
}
@media (hover: hover) and (pointer: fine) {
  .box .img-wrap:is(a.box[data-variant=poster] *):is(.box:hover *) img {
    transform: scale(1.05);
  }
}
.box .content-wrap {
  display: flex;
  flex-flow: column;
  justify-content: space-between;
  padding: var(--box-padding-top) var(--box-padding-right) var(--box-padding-bottom) var(--box-padding-left);
  width: 100%;
  flex-grow: 1;
  height: auto;
  border-radius: var(--rounded);
  z-index: 1;
}
.box .content-wrap:is(.with-image > *) {
  border-top: none;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
.box .content-wrap :is(.content, .content-lead, .content-trail) > :first-child, .box .content-wrap :is(.content, .content-lead, .content-trail) > link:first-child + * {
  margin-top: 0;
}
.box .content-wrap :is(.content, .content-lead, .content-trail) > :last-child {
  margin-bottom: 0;
}
.box .content-wrap :is(.content, .content-lead, .content-trail) > :is(.lead-text, .lead-text-small):first-child > :first-child {
  margin-top: 0;
}
.box .content-wrap :is(.content, .content-lead, .content-trail) > :is(.lead-text, .lead-text-small):last-child > :last-child {
  margin-bottom: 0;
}
.box .content-wrap .content-trail {
  margin-top: auto;
}
.box .content-wrap .content {
  height: 100%;
  width: 100%;
}
.box .content-wrap .content:has(.content-trail) {
  display: flex;
  flex-direction: column;
  gap: var(--element-spacing-sm);
}
.box .content-wrap:is(a.box[data-variant=poster] *)::before {
  transition-property: transform, opacity;
  transition-duration: var(--box-interaction-duration);
}
@media (hover: hover) and (pointer: fine) {
  .box .content-wrap:is(a.box[data-variant=poster] *):is(.box:hover *)::before {
    transform: translateY(25%);
    opacity: 0.95;
  }
}
.box:where([data-variant=poster]) {
  display: grid;
  height: max-content;
  align-items: end;
  color: var(--white);
}
.box:where([data-variant=poster]) .content-wrap {
  position: relative;
  overflow: hidden;
  justify-content: flex-end;
  min-height: min(50%, 13rem);
  padding-top: calc(1.5 * var(--box-padding-top));
}
.box:where([data-variant=poster]) .content-wrap::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(to top, #000 -5%, rgba(0, 0, 0, 0.031372549) 90%, rgba(0, 0, 0, 0) 100%);
}
.box:where([data-variant=poster]) > * {
  grid-area: 1/1/-1/-1;
}
