/* Loaded after the captured terminal stylesheet so its generic modal rules cannot
   stretch the opt-out checkbox or flatten the confirmation card. */
.ref-modal-backdrop .ref-order-confirm-modal.ref-modal {
  position: relative;
  box-sizing: border-box;
  width: min(450px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  max-height: min(86vh, 720px);
  padding: 24px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid rgba(235, 249, 252, .29);
  border-radius: 18px;
  background: radial-gradient(circle at 8% 0%, rgba(133, 204, 217, .15), transparent 44%),
              linear-gradient(145deg, rgba(48, 57, 62, .48), rgba(25, 29, 35, .52) 53%, rgba(59, 43, 54, .47));
  -webkit-backdrop-filter: blur(23px) saturate(155%);
  backdrop-filter: blur(23px) saturate(155%);
  box-shadow: 0 24px 68px rgba(0, 0, 0, .52), inset 0 1px rgba(255, 255, 255, .17), inset 0 0 32px rgba(255, 255, 255, .025);
  color: #f5f7f8;
  font: 500 14px/1.4 Onest, sans-serif;
}
.ref-order-confirm-modal h2 { display: none; }
.ref-order-confirm-modal .ref-close { position: absolute; right: 20px; top: 15px; padding: 0; border: 0; background: none; color: #f3f5f6; font-size: 27px; line-height: 30px; }
.ref-confirm-heading { display: flex; align-items: center; gap: 10px; padding-right: 30px; color: #fff; font-size: 21px; line-height: 28px; }
.ref-confirm-heading img { width: 27px; height: 27px; object-fit: contain; }
.ref-confirm-tags { display: flex; align-items: center; gap: 7px; margin: 12px 0 22px; }
.ref-confirm-tags span { padding: 3px 8px; border-radius: 3px; background: rgba(255, 255, 255, .09); color: #c3c9cd; font-size: 11px; font-weight: 700; }
.ref-confirm-tags .ref-confirm-side.long { background: rgba(12, 203, 129, .15); color: #18d997; }
.ref-confirm-tags .ref-confirm-side.short { background: rgba(233, 54, 120, .15); color: #ff6b9d; }
.ref-confirm-details { display: grid; gap: 14px; padding: 19px 0; border-top: 1px solid rgba(255, 255, 255, .1); border-bottom: 1px solid rgba(255, 255, 255, .1); }
.ref-confirm-details > div { display: flex; justify-content: space-between; gap: 18px; align-items: baseline; }
.ref-confirm-details span { color: #a2aab2; }
.ref-confirm-details b { color: #f5f7f8; text-align: right; font-weight: 650; }
.ref-confirm-details .liquidation b { color: #ffd66f; }
.ref-confirm-message { margin: 17px 0 0; color: #b6bec4; line-height: 1.5; font-size: 12px; }
.ref-order-confirm-modal .ref-confirm-optout { display: flex; align-items: center; gap: 9px; max-width: 100%; margin: 20px 0; color: #aeb6bd; cursor: pointer; font-size: 12px; }
.ref-order-confirm-modal .ref-confirm-optout span { min-width: 0; flex: 1; }
.ref-order-confirm-modal .ref-confirm-optout input[type="checkbox"] { box-sizing: border-box; appearance: none; display: block; flex: 0 0 16px; width: 16px; min-width: 16px; max-width: 16px; height: 16px; padding: 0; margin: 0; border: 1px solid #98a4aa; border-radius: 4px; background: transparent; cursor: pointer; }
.ref-order-confirm-modal .ref-confirm-optout input[type="checkbox"]:checked { border-color: #8fe8f5; background: #8fe8f5; box-shadow: inset 0 0 0 3px #203338; }
.ref-confirm-actions { display: flex; gap: 6px; margin-top: 18px; }
.ref-order-confirm-modal .ref-confirm-actions button { flex: 1; height: 48px; padding: 0; border: 0; border-radius: 28px; background: rgba(255, 255, 255, .09); color: #fff; font-size: 15px; font-weight: 700; }
.ref-order-confirm-modal .ref-confirm-actions [data-confirm].long { background: #0bb77c; }
.ref-order-confirm-modal .ref-confirm-actions [data-confirm].short { background: #e93678; }
.ref-confirm-actions button:hover { filter: brightness(1.12); }

.ref-modal-backdrop .ref-cancel-order-modal.ref-modal {
  box-sizing: border-box;
  width: min(362px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  padding: 68px 24px 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(38, 42, 45, .73), rgba(25, 27, 30, .77));
  -webkit-backdrop-filter: blur(20px) saturate(135%);
  backdrop-filter: blur(20px) saturate(135%);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .48), inset 0 1px rgba(255, 255, 255, .08);
  text-align: center;
}
.ref-cancel-order-modal h2,
.ref-cancel-order-modal .ref-close { display: none; }
.ref-cancel-order-icon { display: grid; place-items: center; width: 80px; height: 80px; margin: 0 auto 22px; border-radius: 50%; background: rgba(214, 177, 94, .12); color: #ffd66f; font-size: 40px; font-weight: 500; line-height: 1; }
.ref-cancel-order-question { margin: 0 0 22px; color: #f6f7f8; font-size: 15px; font-weight: 700; }
.ref-cancel-order-actions { display: flex; gap: 6px; }
.ref-cancel-order-modal .ref-cancel-order-actions button { flex: 1; min-width: 0; height: 50px; padding: 0 10px; border: 0; border-radius: 25px; background: rgba(255, 255, 255, .08); color: #f6f7f8; font-size: 15px; font-weight: 650; }
.ref-cancel-order-modal .ref-cancel-order-actions [data-cancel-order] { background: #fff; color: #16191b; }
.ref-cancel-order-modal .ref-cancel-order-actions button:hover { filter: brightness(1.12); }
