/* ---------------------------------------------------------------------------------------------
   SIDE CART
   Look of the former CheckoutWC side cart (template "default")
   --------------------------------------------------------------------------------------------- */

html.sullivan-side-cart-open,
body.sullivan-side-cart-open {
  overflow: hidden;
}

.sullivan-side-cart__overlay {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999998;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sullivan-side-cart__panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 999999;
  box-sizing: border-box;
  width: 100%;
  max-width: 480px;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
  color: #333;
  font-family: Montserrat, 'Helvetica Neue', Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0.3px;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.3s ease, visibility 0.3s ease;
}

body.admin-bar .sullivan-side-cart__panel {
  top: var(--wp-admin--admin-bar--height, 0px);
  height: calc(100% - var(--wp-admin--admin-bar--height, 0px));
}

.sullivan-side-cart.is-open .sullivan-side-cart__overlay {
  opacity: 1;
  visibility: visible;
}

.sullivan-side-cart.is-open .sullivan-side-cart__panel {
  transform: translateX(0);
  visibility: visible;
}

.sullivan-side-cart__panel.is-loading {
  cursor: wait;
}

.sullivan-side-cart__panel.is-loading .sullivan-side-cart__content {
  opacity: 0.5;
  pointer-events: none;
}

.sullivan-side-cart__content {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition: opacity 0.2s ease;
}

/* Header */

.sullivan-side-cart__header {
  position: relative;
  flex-shrink: 0;
  margin: 24px 24px 0;
  text-align: center;
}

.sullivan-side-cart__count {
  display: inline-flex;
  align-items: center;
  color: #222;
  vertical-align: middle;
}

.sullivan-side-cart__icon {
  width: 34px;
  height: 34px;
  color: #222;
}

.sullivan-side-cart__count span {
  padding-left: 0.25em;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
  font-size: 16px;
  line-height: 20px;
}

.sullivan-side-cart__close {
  position: absolute;
  top: 0;
  right: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: #111827;
  cursor: pointer;
}

.sullivan-side-cart__close:hover,
.sullivan-side-cart__close:focus {
  background: transparent;
  color: #111827;
}

.sullivan-side-cart__close svg {
  display: block;
  width: 24px;
  height: 24px;
  transition: opacity 0.3s ease;
}

.sullivan-side-cart__close:hover svg {
  opacity: 0.7;
}

.sullivan-side-cart__empty {
  margin: 2em 24px;
  text-align: center;
}

/* Items */

.sullivan-side-cart__items {
  flex-grow: 1;
  margin: 14.4px 24px;
  padding: 0;
  list-style: none;
  font-size: 14.4px;
}

.sullivan-side-cart .sullivan-cart-item {
  display: flex;
  align-items: flex-start;
  margin: 0;
  padding: 14.4px 0;
}

.sullivan-side-cart .sullivan-cart-item:first-child {
  padding-top: 0;
}

/* Shared with the checkout summary */

.sullivan-cart-item__image {
  flex-shrink: 0;
  width: 54px;
}

.sullivan-cart-item__image img {
  display: block;
  box-sizing: border-box;
  width: 54px !important;
  max-width: none;
  height: auto;
  border: 1px solid #e1e1e1;
}

.sullivan-cart-item__info {
  flex-grow: 1;
  padding-left: 14.4px;
  line-height: 1.4;
}

.sullivan-cart-item__title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
}

.sullivan-cart-item__info dl.variation {
  margin: 0 0 4px;
  color: #717171;
  font-size: 0.75em;
}

.sullivan-cart-item__subtotal {
  flex-shrink: 0;
  padding-left: 14.4px;
  font-size: 14.4px;
  line-height: 1.4;
  text-align: right;
  white-space: nowrap;
}

.sullivan-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d3d4d5;
  border-radius: 16px;
  color: #717171;
  font-size: 10.8px;
  line-height: 1.4;
  opacity: 0.9;
}

.sullivan-qty__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  min-height: 30px;
  margin: 0;
  padding: 0 !important;
  border: none;
  border-radius: 16px 2px 2px 16px;
  background: none;
  color: #333;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
}

.sullivan-qty__btn--plus {
  border-radius: 2px 16px 16px 2px;
}

.sullivan-qty__btn:hover,
.sullivan-qty__btn:focus-visible {
  background: #333;
  color: #fff;
}

.sullivan-qty__btn:disabled {
  background: none;
  color: #d9d9d9;
  cursor: not-allowed;
}

.sullivan-qty__value {
  min-width: 30px;
  padding: 0 2.7px;
  box-sizing: border-box;
  color: #333;
  font-weight: 700;
  text-align: center;
}

/* Footer */

.sullivan-side-cart__footer {
  flex-shrink: 0;
  margin: 0 24px;
  padding: 16px 0 24px;
}

.sullivan-side-cart__subtotal {
  display: flex;
  justify-content: space-between;
  margin: 0 0 16px;
  font-size: 16px;
  line-height: 1.25;
}

a.sullivan-side-cart__checkout {
  display: block;
  box-sizing: border-box;
  width: 100%;
  padding: 9.6px;
  border: 1px solid #be3519;
  border-radius: 5px;
  background: #be3519;
  color: #fff;
  font-size: 16px;
  line-height: 1.6;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

a.sullivan-side-cart__checkout:hover,
a.sullivan-side-cart__checkout:focus {
  border-color: #b52f14;
  background: #b52f14;
  color: #fff;
}

@media (max-width: 767.98px) {
  body.admin-bar .sullivan-side-cart__panel {
    top: 0;
    height: 100%;
  }
}
