/* ROCI membership / registration styling */

.membership-hero{
  position:relative;
  overflow:hidden;
  padding:112px 0 78px;
  background:linear-gradient(135deg,#081a28 0%,#0b2637 58%,#07131d 100%);
  border-bottom:1px solid var(--line);
}
.membership-hero::before{
  content:"";
  position:absolute;
  inset:0;
  background:radial-gradient(circle at 78% 24%,rgba(255,36,56,.10),transparent 26%),linear-gradient(90deg,rgba(5,13,21,.18),transparent 65%);
  pointer-events:none;
}
.membership-hero .container{position:relative;z-index:1}
.membership-hero h1{
  margin-top:16px;
  color:var(--white) !important;
  max-width:900px;
}
.membership-hero p{
  margin:22px 0 0;
  max-width:760px;
  color:var(--soft);
  font-size:18px;
  line-height:1.6;
}

.membership-app{max-width:1080px;margin:0 auto}
.membership-card{
  background:#fff;
  color:#06111b;
  border:1px solid rgba(6,17,27,.12);
  border-radius:var(--radius);
  padding:42px;
  box-shadow:0 24px 70px rgba(0,0,0,.20);
}
.membership-card > .kicker{color:var(--red)}
.membership-card h2{
  margin-top:10px;
  color:#06111b;
  font-size:clamp(34px,4vw,54px);
}
.membership-card > .membership-muted{
  margin:14px 0 28px;
  max-width:720px;
  color:#5b6a75;
  font-size:15px;
}

/* Participant and registration choices */
.membership-choice{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.membership-choice label{
  min-height:76px;
  box-sizing:border-box;
  padding:18px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  border:1px solid #cbd3d8;
  border-radius:6px;
  background:#fff;
  color:#14232d;
  cursor:pointer;
  transition:border-color .15s ease,background .15s ease,box-shadow .15s ease;
}
.membership-choice label:hover{
  border-color:#8d9ba4;
  background:#f8fafb;
}
.membership-choice label:has(input:checked){
  border:2px solid var(--red);
  padding:17px 19px;
  background:#fff8f9;
  box-shadow:0 6px 18px rgba(255,36,56,.08);
}
.membership-choice label span{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:800;
  line-height:1.35;
}
.membership-choice label strong{
  color:#06111b;
  font-size:16px;
  white-space:nowrap;
}
.membership-choice input{
  width:17px;
  height:17px;
  margin:0;
  accent-color:var(--red);
  flex:0 0 auto;
}

.membership-card hr{
  border:0;
  border-top:1px solid #dce2e6;
  margin:30px 0 18px;
}


/* Logical registration sections */
.form-section{
  margin-top:30px;
  padding-top:28px;
  border-top:1px solid #dce2e6;
}
.form-section:first-of-type{margin-top:28px;padding-top:0;border-top:0}
.form-section-heading{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:18px;
  margin-bottom:16px;
}
.form-section-title{
  color:#06111b;
  font-size:17px;
  font-weight:900;
  letter-spacing:.01em;
}
.form-section-help{
  color:#687781;
  font-size:13px;
  line-height:1.4;
  text-align:right;
}
.form-section .membership-grid{margin-top:0}
.form-section .membership-choice{margin-top:0}
.launch-field{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:18px;
  font-weight:800;
  font-size:13px;
  color:#172731;
}

/* Form fields */
.membership-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:22px 18px;
  margin-top:28px;
}
.membership-grid label,
.membership-card > form > label{
  display:flex;
  flex-direction:column;
  gap:8px;
  font-weight:800;
  font-size:13px;
  line-height:1.3;
  color:#172731;
}
.membership-grid .full{grid-column:1/-1}
.membership-card input:not([type="radio"]):not([type="checkbox"]),
.membership-card select,
.membership-card textarea{
  width:100%;
  min-height:48px;
  box-sizing:border-box;
  border:1px solid #c8d0d5;
  border-radius:4px;
  padding:12px 14px;
  background:#fff;
  color:#06111b;
  outline:none;
}
.membership-card input:not([type="radio"]):not([type="checkbox"]):focus,
.membership-card select:focus,
.membership-card textarea:focus{
  border-color:#7b8992;
  box-shadow:0 0 0 3px rgba(255,36,56,.10);
}

/* Launch selector */
.membership-card > form > label[style*="margin-top"]{
  margin-top:24px !important;
}

/* Required agreement */
.membership-card .check{
  flex-direction:row;
  align-items:flex-start;
  gap:11px;
  padding:18px;
  border:1px solid #d5dce0;
  border-radius:6px;
  background:#f7f9fa;
  font-weight:700;
  line-height:1.55;
}
.membership-card .check input[type="checkbox"]{
  width:18px;
  height:18px;
  margin:2px 0 0;
  flex:0 0 auto;
  accent-color:var(--red);
}

/* Senior annual auto-renew choice */
.auto-renew-check{
  display:flex !important;
  flex-direction:row !important;
  align-items:flex-start !important;
  gap:11px;
  box-sizing:border-box;
  width:100%;
  margin-top:18px;
  padding:18px;
  border:1px solid #d5dce0;
  border-radius:6px;
  background:#f7f9fa;
  color:#172731;
  font-family:inherit;
  font-size:13px !important;
  font-weight:700 !important;
  line-height:1.55 !important;
  cursor:pointer;
}
.auto-renew-check input[type="checkbox"]{
  width:18px !important;
  height:18px !important;
  min-width:18px;
  min-height:18px;
  margin:2px 0 0 !important;
  flex:0 0 18px;
  accent-color:var(--red);
}
.auto-renew-check span{
  display:block;
  flex:1 1 auto;
  min-width:0;
  font:inherit;
  color:inherit;
}
.mini-button{
  margin-left:auto;
  flex:0 0 auto;
  border:1px solid #9aa7af;
  border-radius:4px;
  background:#fff;
  color:#172731;
  padding:9px 12px;
  font-weight:800;
  font-size:12px;
  cursor:pointer;
}
.mini-button:hover{border-color:#172731;background:#f3f5f7}

.membership-actions{
  display:flex;
  align-items:center;
  gap:16px;
  flex-wrap:wrap;
  margin-top:28px !important;
  padding-top:24px;
  border-top:1px solid #dce2e6;
}
.membership-actions .membership-muted{color:#687781}

.membership-error,.membership-success{
  padding:13px 15px;
  margin-top:16px;
  border-radius:4px;
}
.membership-error{background:#fff0f1;color:#9b1c28;border:1px solid #f0b8bd}
.membership-success{background:#eef8f0;color:#245c2d;border:1px solid #b9ddbf}
.membership-muted{color:#65747d;font-size:14px}
.membership-loading{padding:30px;text-align:center;color:#9eafbc}

/* Agreement modal */
.agreement-modal{position:fixed;inset:0;z-index:1000}
.agreement-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.68)}
.agreement-dialog{
  position:relative;
  max-width:820px;
  max-height:86vh;
  margin:7vh auto;
  background:#fff;
  color:#06111b;
  padding:34px;
  box-shadow:0 30px 80px rgba(0,0,0,.38);
  display:flex;
  flex-direction:column;
  gap:18px;
  border-radius:6px;
}
.agreement-dialog h2{color:#06111b}
.agreement-scroll{
  overflow:auto;
  border:1px solid #d4dade;
  padding:22px;
  line-height:1.65;
  color:#26343d;
}
.agreement-close{
  position:absolute;
  right:14px;
  top:8px;
  border:0;
  background:transparent;
  color:#06111b;
  font-size:30px;
  cursor:pointer;
}

@media(max-width:720px){
  .membership-hero{padding:88px 0 58px}
  .membership-hero h1{font-size:54px}
  .membership-choice,.membership-grid{grid-template-columns:1fr}
  .membership-card{padding:24px}
  .membership-card .check{flex-wrap:wrap}
  .form-section-heading{align-items:flex-start;flex-direction:column;gap:5px}
  .form-section-help{text-align:left}
  .mini-button{margin-left:29px}
  .agreement-dialog{margin:2vh 12px;max-height:94vh;padding:24px}
}

/* Renewal agreement/signature layout
   Keep this section in a simple vertical flow, matching the working Join agreement UI.
   This is intentionally scoped to the renewal page only. */
.renewal-agreement-section{
  display:block !important;
  width:100% !important;
  box-sizing:border-box;
}

.renewal-agreement-section .renewal-agreement-consent{
  display:flex !important;
  flex-direction:row !important;
  align-items:flex-start !important;
  gap:11px !important;
  width:100% !important;
  box-sizing:border-box;
  margin:0 !important;
  padding:18px !important;
}

.renewal-agreement-section .renewal-agreement-consent input[type="checkbox"]{
  display:block !important;
  width:18px !important;
  height:18px !important;
  min-width:18px !important;
  margin:2px 0 0 !important;
  flex:0 0 18px !important;
  accent-color:var(--red);
}

.renewal-agreement-section .renewal-agreement-consent .mini-button{
  margin-left:auto !important;
  flex:0 0 auto !important;
}

.renewal-agreement-section .renewal-signature-field{
  display:flex !important;
  flex-direction:column !important;
  align-items:stretch !important;
  width:100% !important;
  box-sizing:border-box;
  margin:16px 0 0 !important;
  padding:0 !important;
  gap:8px !important;
  color:#172731;
  font-weight:800;
  font-size:13px;
  line-height:1.3;
}

.renewal-agreement-section .renewal-signature-field input{
  display:block !important;
  width:100% !important;
  min-width:0 !important;
  box-sizing:border-box;
  margin:0 !important;
}

@media(max-width:720px){
  .renewal-agreement-section .renewal-agreement-consent{
    flex-wrap:wrap !important;
  }

  .renewal-agreement-section .renewal-agreement-consent .mini-button{
    margin-left:29px !important;
  }
}
