/*  PULLED FROM ATO  */


/* MODAL CSS */
/* --- 1. Base Modal Overlay --- */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  overflow: auto;
}

.modal-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(135deg, #521d62 0%, #260054 100%);
  background: #16121b;
  /* background-image: linear-gradient(135deg, #330072 0%, #330072 100%); */
  opacity: .6;
}

.modal__background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(23, 27, 38, .3);
}

/* --- 2. Content Containers & Transitions --- */
.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 95vw;
  max-width: 680px;
  margin: 25px auto;
  overflow: hidden;
  background: #fff;
  border-radius: 14px;
  transform: translateY(20px);
  transition: .5s;
}

.modal__content {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 90vw;
  max-width: 600px;
  height: 100%;
  height: fit-content;
  max-height: 90vh;
  margin: auto;
  overflow: auto;
  background: #fff;
  border-radius: 5px;
}

.modal-content.first {
  margin-bottom: 14px;
}

.modal-content.last {
  margin-top: 0;
}

.modal-content-transform {
  transform: translateY(0) !important;
}

/* --- 3. Header & Navigation --- */
.modal-header {
  z-index: 1;
  padding: 20px 0 16px;
  border-bottom: 2px solid #dfdfdf;
}

.modal-header-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  /* background: linear-gradient(0deg, rgba(235, 224, 245, 0) 75%, rgba(51, 0, 114, .08) 100%); */
}

.modal-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 25px;
}

.modal-header-content .title {
  margin: 0;
  color: #330072;
}

.modal-header .close {
  display: inline-block;
  width: 30px;
  height: 30px;
  min-width: 30px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #fff;
  color: #330072;
  font-size: 25px;
  transition: 150ms;
  transform: translateY(-1px);
}

.modal-header .close:focus,
.modal-header .close:hover {
  background: #330072;
  color: #fff;
  text-decoration: none;
}

.modal-header .close i {
  position: relative;
  top: 1.5px;
}

/* --- 4. Body Content --- */
.modal-body {
  display: flex;
  flex-direction: column;
  padding: 30px 25px;
  overflow: hidden;
  overflow-y: auto;
}

.modal-content.last .modal-body {
  padding: 16px 25px;
}

.modal-body .title {
  margin: 0;
  color: var(--brand-purple);
}

/* --- 5. Footer & Links --- */
.modal-footer {
  position: relative;
  z-index: 1;
  padding: 20px 0 16px;
  border-top: 2px solid var(--divider-color-purple);
}

.modal-footer-content {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 25px;
}

.modal-footer-content .link {
  position: relative;
  display: inline-block;
  margin: 0;
  padding: 0 0 10px 0;
  text-decoration: none;
}

.modal-footer-content .link::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  border-bottom: 2px solid;
  opacity: 1;
  transform: scaleX(1);
  transform-origin: bottom left;
  transition: transform 350ms cubic-bezier(.5, 0, 0, 1);
}

.modal-footer-content .link::after {
  content: "\f061";
  display: inline-block;
  margin-left: .8em;
  font-family: "Font Awesome 6 Pro";
  font-size: .9em;
  font-weight: 400;
  transform: translateX(0);
  transition: transform 350ms cubic-bezier(.5, 0, 0, 1);
}

.modal-footer-content .link:focus,
.modal-footer-content .link:hover {
  padding-right: .8em;
}

.modal-footer-content .link:focus:before,
.modal-footer-content .link:hover:before {
  transform: scaleX(0);
  transform-origin: bottom right;
}

.modal-footer-content .link:focus:after,
.modal-footer-content .link:hover:after {
  transform: translateX(.8em);
}

/* --- 6. Special Variations (Programs & Emergency) --- */
.modal-programs .modal-body .title.margin {
  margin-bottom: .75em;
}

.modal-programs .modal-body .title-filter {
  color: var(--brand-purple);
  font-family: CallunaSans-Bold, sans-serif;
}

.modal-programs .modal-body .degree {
  margin-top: 0;
  margin-bottom: .5em;
}

.modal-programs .modal-body .related-programs .title {
  margin: 0 0 6px;
  color: var(--brand-purple);
  font-family: CallunaSans-Bold, sans-serif;
  font-size: 1rem;
}

.modal-programs .modal-footer .programs-filters-reset {
  margin: 0 1.5em 0 0;
}

/* Emergency Specifics */
[data-modal=emergency_response] .modal__content .heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  background: #f5f5f5;
}

[data-modal=emergency_response] .modal__content .heading h2 {
  margin: 0;
  font-weight: 700;
  text-transform: none;
}

[data-modal=emergency_response] .modal__content .heading h2 i {
  margin-right: 5px;
  color: #cf3c3f;
}

[data-modal=emergency_response] .modal__content .heading .close {
  width: auto;
  margin: 0 0 0 10px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: #330072;
}

[data-modal=emergency_response] .modal__content .heading .close i {
  width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  vertical-align: bottom;
  font-weight: 400;
  color: #fff;
  transform: translateY(4%);
}

[data-modal=emergency_response] .modal__content .content {
  padding: 20px;
}

[data-modal=emergency_response] .modal__content .button {
  float: right;
  margin: 20px;
  padding: 10px 24px;
  border: none;
  border-radius: 4px;
  background: #330072;
  color: #fff;
  text-decoration: none;
  font-weight: 400;
}