/* Widget React (form, formInterpreting, instantquote): modale di conferma.
   simpleModal() del widget (cms-widget/src/Services/domBridge.jsx) appende
   <div class="modal modal--small modal--flash"> direttamente a <body>, fuori da
   #translated-app: il CSS del bundle, tutto prefissato con #translated-app, non
   lo raggiunge. Su Hugo lo stila main.css; qui ne riportiamo le stesse regole
   (translated.com src/css/components/modal.css, typography.css h4, rtl.css),
   limitate a "body > .modal--flash" per non toccare altri .modal della pagina.
   Differenze volute: z-index sopra l'header fisso di Impreza (111) e blocco
   dello scroll solo mentre c'è questo modale (:has), perché is-modal-visible
   lo mettono anche login e "Give us a call", che oggi sul CMS non bloccano.
   Task Asana 1220061989219147. */

body.is-modal-visible:has(> .modal--flash) {
  overflow: hidden;
}

body > .modal--flash {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark-grey, #768190);
  text-align: center;
  line-height: 1.4;
}

body > .modal--flash:before {
  content: '';
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--modal-shadow, rgba(0, 0, 0, 0.4));
}

body > .modal--flash .modal__body {
  position: absolute;
  width: 100%;
  max-width: 400px;
  max-height: 100vh;
  overflow-y: auto;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  flex-direction: column;
  background-color: #ffffff;
  border-radius: 2px;
  box-shadow: 0 0 0 1px #abb3bd, 0 8px 12px rgba(0, 0, 0, 0.16);
  padding: 20px 0 40px;
}

body > .modal--flash .modal__content {
  max-width: 736px;
  max-height: none;
  overflow-y: auto;
  padding: 24px 40px;
}

body > .modal--flash h4 {
  color: var(--black, #000000);
  font-size: 24px;
  line-height: 1.33;
  font-weight: 500;
  margin: 20px auto;
  padding: 0;
}

body > .modal--flash .icon--modal {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--light-grey, #f2f5f7);
  display: block;
  margin: 10px auto 30px;
  position: relative;
}

body > .modal--flash .icon--modal:before {
  width: 32px;
  height: 32px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: block;
  background-repeat: no-repeat;
  background-size: contain;
  content: '';
}

body > .modal--flash .icon--check:before {
  background-image: url("data:image/svg+xml,%3Csvg width='24px' height='24px' viewBox='0 0 24 24' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg stroke='none' strokewidth='1' fill='%230055b8' fill-rule='evenodd'%3E%3Cpath d='M19.2928932,5.29289322 C19.6834175,4.90236893 20.3165825,4.90236893 20.7071068,5.29289322 C21.0976311,5.68341751 21.0976311,6.31658249 20.7071068,6.70710678 L9.70710678,17.7071068 C9.31658249,18.0976311 8.68341751,18.0976311 8.29289322,17.7071068 L3.29289322,12.7071068 C2.90236893,12.3165825 2.90236893,11.6834175 3.29289322,11.2928932 C3.68341751,10.9023689 4.31658249,10.9023689 4.70710678,11.2928932 L9,15.5857864 L19.2928932,5.29289322 Z' id='path-1'%3E%3C/path%3E%3C/g%3E%3C/svg%3E");
}

body > .modal--flash .icon--times:before {
  background-image: url("data:image/svg+xml,%3Csvg width='24px' height='24px' viewBox='0 0 24 24' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg stroke='none' strokeWidth='1' fill='%230055b8' fill-rule='evenodd'%3E%3Cpath d='M13.4142136,12 L18.7071068,17.2928932 C19.0976311,17.6834175 19.0976311,18.3165825 18.7071068,18.7071068 C18.3165825,19.0976311 17.6834175,19.0976311 17.2928932,18.7071068 L12,13.4142136 L6.70710678,18.7071068 C6.31658249,19.0976311 5.68341751,19.0976311 5.29289322,18.7071068 C4.90236893,18.3165825 4.90236893,17.6834175 5.29289322,17.2928932 L10.5857864,12 L5.29289322,6.70710678 C4.90236893,6.31658249 4.90236893,5.68341751 5.29289322,5.29289322 C5.68341751,4.90236893 6.31658249,4.90236893 6.70710678,5.29289322 L12,10.5857864 L17.2928932,5.29289322 C17.6834175,4.90236893 18.3165825,4.90236893 18.7071068,5.29289322 C19.0976311,5.68341751 19.0976311,6.31658249 18.7071068,6.70710678 L13.4142136,12 Z' id='path-1'%3E%3C/path%3E%3C/g%3E%3C/svg%3E");
}

body > .modal--flash .icon--date:before {
  background-image: url("data:image/svg+xml,%3Csvg width='24px' height='24px' viewBox='0 0 24 24' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg stroke='none' strokeWidth='1' fill='%230055b8' fill-rule='evenodd'%3E%3Cpath d='M20,9 L20,6 C20,5.44771525 19.5522847,5 19,5 L17,5 L17,6 C17,6.55228475 16.5522847,7 16,7 C15.4477153,7 15,6.55228475 15,6 L15,5 L9,5 L9,6 C9,6.55228475 8.55228475,7 8,7 C7.44771525,7 7,6.55228475 7,6 L7,5 L5,5 C4.44771525,5 4,5.44771525 4,6 L4,9 L20,9 Z M20,11 L4,11 L4,20 C4,20.5522847 4.44771525,21 5,21 L19,21 C19.5522847,21 20,20.5522847 20,20 L20,11 Z M9,3 L15,3 L15,2 C15,1.44771525 15.4477153,1 16,1 C16.5522847,1 17,1.44771525 17,2 L17,3 L19,3 C20.6568542,3 22,4.34314575 22,6 L22,20 C22,21.6568542 20.6568542,23 19,23 L5,23 C3.34314575,23 2,21.6568542 2,20 L2,6 C2,4.34314575 3.34314575,3 5,3 L7,3 L7,2 C7,1.44771525 7.44771525,1 8,1 C8.55228475,1 9,1.44771525 9,2 L9,3 Z' id='Combined-Shape' fill-rule='nonzero'%3E%3C/path%3E%3C/g%3E%3C/svg%3E");
}

body > .modal--flash .modal__header-close--always-visible {
  position: absolute;
  display: flex;
  top: 16px;
  right: 16px;
  width: 24px;
  height: 24px;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

body > .modal--flash .modal__header-close--always-visible:empty {
  background-repeat: no-repeat;
  background-position: center center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14px' height='14px' viewBox='0 0 14 14'%3E%3Cg stroke='none' stroke-width='1' fill='%23768190' fill-rule='evenodd'%3E%3Cg transform='translate(-5.000000, -5.000000)' fill-rule='nonzero'%3E%3Cpath d='M17.2928932,5.29289322 C17.6834175,4.90236893 18.3165825,4.90236893 18.7071068,5.29289322 C19.0976311,5.68341751 19.0976311,6.31658249 18.7071068,6.70710678 L6.70710678,18.7071068 C6.31658249,19.0976311 5.68341751,19.0976311 5.29289322,18.7071068 C4.90236893,18.3165825 4.90236893,17.6834175 5.29289322,17.2928932 L17.2928932,5.29289322 Z M5.29289322,6.70710678 C4.90236893,6.31658249 4.90236893,5.68341751 5.29289322,5.29289322 C5.68341751,4.90236893 6.31658249,4.90236893 6.70710678,5.29289322 L18.7071068,17.2928932 C19.0976311,17.6834175 19.0976311,18.3165825 18.7071068,18.7071068 C18.3165825,19.0976311 17.6834175,19.0976311 17.2928932,18.7071068 L5.29289322,6.70710678 Z'%3E%3C/path%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

html[dir='rtl'] body > .modal--flash .modal__header-close--always-visible {
  right: auto;
  left: 16px;
}

@media (max-width: 1399px) {
  body > .modal--flash h4 {
    font-size: 22px;
  }
}

@media (max-width: 575px) {
  body > .modal--flash h4 {
    font-size: 20px;
  }
}

@media screen and (max-width: 768px) {
  body > .modal--flash .modal__body {
    max-width: none;
    border-radius: 0;
    padding: 10px 0 20px;
  }
  body > .modal--flash .modal__content {
    height: calc(100vh - 112px);
    padding-left: 20px;
    padding-right: 20px;
  }
  body > .modal--flash h4 {
    margin: 15px auto;
  }
  body > .modal--flash .icon--modal {
    width: 56px;
    height: 56px;
    margin: 0 auto 15px;
  }
}

@media only screen and (min-device-width: 320px) and (max-device-width: 932px) and (orientation: landscape) {
  body > .modal--flash .modal__body {
    top: 0;
    bottom: 0;
  }
}
