/* ============================================
   ALMA Lease Now / Book a Tour Modal
   Brand: ALMA Student Communities
   Colours: Orange #F26B28, Blue #4A79BD, Mint #E1EECB, Latte #D2C2AF
   Fonts: Garage Gothic Bold (headings), Helvetica (body)
   ============================================ */

:root {
  --alma-orange: #F26B28;
  --alma-blue: #4A79BD;
  --alma-mint: #E1EECB;
  --alma-latte: #D2C2AF;
  --alma-black: #000000;
  --alma-white: #FFFFFF;
  --alma-font-headline: 'Garage Gothic Bold', 'Arial Black', Impact, sans-serif;
  --alma-font-body: Helvetica, Arial, sans-serif;
}

.alma-lease-overlay {
  position: fixed;
  inset: 0;
  z-index: 10080;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: max(1rem, env(safe-area-inset-top, 0px))
           max(1rem, env(safe-area-inset-right, 0px))
           max(1rem, env(safe-area-inset-bottom, 0px))
           max(1rem, env(safe-area-inset-left, 0px));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  animation: almaOverlayFadeIn 0.28s ease forwards;
}

@keyframes almaOverlayFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.alma-lease-dialog {
  position: relative;
  flex-shrink: 0;
  width: min(26.5rem, 100%);
  max-width: 100%;
  max-height: min(calc(100svh - 2rem), 32rem);
  margin: auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 1.375rem;
  box-shadow: 0 32px 72px rgba(0,0,0,0.14),
              0 12px 28px rgba(0,0,0,0.08),
              0 0 0 1px rgba(0,0,0,0.05);
  -webkit-font-smoothing: antialiased;
  animation: almaDialogEnter 0.38s cubic-bezier(0.22,1,0.36,1) forwards;
}

@keyframes almaDialogEnter {
  from { opacity: 0; transform: translateY(0.75rem) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Top accent bar — ALMA brand gradient */
.alma-lease-dialog::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    var(--alma-orange) 0%,
    var(--alma-blue) 50%,
    var(--alma-mint) 100%
  );
  z-index: 1;
  pointer-events: none;
}

.alma-lease-body {
  position: relative;
  padding: 2rem 1.75rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}

.alma-lease-close {
  position: absolute;
  top: max(0.75rem, calc(env(safe-area-inset-top, 0px) + 0.25rem));
  right: max(0.75rem, calc(env(safe-area-inset-right, 0px) + 0.25rem));
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.05);
  color: rgba(0,0,0,0.45);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s ease, color 0.2s ease;
}
.alma-lease-close:hover {
  background: rgba(0,0,0,0.09);
  color: rgba(0,0,0,0.65);
}
.alma-lease-close:focus-visible {
  outline: 2px solid var(--alma-blue);
  outline-offset: 2px;
}

.alma-lease-eyebrow {
  margin: 0;
  padding-right: 2.5rem;
  font-family: var(--alma-font-body);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.35;
  color: rgba(74,121,189,0.7);
}

.alma-lease-title {
  margin: 0;
  padding-right: 2.25rem;
  font-family: var(--alma-font-headline);
  font-size: clamp(1.375rem, 4vw, 1.625rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--alma-blue);
}

.alma-lease-context {
  margin: -0.25rem 0 0;
  font-family: var(--alma-font-body);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  color: rgba(0,0,0,0.5);
}

.alma-lease-description {
  margin: 0;
  font-family: var(--alma-font-body);
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.65;
  color: rgba(0,0,0,0.72);
  max-width: 36rem;
}

.alma-lease-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.25rem;
  padding-top: 0.25rem;
}

.alma-lease-btn-primary,
.alma-lease-btn-secondary {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  border-radius: 0.625rem;
  font-family: var(--alma-font-body);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.25;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease,
              box-shadow 0.2s ease,
              background 0.2s ease,
              border-color 0.2s ease,
              color 0.2s ease;
}
.alma-lease-btn-primary:active,
.alma-lease-btn-secondary:active {
  transform: scale(0.98);
}

.alma-lease-btn-primary {
  grid-column: 2;
  border: none;
  color: #FFFFFF;
  background: var(--alma-orange);
  box-shadow: 0 3px 12px rgba(242,107,40,0.45), 0 1px 3px rgba(242,107,40,0.3);
}
.alma-lease-btn-primary:hover {
  background: #D95E22;
  box-shadow: 0 5px 18px rgba(242,107,40,0.5), 0 2px 5px rgba(242,107,40,0.35);
}
.alma-lease-btn-primary:focus-visible {
  outline: 2px solid var(--alma-blue);
  outline-offset: 2px;
}

.alma-lease-btn-flex{
    display: flex;
    align-items: center;
    justify-content: center;	
}

.alma-lease-btn-secondary {
  grid-column: 1;
  border: 2px solid var(--alma-blue);
  color: #FFFFFF;
  background: var(--alma-blue);
  box-shadow: 0 3px 12px rgba(74,121,189,0.35), 0 1px 3px rgba(74,121,189,0.2);
}
.alma-lease-btn-secondary:hover {
  border-color: #3B6AAE;
  background: #3B6AAE;
  box-shadow: 0 5px 18px rgba(74,121,189,0.45), 0 2px 5px rgba(74,121,189,0.3);
}
.alma-lease-btn-secondary:focus-visible {
  outline: 2px solid var(--alma-blue);
  outline-offset: 2px;
}

@media (max-width: 28rem) {
  .alma-lease-body { padding: 1.75rem 1.25rem 1.5rem; }
  .alma-lease-actions { grid-template-columns: 1fr; }
  .alma-lease-btn-primary,
  .alma-lease-btn-secondary { grid-column: auto; }
  .alma-lease-btn-secondary { order: 1; }
  .alma-lease-btn-primary { order: 2; }
}

@media (prefers-reduced-motion: reduce) {
  .alma-lease-overlay,
  .alma-lease-dialog { animation: none; }
  .alma-lease-btn-primary:active,
  .alma-lease-btn-secondary:active { transform: none; }
}