/* =============================================================
   REVOLUTION MEDICINES – MI REQUEST FORM
   Host-page styles  +  Cognito Forms CSS overrides
   =============================================================

   COLOUR TOKENS (from the legacy page)
   --rm-teal-light:    #1e6b5c   rgb(30,107,92)   banner bg
   --rm-teal-dark:     #0e4343   rgb(14,67,67)     heading band / btn bg
   --rm-submit-green:  #56716c   rgb(86,113,108)   submit button
   --rm-grey-bg:       #f3f3f3   rgb(243,243,243)  form area
   --rm-body-bg:       #f5f5f5   rgb(245,245,245)  page bg
   --rm-label:         #6b686c   rgb(107,104,108)  label text
   --rm-input-text:    #555555   rgb(85,85,85)     input text
   --rm-input-border:  #cfcfcf   rgb(207,207,207)  input borders
   --rm-red:           #d0021b   rgb(208,2,27)     required asterisk
   --rm-white:         #ffffff
   ============================================================= */

/* ---------- RESET / BASE ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  color: #333333;
  background: #f5f5f5;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }


/* =============================================
   1.  TOP HEADER BAR
   ============================================= */
.rm-header {
  background: #ffffff;
  padding: 10px 0;
  box-shadow: 0 1px 1px rgba(0,0,0,.1), 0 1px 1px rgba(0,0,0,.1);
  position: relative;
  z-index: 100;
}

.rm-container {
  max-width: 1170px;
  margin: 0 auto;
  padding: 0 15px;
}

.rm-logo {
  width: 250px;
  height: auto;
}

/* =============================================
   2.  TEAL BANNER  +  CLIPBOARD ICON
   ============================================= */
.rm-banner {
  background: #1e6b5c;                 /* lighter teal — full width        */
  width: 100%;
  position: relative;
}

.rm-banner__inner {
  background: #0e4343;                 /* darker teal — 70 % centered band */
  width: 70%;
  margin: 0 auto;
  padding: 22px 9%;
  text-align: center;
  position: relative;
}

/* Clipboard icon — positioned as a ::after pseudo-element
   just like the legacy page.                                              */
.rm-banner__inner::after {
  content: "";
  position: absolute;
  left: 20px;
  top: 26px;
  width: 90px;
  height: 90px;
  /*
    IMPORTANT: Replace this URL with a locally-hosted copy of request-icon.png.
    The current URL points to the legacy platform's asset.
  */
  background: url("https://mi-ssp.scimaxmi.com/Content/DTG-GYG/images/request-icon.png")
              left top / contain no-repeat;
  z-index: 10;
}

.rm-banner__title {
  font-size: 30px;
  font-weight: 400;
  color: #ffffff;
  line-height: 33px;
}


/* =============================================
   3.  FORM AREA (light-grey container)
   ============================================= */
.rm-form-area {
  width: 60%;
  margin: 0 auto;
  padding: 40px 139px 88px;
  background: #f3f3f3;
  position: relative;
}

.rm-required-note {
  text-align: center;
  font-size: 14px;
  font-weight: 400;
  color: #d0021b;
  padding: 10px 0 30px;
}

.rm-asterisk {
  color: #d0021b;
}

.rm-ae-notice {
  font-size: 14px;
  color: #6b686c;
  margin-top: 24px;
  line-height: 1.5;
}


/* =============================================
   4.  FOOTER
   ============================================= */
.rm-footer {
  background: #ffffff;
  box-shadow: 0 3px 6px rgba(0,0,0,.16), 0 3px 6px rgba(0,0,0,.23);
  padding: 0;
}

.rm-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}

.rm-footer__spacer { flex: 1; }

.rm-footer__logo {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 0;
  width: 130px;
  color: #b1b3b4;
}
.rm-footer__logo:hover { color: #b1b3b4; }

.rm-footer__powered-by {
  font-size: 10px;
  color: #b1b3b4;
  white-space: nowrap;
}

.rm-footer__scimax {
  width: 83px;
  height: auto;
}


/* =============================================
   5.  PRIVACY / COOKIE BAR
   ============================================= */
.rm-privacy-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 9999;
  box-shadow: 0 -1px 4px rgba(0,0,0,.1);
}

.rm-privacy-bar__text {
  font-size: 13px;
  color: #6b686c;
  margin: 0;
  flex: 1;
}

.rm-privacy-bar__text a {
  color: #6b686c;
  text-decoration: underline;
}

.rm-privacy-bar__close {
  background: #0e4343;
  color: #ffffff;
  border: none;
  padding: 5px 10px;
  font-size: 14px;
  cursor: pointer;
  margin-left: 20px;
  flex-shrink: 0;
}


/* =============================================
   6.  RESPONSIVE OVERRIDES (host page)
   ============================================= */
@media (max-width: 1200px) {
  .rm-form-area {
    width: 75%;
    padding: 30px 80px 60px;
  }
}

@media (max-width: 992px) {
  .rm-form-area {
    width: 90%;
    padding: 25px 40px 50px;
  }
  .rm-banner__inner {
    width: 85%;
  }
}

@media (max-width: 768px) {
  .rm-form-area {
    width: 100%;
    padding: 20px 20px 40px;
  }
  .rm-banner__inner {
    width: 100%;
    padding: 18px 20px;
  }
  .rm-banner__inner::after {
    display: none;               /* hide icon on small screens */
  }
  .rm-banner__title {
    font-size: 22px;
  }
}



/* =============================================================
   =============================================================
   COGNITO FORMS — CSS OVERRIDES
   =============================================================
   These rules use #revmed as the scoping ID (from the wrapper
   div around the embed code). This gives enough specificity to
   override Cognito's default styles without needing !important
   in most cases.
   =============================================================
   ============================================================= */

/* ---------- CSS VARIABLES (applied to the Cognito form root) ---------- */
#revmed .cog-cognito {
  --font-family:                    'Roboto', sans-serif;
  --header__font-family:            'Roboto', sans-serif;
  --label__font-family:             'Roboto', sans-serif;
  --label__font-size:               16px;
  --label__font-weight:             400;
  --label__color:                   #6b686c;

  --input__background-color:        #ffffff;
  --input__border-color:            #cfcfcf;
  --input__border-width:            1px;
  --input__color:                   #555555;
  --input__padding-v:               6px;
  --input__padding-h:               12px;
  --input__border-radius:           3px;

  --border-radius:                  3px;
  --button__border-radius:          100%;  /* circular submit btn */

  --negative:                       #d0021b;   /* error / required asterisk */
  --negative-reverse:               #ffffff;

  --highlight:                      #1e6b5c;   /* focus ring colour */

  --gutter:                         29px;      /* mirrors legacy .form-group margin-bottom */

  --form__margins:                  0;         /* form sits flush in the container */
}


/* ---------- HIDE THE COGNITO FORM TITLE ----------
   The title "Medical Information Request Form" is already
   on the host page banner — hide the one Cognito generates.     */
#revmed .cog-header {
  display: none !important;
}


/* ---------- LABELS ---------- */
#revmed .cog-label {
  font-family: 'Roboto', sans-serif !important;
  font-size:   16px                 !important;
  font-weight: 400                  !important;
  color:       #6b686c              !important;
  line-height: 1.5                  !important;
}


/* ---------- TEXT INPUTS / SELECTS / TEXTAREAS ---------- */
#revmed .el-input__inner,
#revmed .el-select__inner,
#revmed .el-textarea__inner {
  font-family:      'Roboto', sans-serif !important;
  font-size:        16px                 !important;
  color:            #555555              !important;
  background-color: #ffffff              !important;
  border:           1px solid #cfcfcf    !important;
  border-radius:    3px                  !important;
  height:           37px                 !important;      /* matches legacy 36.85px */
  line-height:      37px                 !important;
}

#revmed .el-textarea__inner {
  height: auto     !important;
  min-height: 105px !important;    /* ~4 rows, matching legacy textarea */
  line-height: 1.5 !important;
  resize: none     !important;
}


/* ---------- TWO-COLUMN LAYOUT ----------
   The legacy form uses Bootstrap's 6/6 grid. Cognito forms
   use "sections" and "section-groups" for layout. If your
   Cognito form is built with fields in 2-column sections,
   these rules ensure they display side-by-side.                  */
#revmed .cog-section-group {
  display:               grid             !important;
  grid-template-columns: repeat(2, 1fr)   !important;
  gap:                   0 20px           !important;  /* row-gap 0, column-gap 20px */
}

@media (max-width: 768px) {
  #revmed .cog-section-group {
    grid-template-columns: 1fr !important;
  }
}

/* ---------- FIELD SPACING ---------- */
#revmed .cog-field {
  margin-bottom: 15px !important;   /* tightened from 29px */
}

/* ---------- SUBMIT BUTTON ----------
   The legacy page uses a 120 × 120 px circle, dark green/teal,
   positioned to the right.                                       */
#revmed .cog-button--primary,
#revmed .cog-button--submit {
  display:          flex          !important;
  align-items:      center        !important;
  justify-content:  center        !important;
  width:            120px         !important;
  height:           120px         !important;
  border-radius:    100%          !important;     /* perfect circle  */
  background-color: #56716c       !important;     /* rgb(86,113,108) */
  color:            #ffffff       !important;
  font-family:      'Roboto', sans-serif !important;
  font-size:        21px          !important;
  font-weight:      400           !important;
  border:           none          !important;
  padding:          0             !important;
  box-shadow:       0 3px 6px rgba(0,0,0,.16),
                    0 3px 6px rgba(0,0,0,.23) !important;
  transition:       background-color .3s, box-shadow .3s !important;
  cursor:           pointer       !important;
}

#revmed .cog-button--primary:hover,
#revmed .cog-button--submit:hover {
  background-color: #3d5652 !important;   /* slightly darker on hover */
}

/* Right-align the navigation row (which holds the submit button) */
#revmed .cog-page__navigation {
  justify-content: flex-end !important;
  margin-right:    -30px    !important;   /* mirror legacy negative offset */
}

/* ---------- ERROR MESSAGES ---------- */
#revmed .cog-error-message {
  font-family: 'Roboto', sans-serif !important;
  font-size:   13px                 !important;
}


/* ---------- PLACEHOLDER TEXT ---------- */
#revmed .el-input__inner::placeholder,
#revmed .el-textarea__inner::placeholder {
  color:   #999999 !important;
  opacity: 1       !important;
}


/* ---------- CHOICE / DROPDOWN FIELDS ----------
   Make Cognito selects (dropdowns) look like the legacy
   <select> controls.                                             */
#revmed .cog-choice--dropdown .el-input__inner {
  appearance:       none  !important;
  -webkit-appearance: none !important;
}


/* ---------- FORM SECTION BACKGROUND ----------
   Keep sections transparent so the host page's #f3f3f3
   background shows through.                                      */
/*#revmed .cog-section {
  background: transparent !important;
  padding: 0 !important;
}*/

/* ---------- SECTION SPACING ---------- */
#revmed .cog-section {
  background: transparent !important;
  padding: 0 !important;
  margin-bottom: 0 !important;
}

/* ---------- CONTENT FIELD (AE safety notice) ---------- */
#revmed .cog-content,
#revmed .cog-content p,
#revmed .cog-content span,
#revmed .cog-content div {
  font-family:  'Roboto', sans-serif !important;
  font-size:    16px                 !important;
  font-weight:  400                  !important;
  font-style:   normal               !important;   /* removes the italic */
  color:        #6b686c              !important;
  line-height:  1.5                  !important;
}

/* ---------- PREVENT LAYOUT COLLAPSE DURING FORM LOAD ---------- */
.rm-form-area {
  /* ...your existing styles... */
  min-height: 900px;   /* approximate height of the fully-loaded form */
}

/* ---------- STICKY FOOTER (always at bottom of page) ---------- */
html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.rm-header,
.rm-banner,
.rm-privacy-bar {
  flex-shrink: 0;
}

.rm-form-area {
  flex: 1 0 auto;    /* grows to fill available space */
  /* ...keep your existing width, margin, padding, background... */
}

.rm-footer {
  flex-shrink: 0;    /* footer never shrinks, stays at bottom */
}