/* Universal rack modal — Desktop composition */

.rsn-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.rsn-modal[hidden] {
  /* overridden by motion.css for animated open; keep fallback */
}

.rsn-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 19, 33, 0.72);
}

.rsn-modal__dialog {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(1104px, 100%);
  height: min(820px, calc(100vh - 64px));
  max-height: calc(100vh - 64px);
  background: var(--rsn-white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(8, 19, 33, 0.28);
}

.rsn-modal__media {
  flex: 0 0 520px;
  width: 520px;
  background: #dce5ee;
}

.rsn-modal__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rsn-modal__content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  padding: 44px;
  overflow: auto;
}

.rsn-modal__top {
  display: flex;
  justify-content: flex-end;
  height: 40px;
  align-items: center;
}

.rsn-modal__close {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #17202b;
  background: #f2f6fa;
  border: none;
  cursor: pointer;
}

.rsn-modal__close:hover {
  background: #e5ebf1;
}

.rsn-modal__intro {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rsn-modal__eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--rsn-rack-red);
}

.rsn-modal__title {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.15;
  color: #17202b;
}

.rsn-modal__lead {
  font-size: 15px;
  line-height: 1.5;
  color: #536476;
}

.rsn-modal__features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.rsn-modal__feature-title {
  font-size: 16px;
  font-weight: 600;
  color: #17202b;
  margin-bottom: 10px;
}

.rsn-modal__feature-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rsn-modal__feature-list li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.4;
  color: #465463;
}

.rsn-modal__feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rsn-corporate-blue);
}

.rsn-modal__facts {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rsn-modal__facts-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #73808d;
}

.rsn-modal__facts-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.rsn-modal__fact {
  font-size: 12px;
  font-weight: 600;
  color: #17202b;
}

.rsn-modal__cta-zone {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--rsn-border);
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.rsn-modal__cta {
  min-height: 52px;
  height: 52px;
  padding-inline: 22px;
  font-size: 15px;
}

.rsn-modal__back {
  font-size: 14px;
  font-weight: 600;
  color: var(--rsn-corporate-blue);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.rsn-modal__back:hover {
  color: var(--rsn-blue-hover);
}

body.rsn-modal-open {
  overflow: hidden;
}

@media (max-width: 1023px) {
  .rsn-modal {
    padding: 0;
    align-items: stretch;
  }

  .rsn-modal__dialog {
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
    flex-direction: column;
  }

  .rsn-modal__media {
    flex: 0 0 220px;
    width: 100%;
    height: 220px;
  }

  .rsn-modal__content {
    padding: 20px 16px 24px;
  }

  .rsn-modal__title {
    font-size: 26px;
  }

  .rsn-modal__features {
    grid-template-columns: 1fr;
  }

  .rsn-modal__cta-zone {
    position: sticky;
    bottom: 0;
    background: var(--rsn-white);
    width: 100%;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .rsn-modal__cta {
    width: 100%;
  }
}
