/* ---------- Webform Confirmation Modal ---------- */
/* Styles Drupal core's dialog (jQuery UI) markup used by Webform's
   "modal" confirmation type. Core ships the dialog JS but no CSS, so
   the theme is responsible for the look.

   bootstrap_barrio's global-styling library (css/components/ui-dialog.css)
   and the Gin admin theme's toolbar CSS (loaded for any logged-in user
   with the admin toolbar visible, including on front-end pages) both
   ship their own same-specificity rules for these jQuery UI classes.
   Neither base-theme/contrib library is guaranteed to sort before this
   theme's CSS in the aggregate, so every selector below is prefixed
   with `body` to win on specificity rather than load order. */

body:has(.cma-page-layout) .ui-widget-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 1300;
}

body:has(.cma-page-layout) .ui-dialog.webform-confirmation-modal {
  position: relative;
  z-index: 1301;
  width: calc(100% - 2rem);
  max-width: 32rem;
  background: var(--cma-dark-grey);
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.35);
  overflow: hidden;
  outline: 0;
  font-family: 'Open Sans', sans-serif;
}

body:has(.cma-page-layout) .ui-dialog.webform-confirmation-modal .ui-dialog-titlebar {
  padding: 1.5rem 2.5rem 0.5rem;
  text-align: center;
}

body:has(.cma-page-layout) .ui-dialog.webform-confirmation-modal .ui-dialog-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

body:has(.cma-page-layout) .ui-dialog.webform-confirmation-modal .ui-dialog-titlebar-close {
  position: absolute;
  top: 2rem;
  right: 0.75rem;
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  border: none;
  background: transparent;
  color: #fff;
  cursor: pointer;
  /* Collapses the widget's visible "Close" text node while leaving it
     in the accessible name; the icon below uses rem-based pseudo-elements
     so it is unaffected by the zeroed font-size. */
  font-size: 0;
  line-height: 0;
}

body:has(.cma-page-layout) .ui-dialog.webform-confirmation-modal .ui-dialog-titlebar-close .ui-icon {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  text-indent: -9999px;
}

body:has(.cma-page-layout) .ui-dialog.webform-confirmation-modal .ui-dialog-titlebar-close .ui-icon::before,
body:has(.cma-page-layout) .ui-dialog.webform-confirmation-modal .ui-dialog-titlebar-close .ui-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.1rem;
  height: 2px;
  background: currentColor;
}

body:has(.cma-page-layout) .ui-dialog.webform-confirmation-modal .ui-dialog-titlebar-close .ui-icon::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

body:has(.cma-page-layout) .ui-dialog.webform-confirmation-modal .ui-dialog-titlebar-close .ui-icon::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

body:has(.cma-page-layout) .ui-dialog.webform-confirmation-modal .ui-dialog-content {
  padding: 0.625rem;
  color: #fff;
  font-size: 1rem;
  line-height: 1.6;
  text-align: center;
}

body:has(.cma-page-layout) .ui-dialog.webform-confirmation-modal .ui-dialog-content>*:last-child {
  margin-bottom: 0;
}

/* ---- Responsive ---- */
@media (max-width: 1400px) {}

@media (max-width: 1200px) {}

@media (max-width: 992px) {}

@media (max-width: 768px) {}

@media (max-width: 576px) {
  body:has(.cma-page-layout) .ui-dialog.webform-confirmation-modal .ui-dialog-titlebar {
    padding: 1.25rem 2rem 0.5rem;
  }
}