.mc-grid-controls--rental-cart {
  position: relative;
  z-index: 5;
}

.mc-rental-cart-appbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: #0e2d49;
  color: #ffffff;
  border-radius: 0;
  padding: 14px 24px;
  box-shadow: 0 12px 32px rgba(2, 10, 18, 0.35);
  opacity: 1;
  pointer-events: auto;
  transition:
    bottom 260ms ease,
    opacity 220ms ease;
}

/* Keep mini-cart offcanvas and overlay above rental footer when active. */
.bde-mini-cart-offcanvas--active,
.bde-mini-cart-offcanvas__backdrop--active,
.bde-mini-cart-overlay--active {
  z-index: 100000 !important;
}

.mc-rental-cart-appbar.is-empty {
  bottom: -140px;
  opacity: 0;
  pointer-events: none;
}

.mc-rental-cart-appbar__summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
  flex: 1 1 auto;
}

.mc-rental-cart-appbar__summary-item {
  min-width: 0;
}

.mc-rental-cart-appbar__label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.72;
  margin-bottom: 2px;
}

.mc-rental-cart-appbar__value {
  display: block;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mc-rental-cart-appbar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.mc-rental-cart-appbar__meta {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  opacity: 0.92;
}

.mc-rental-cart-appbar__quick-action {
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 12px;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  padding: 0;
}

.mc-rental-cart-appbar__quick-action[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.mc-rental-cart-appbar__submit {
  border: 0;
  border-radius: 0;
  clip-path: polygon(
    14px 0,
    100% 0,
    100% calc(100% - 14px),
    calc(100% - 14px) 100%,
    0 100%,
    0 14px
  );
  background: #ffffff;
  color: #0e2d49;
  font-size: 14px;
  font-weight: 700;
  padding: 11px 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  cursor: pointer;
}

.mc-rental-cart-appbar__submit-label {
  display: inline-block;
  line-height: 1;
}

.mc-rental-cart-appbar__submit-count {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 999px;
  background: #061728;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  text-transform: none;
}

.mc-rental-cart-appbar__submit[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.mc-rental-cart-modal[hidden] {
  display: none;
}

.mc-rental-cart-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 16px;
}

.mc-rental-cart-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 14, 24, 0.5);
}

.mc-rental-cart-modal__dialog {
  position: relative;
  width: min(680px, calc(100vw - 32px));
  margin: 0;
  background: #ffffff;
  border-radius: 0;
  clip-path: polygon(
    26px 0,
    100% 0,
    100% calc(100% - 26px),
    calc(100% - 26px) 100%,
    0 100%,
    0 26px
  );
  padding: 20px;
  box-shadow: 0 24px 52px rgba(12, 28, 44, 0.32);
}

.mc-rental-cart-modal__title {
  margin: 0 0 12px;
  color: #122f47;
  font-size: 26px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.mc-rental-cart-modal__note {
  margin: 10px 0 12px;
  font-size: 13px;
  color: #4e6478;
}

.mc-rental-cart-modal__preview {
  margin: 8px 0 8px;
  border: 1px solid #d8e3ee;
  border-radius: 0;
  background: #f7fafc;
  height: 220px;
  overflow-y: auto;
}

.mc-rental-cart-modal__preview-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: #122f47;
}

.mc-rental-cart-modal__items {
  margin: 0;
  padding: 0;
}

.mc-rental-cart-modal__items-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.mc-rental-cart-modal__items-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eaf1f7;
  color: #122f47;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #d8e3ee;
}

.mc-rental-cart-modal__items-table th:nth-child(1),
.mc-rental-cart-modal__items-table td:nth-child(1) {
  width: 52%;
}

.mc-rental-cart-modal__items-table th:nth-child(2),
.mc-rental-cart-modal__items-table td:nth-child(2) {
  width: 12%;
  white-space: nowrap;
}

.mc-rental-cart-modal__items-table th:nth-child(3),
.mc-rental-cart-modal__items-table td:nth-child(3) {
  width: 20%;
  white-space: nowrap;
}

.mc-rental-cart-modal__items-table th:nth-child(4),
.mc-rental-cart-modal__items-table td:nth-child(4) {
  width: 16%;
  text-align: right;
}

.mc-rental-cart-modal__item {
  color: #214157;
}

.mc-rental-cart-modal__item td {
  padding: 9px 12px;
  border-bottom: 1px solid #e2ebf3;
  font-size: 13px;
  vertical-align: middle;
}

.mc-rental-cart-modal__item-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mc-rental-cart-modal__item-remove {
  border: 0;
  background: transparent;
  color: #8f1a1a;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 2px;
  letter-spacing: 0.03em;
  cursor: pointer;
  padding: 0;
}

.mc-rental-cart-modal__empty {
  margin: 16px 12px;
  font-size: 12px;
  color: #5d7185;
}

.mc-rental-cart-modal__summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #d8e3ee;
  background: #f9fcff;
}

.mc-rental-cart-modal__summary-item {
  min-width: 0;
}

.mc-rental-cart-modal__summary-label {
  display: block;
  margin-bottom: 3px;
  font-size: 11px;
  color: #4e6478;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mc-rental-cart-modal__summary-value {
  display: block;
  color: #122f47;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mc-rental-cart-modal__field {
  display: block;
  margin-bottom: 10px;
}

.mc-rental-cart-modal__field span {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: #375066;
}

.mc-rental-cart-modal__field input,
.mc-rental-cart-modal__field textarea {
  width: 100%;
  border: 1px solid #c6d3df;
  border-radius: 0;
  padding: 10px 11px;
  font-size: 14px;
  color: #142f45;
}

.mc-rental-cart-modal__status {
  min-height: 20px;
  margin: 4px 0 0;
  font-size: 12px;
  color: #1f4f76;
}

.mc-rental-cart-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.mc-rental-cart-modal__confirm,
.mc-rental-cart-modal__cancel {
  border: 0;
  border-radius: 0;
  clip-path: polygon(
    12px 0,
    100% 0,
    100% calc(100% - 12px),
    calc(100% - 12px) 100%,
    0 100%,
    0 12px
  );
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.mc-rental-cart-modal__confirm {
  background: #0e2d49;
  color: #fff;
}

.mc-rental-cart-modal__cancel {
  background: #e4ebf2;
  color: #142f45;
}

.mc-rental-cart-modal__selection-actions {
  justify-content: flex-end;
}

.mc-rental-cart-modal__clear {
  border: 0;
  background: transparent;
  color: #8f1a1a;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 2px;
  letter-spacing: 0.03em;
  cursor: pointer;
  margin-right: auto;
  padding: 0;
}

.mc-rental-cart-modal__clear[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

body.mc-has-rental-cart {
  padding-bottom: 110px;
}

@media (max-width: 980px) {
  .mc-rental-cart-appbar {
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px 14px;
  }

  .mc-rental-cart-appbar__summary {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .mc-rental-cart-appbar__value[data-role="rental-cart-date-range"],
  .mc-rental-cart-modal__summary-value[data-role="rental-cart-selection-date-range"] {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .mc-rental-cart-appbar__actions {
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
  }

  .mc-rental-cart-appbar__submit {
    margin: 0 auto;
    padding: 9px 12px;
    font-size: 12px;
    gap: 8px;
    clip-path: polygon(
      10px 0,
      100% 0,
      100% calc(100% - 10px),
      calc(100% - 10px) 100%,
      0 100%,
      0 10px
    );
  }

  .mc-rental-cart-appbar__submit-count {
    min-width: 30px;
    height: 30px;
    padding: 0 7px;
    font-size: 9px;
  }

  .mc-rental-cart-modal {
    padding: 0;
    place-items: stretch;
  }

  .mc-rental-cart-modal__dialog {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    padding: 16px;
    overflow-y: auto;
    clip-path: none;
    box-shadow: none;
  }

  .mc-rental-cart-modal__items-table {
    table-layout: auto;
  }

  .mc-rental-cart-modal__items-table th:nth-child(1),
  .mc-rental-cart-modal__items-table td:nth-child(1) {
    width: 100%;
  }

  .mc-rental-cart-modal__items-table th:nth-child(2),
  .mc-rental-cart-modal__items-table td:nth-child(2),
  .mc-rental-cart-modal__items-table th:nth-child(3),
  .mc-rental-cart-modal__items-table td:nth-child(3),
  .mc-rental-cart-modal__items-table th:nth-child(4),
  .mc-rental-cart-modal__items-table td:nth-child(4) {
    width: auto;
  }

  .mc-rental-cart-modal__confirm,
  .mc-rental-cart-modal__cancel {
    clip-path: none;
  }

  .mc-rental-cart-modal__summary {
    grid-template-columns: minmax(0, 1fr);
  }
}
