/* =========================================================
REQUEST DEMO POPUP
Self-contained styles. All classes prefixed with `rd-` to
avoid collision with existing site CSS.
========================================================= */


/* =========================================================
TOKENS (scoped to popup)
========================================================= */

.rd-overlay{
  --rd-navy:        #1a1f3c;
  --rd-navy-deep:   #0f1429;
  --rd-gold:        #c9a84c;
  --rd-gold-soft:   #d8bd6e;
  --rd-gold-tint:   rgba(201, 168, 76, 0.12);
  --rd-cream:       #faf6ee;
  --rd-cream-edge:  #ece4d2;
  --rd-text:        #2a2d3a;
  --rd-muted:       #6b7280;
  --rd-border:      #e3e0d6;
  --rd-error:       #c0392b;
  --rd-success:     #1f8a4c;

  --rd-radius:      18px;
  --rd-radius-sm:   10px;

  --rd-shadow:      0 30px 80px rgba(15, 18, 36, 0.35),
                    0 12px 24px rgba(15, 18, 36, 0.18);

  --rd-font-serif:  'Cormorant Garamond', Georgia, serif;
  --rd-font-sans:   'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}


/* =========================================================
OVERLAY
========================================================= */

.rd-overlay{
  position: fixed;
  inset: 0;
  z-index: 99999;

  display: none;
  align-items: center;
  justify-content: center;

  padding: 20px;

  background: rgba(15, 18, 36, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  opacity: 0;
  transition: opacity .25s ease;

  font-family: var(--rd-font-sans);
}

.rd-overlay.is-open{
  display: flex;
  opacity: 1;
}

/* lock body scroll when popup open */
body.rd-lock{ overflow: hidden; }


/* =========================================================
MODAL
========================================================= */

.rd-modal{
  position: relative;

  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 40px);

  background: var(--rd-cream);
  border-radius: var(--rd-radius);
  box-shadow: var(--rd-shadow);

  overflow: hidden;

  transform: translateY(20px) scale(0.98);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}

.rd-overlay.is-open .rd-modal{
  transform: translateY(0) scale(1);
}

/* gold accent bar at top */
.rd-modal::before{
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--rd-gold), var(--rd-gold-soft), var(--rd-gold));
}


/* =========================================================
INNER (scrollable region)
========================================================= */

.rd-modal-inner{
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 44px 40px 36px;
}


/* =========================================================
CLOSE BUTTON
========================================================= */

.rd-close{
  position: absolute;
  top: 14px;
  right: 14px;

  width: 36px;
  height: 36px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: transparent;
  border: 0;
  border-radius: 50%;

  font-size: 22px;
  line-height: 1;
  color: var(--rd-muted);

  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.rd-close:hover{
  background: rgba(15, 18, 36, 0.06);
  color: var(--rd-navy);
}


/* =========================================================
HEAD: gold rule + title + subtitle
========================================================= */

.rd-gold-rule{
  width: 44px;
  height: 3px;
  background: var(--rd-gold);
  border-radius: 2px;
  margin-bottom: 18px;
}

.rd-title{
  font-family: var(--rd-font-serif);
  font-weight: 600;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.1;
  color: var(--rd-navy);
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}

.rd-subtitle{
  font-size: 0.95rem;
  color: var(--rd-muted);
  margin: 0 0 26px;
  line-height: 1.5;
}


/* =========================================================
FORM
========================================================= */

.rd-form{
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rd-field{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rd-field label{
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--rd-navy);
}

.rd-field label span{
  color: var(--rd-gold);
}

.rd-field input{
  width: 100%;
  height: 46px;
  padding: 0 14px;

  font-family: var(--rd-font-sans);
  font-size: 0.95rem;
  color: var(--rd-text);

  background: #fff;
  border: 1px solid var(--rd-border);
  border-radius: var(--rd-radius-sm);

  transition: border-color .15s ease, box-shadow .15s ease;
}

.rd-field input::placeholder{
  color: #b8b4ab;
}

.rd-field input:focus{
  outline: none;
  border-color: var(--rd-gold);
  box-shadow: 0 0 0 3px var(--rd-gold-tint);
}

.rd-field.has-error input{
  border-color: var(--rd-error);
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.10);
}

.rd-error{
  display: none;
  font-size: 0.8rem;
  color: var(--rd-error);
  margin-top: 2px;
}

.rd-field.has-error .rd-error{
  display: block;
}


/* =========================================================
HONEYPOT
========================================================= */

.rd-hp{
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}


/* =========================================================
SUBMIT
========================================================= */

.rd-submit{
  margin-top: 8px;

  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  width: 100%;
  height: 50px;
  padding: 0 24px;

  font-family: var(--rd-font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #fff;

  background: var(--rd-navy);
  border: 0;
  border-radius: var(--rd-radius-sm);

  cursor: pointer;
  transition: background .2s ease, transform .15s ease;
}

.rd-submit:hover{
  background: var(--rd-navy-deep);
  transform: translateY(-1px);
}

.rd-submit:active{
  transform: translateY(0);
}

.rd-submit:disabled{
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.rd-submit.is-loading .rd-submit-text{ visibility: hidden; }
.rd-submit.is-loading .rd-spinner{ display: block; }

.rd-spinner{
  display: none;
  position: absolute;
  width: 18px;
  height: 18px;

  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;

  animation: rd-spin .7s linear infinite;
}

@keyframes rd-spin{
  to{ transform: rotate(360deg); }
}


/* =========================================================
PRIVACY NOTE
========================================================= */

.rd-privacy{
  text-align: center;
  font-size: 0.78rem;
  color: var(--rd-muted);
  margin: 14px 0 0;
}


/* =========================================================
SUCCESS VIEW
========================================================= */

.rd-success-view{
  text-align: center;
  padding: 8px 0 4px;
}

.rd-success-icon{
  width: 64px;
  height: 64px;
  margin: 0 auto 22px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: rgba(31, 138, 76, 0.12);
  border-radius: 50%;
  color: var(--rd-success);
}

.rd-success-icon svg{
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rd-success-view .rd-title,
.rd-success-view .rd-subtitle{
  text-align: center;
}

.rd-success-view .rd-subtitle{
  margin-bottom: 24px;
}

#rdSuccessEmail{
  color: var(--rd-navy);
  font-weight: 600;
  word-break: break-all;
}

.rd-close-btn{
  max-width: 220px;
  margin: 0 auto;
}


/* =========================================================
RESPONSIVE
========================================================= */

@media (max-width: 540px){

  .rd-overlay{
    padding: 0;
    align-items: flex-end;
  }

  .rd-modal{
    max-width: 100%;
    max-height: 92vh;
    border-radius: var(--rd-radius) var(--rd-radius) 0 0;
    transform: translateY(40px);
  }

  .rd-overlay.is-open .rd-modal{
    transform: translateY(0);
  }

  .rd-modal-inner{
    padding: 36px 24px 28px;
    max-height: 92vh;
  }

  .rd-title{
    font-size: 1.65rem;
  }

}