
/* --------------- START -- Svenn Contact Modals --------------- */

/* Modal container */
.svenn-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

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

/* Background overlay */
.svenn-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

/* Modal panel */
.svenn-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 680px;
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
  box-sizing: border-box;
  padding: clamp(28px, 5vw, 56px);
  background: #FFFFFF;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.15);
}

/* Modal title */
.svenn-modal__title {
  margin: 0 40px 20px 0 !important;
  font-family: var(--font-heading, "Instrument Serif", serif) !important;
  font-size: clamp(16px, 2vw, 24px) !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
  text-transform: none !important;
}

/* Modal content */
.svenn-modal__content {
  width: 100%;
  font-family: var(--font-body, "Urbanist", sans-serif);
}

/* --------------- START -- Modal Close Button --------------- */

.svenn-modal .svenn-modal__close,
.svenn-modal .svenn-modal__close:hover,
.svenn-modal .svenn-modal__close:focus,
.svenn-modal .svenn-modal__close:active {
  position: absolute !important;
  top: 20px;
  right: 20px;
  z-index: 2;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;

  margin: 0 !important;
  padding: 0 !important;

  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;

  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;

  color: var(--color-neutral-800, #1D1D1B) !important;

  font-family: Arial, sans-serif !important;
  font-size: 28px !important;
  font-weight: 400 !important;
  line-height: 1 !important;

  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

/* Remove CMSMasters overlays */
.svenn-modal .svenn-modal__close::before,
.svenn-modal .svenn-modal__close::after {
  content: none !important;
  display: none !important;
}

/* X icon */
.svenn-modal .svenn-modal__close span {
  display: block;
  color: inherit !important;
  font-family: Arial, sans-serif !important;
  font-size: 28px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
}

/* Hover */
.svenn-modal .svenn-modal__close:hover {
  opacity: 0.6;
}

/* Keyboard focus */
.svenn-modal .svenn-modal__close:focus-visible {
  outline: 2px solid var(--color-brand-01-500, #10C4BD) !important;
  outline-offset: 2px;
}

/* --------------- END -- Modal Close Button --------------- */


/* --------------- START -- Modal Form Layout --------------- */

/* Override Contact page's 75% form width */
.svenn-modal .svenn-form .form-column .wpcf7 {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Prevent horizontal overflow */
.svenn-modal .wpcf7,
.svenn-modal .wpcf7 form {
  max-width: 100%;
}

.svenn-modal .wpcf7-form-control-wrap {
  max-width: 100%;
}

/* --------------- END -- Modal Form Layout --------------- */


/* Prevent background scrolling */
body.svenn-modal-open {
  overflow: hidden;
}


/* --------------- START -- Modal Responsive --------------- */

@media (max-width: 767px) {

  .svenn-modal {
    padding: 12px;
  }

  .svenn-modal__panel {
    max-height: calc(100dvh - 24px);
    padding: 48px 24px 28px;
  }

  .svenn-modal .svenn-modal__close {
    top: 10px;
    right: 10px;
  }

  .svenn-modal__title {
    margin-bottom: 16px !important;
  }

}

/* --------------- END -- Modal Responsive --------------- */

/* --------------- END -- Svenn Contact Modals --------------- */
