/* Order placed dialog on the home page. Colors follow the active theme. */
.order-success-modal {
  position: fixed;
  inset: 0;
  z-index: 10080;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.order-success-modal[hidden] {
  display: none !important;
}

.order-success-modal::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.order-success-modal.is-closing {
  visibility: hidden;
  pointer-events: none;
}

.order-success-modal.is-closing::before,
.order-success-modal.is-closing .order-success-modal__dialog {
  opacity: 0;
}

.order-success-modal__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  max-height: calc(100% - 32px);
  overflow: auto;
  padding: 28px 28px 24px;
  border-radius: 16px;
  background: var(--brighter-color, #fff);
  color: var(--black-color, #373737);
  font-family: var(--font-family, inherit);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
  transition: opacity 0.2s ease;
}

.order-success-modal__dialog:focus {
  outline: none;
}

.order-success-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.order-success-modal__title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--black-color, #373737);
}

.order-success-modal__close {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: -8px -8px 0 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--black-color, #373737);
  cursor: pointer;
}

.order-success-modal__close:hover {
  background: var(--lightgrey-color, #dbdbdb);
}

.order-success-modal__message p {
  margin: 0 0 10px;
}

.order-success-modal__message a {
  color: var(--links-color, var(--dark-color, #db600f));
}

.order-success-modal__actions {
  margin-top: 8px;
}

.order-success-modal__actions .btn {
  min-width: 140px;
  font-weight: 600;
}

body.order-success-modal-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .order-success-modal.is-closing::before,
  .order-success-modal.is-closing .order-success-modal__dialog {
    transition: none;
  }
}
