/* Confirmation dialog shown before a screening package is removed from the cart.
   Follows the overlay in tm-ecommerce.css so the two read as the same component. */

.tm-cart-dialog-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-overlay-background);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-index-overlay);
}

.tm-cart-dialog {
  position: relative;
  background-color: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-family);
  width: 90%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: var(--border-radius);
  padding: var(--spacing-base);
}

.tm-cart-dialog__title {
  margin: 0 0 0.75rem;
  padding-right: 2.5rem; /* clear of the close button */
  font-size: 1.25rem;
  line-height: 1.3;
}

.tm-cart-dialog__body {
  margin: 0 0 0.5rem;
}

.tm-cart-dialog__list {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
}

.tm-cart-dialog__list li {
  margin-bottom: 0.25rem;
}

/* The actions are theme block buttons, so this only lays them out. */
.tm-cart-dialog__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}

.tm-cart-dialog__actions .wp-block-button__link {
  cursor: pointer;
}

/* Cancel is the same block button as Remove, drawn as an outline. The theme's
   own is-style-outline variant is avoided deliberately: it pairs with a text
   colour class, and the theme strips padding from any coloured button without
   a background, which flattens it into a plain text link. */
.tm-cart-dialog__actions .tm-cart-dialog__cancel {
  border: 2px solid var(--wp--preset--color--primary, #005eff);
  background-color: transparent;
  color: var(--wp--preset--color--primary, #005eff);
}

.tm-cart-dialog__actions .tm-cart-dialog__cancel:hover,
.tm-cart-dialog__actions .tm-cart-dialog__cancel:focus-visible {
  background-color: var(--wp--preset--color--primary, #005eff);
  color: #fff;
}

.tm-cart-dialog__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.tm-cart-dialog__close:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

body.tm-cart-dialog-active {
  overflow: hidden;
}
