/* OSP withdrawal modal — MeinXXL3
   Used by the "Cancel Order" flow on the order status page.
   Component: _default/components/osp/sections/info/osp-withdrawal.xhtml

   MeinXXL3 bundles Bootstrap, whose .modal rule turns the element into a
   full-viewport overlay (position:fixed; top/right/bottom/left:0; width/height:100%;
   text-align:center; padding:0) and adds an inline-block :before for vertical-
   centering. The withdrawal component is not a Bootstrap-structured modal, so
   we reset that overlay geometry below and re-center the popup ourselves. */

/* Backdrop — scoped to our wrap only so other modals on the page aren't affected.
   MeinXXL3's modal.js wraps each .modal in a .modal-wrap and toggles its display
   between none/block to open/close. Making the wrap a full-viewport fixed overlay
   gives us the dark backdrop AND lets the existing click-outside-to-close handler
   in modal.js work, since clicks outside the popup now hit the wrap. */
.modal-wrap:has(.-withdrawalModal) {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1055;
}

.withdrawalWrapper #withdrawalTriggerBtn {
  background-color: #cc1717;
  color: #fff;
  line-height: normal;
  border: 0;
  padding: 5px;
  border-radius: 4px;
}

.withdrawalWrapper #withdrawalTriggerBtn:hover {
  background-color: #cc1717;
  color: #fff;
  border: 0;
}

.-withdrawalModal {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  width: 90% !important;
  max-width: 500px;
  height: auto !important;
  max-height: 90vh !important;
  transform: translate(-50%, -50%) !important;
  background-color: #fff;
  text-align: left;
  padding: 20px;
  overflow-y: auto !important;
  z-index: 1060;
}

.-withdrawalModal:before {
  content: none !important;
}

.-withdrawalModal .head {
  background-color: #fff;
}

.-withdrawalModal .withdrawal-item-list {
  background: #f9f9f9;
  padding: 10px 5px;
}

.-withdrawalModal .withdrawal-item-list .withdrawal-item {
  list-style: none;
  display: flex;
  justify-content: space-between;
  font-weight: bold;
}

.-withdrawalModal .withdrawal-item-list .withdrawal-item .withdrawal-item-name {
  margin-left: 10px;
}

.-withdrawalModal .withdrawal-legal-text {
  font-size: 12px;
}

.-withdrawalModal .withdrawal-actions {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.-withdrawalModal .withdrawal-actions .confirm {
  background-color: #cc1717;
  border: 0;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  margin: 0 10px;
  padding: 5px;
  border-radius: 4px;
}

.-withdrawalModal .withdrawal-actions .confirm:hover {
  border-color: #cc1717;
}

.-withdrawalModal .withdrawal-actions .cancel {
  background-color: #fff;
  border: 2px solid #cc1717;
  border-radius: 0;
  color: #cc1717;
  font-size: 14px;
  font-weight: bold;
  margin: 0 10px;
  padding: 0 15px;
  border-radius: 4px;
}

@media only screen and (max-width: 568px) {
  .-withdrawalModal {
    max-width: 320px;
  }

  .-withdrawalModal .withdrawal-actions {
    display: block;
  }

  .-withdrawalModal .withdrawal-actions .confirm {
    margin: 0;
    width: 100%;
  }

  .-withdrawalModal .withdrawal-actions .cancel {
    margin: 10px 0;
    padding: 7px;
    width: 100%;
  }
}
