/* ════════════════════════════════════════════════════════════════
   register-2027.css — 2027 Grade 6 registration form (index.html)
   The form sends nothing to the site: js/register-2027.js opens
   WhatsApp with the details filled in, to 071 354 3537.
   ════════════════════════════════════════════════════════════════ */
.rg-section{ padding:48px 16px; background:linear-gradient(180deg,#eef3ff 0%,#f7f5f0 100%); }
.rg-card{
  max-width:880px; margin:0 auto; display:grid; grid-template-columns:300px 1fr;
  background:#fff; border-radius:22px; overflow:hidden;
  box-shadow:0 24px 60px rgba(15,27,61,.14);
  font-family:'Noto Sans Sinhala','Open Sans',system-ui,sans-serif; color:#0f1b3d;
}

/* left: class summary (same look as the 2027 popup) */
.rg-side{ position:relative; overflow:hidden; padding:28px 24px; background:#2350d8; color:#fff; }
.rg-side::after{ content:""; position:absolute; right:-60px; bottom:-60px; width:180px; height:180px;
  border-radius:50%; background:#fdd447; opacity:.35; }
.rg-side > *{ position:relative; z-index:1; }
.rg-year{ font-family:'Poppins','Open Sans',sans-serif; font-weight:900; font-size:44px; line-height:1; }
.rg-side h2{ margin:10px 0 4px; font-size:30px; font-weight:900; line-height:1.2; color:#fff; }
.rg-side h2 b{ color:#fdd447; }
.rg-side p{ margin:0 0 18px; opacity:.92; font-size:14px; }
.rg-when{ list-style:none; margin:0 0 20px; padding:0; }
.rg-when li{ background:rgba(255,255,255,.14); border-radius:12px; padding:10px 12px; margin-bottom:8px; font-size:13px; }
.rg-when strong{ display:block; font-size:16px; }
.rg-side .rg-phone{ display:inline-block; color:#fdd447 !important; font-weight:900; font-size:18px; text-decoration:none; }

/* right: the form */
.rg-form{ padding:28px 28px 24px; }
.rg-form h3{ margin:0 0 4px; font-size:22px; font-weight:900; color:#0f1b3d; }
.rg-form .rg-intro{ margin:0 0 18px; color:#475569; font-size:14px; }
.rg-grid{ display:grid; grid-template-columns:1fr 1fr; gap:14px 16px; }
.rg-field{ display:flex; flex-direction:column; gap:6px; }
.rg-field.full{ grid-column:1 / -1; }
.rg-field label, .rg-field legend{ font-weight:800; font-size:14px; color:#0f1b3d; padding:0; }
.rg-field label span, .rg-field legend span{ color:#dc2626; }
.rg-field input, .rg-field textarea{
  width:100%; padding:11px 13px; border:1.5px solid #cbd5e1; border-radius:12px; background:#f8fafc;
  font:inherit; font-size:15px; color:#0f1b3d; outline:none; transition:border-color .15s, box-shadow .15s;
}
.rg-field textarea{ min-height:70px; resize:vertical; }
.rg-field input:focus, .rg-field textarea:focus{ border-color:#2350d8; box-shadow:0 0 0 3px rgba(35,80,216,.15); background:#fff; }
.rg-field.invalid input{ border-color:#dc2626; background:#fff5f5; }
.rg-err{ display:none; color:#b91c1c; font-size:12.5px; font-weight:600; }
.rg-field.invalid .rg-err{ display:block; }

fieldset.rg-field{ border:0; margin:0; padding:0; min-width:0; }
fieldset.rg-field legend{ width:auto; border:0; margin:0 0 6px; font-size:14px; line-height:1.4; } /* undo Bootstrap legend */
.rg-options{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.rg-option{ position:relative; }
.rg-option input{ position:absolute; opacity:0; inset:0; margin:0; cursor:pointer; }
.rg-option .box{
  display:block; height:100%; padding:11px 13px; border:1.5px solid #cbd5e1; border-radius:12px; background:#f8fafc;
  font-size:13px; color:#475569; transition:border-color .15s, background .15s;
}
.rg-option .box strong{ display:block; font-size:16px; color:#0f1b3d; }
.rg-option input:checked + .box{ border-color:#2350d8; background:#eef3ff; box-shadow:0 0 0 3px rgba(35,80,216,.15); }
.rg-option input:focus-visible + .box{ outline:3px solid #fdd447; outline-offset:2px; }
fieldset.rg-field.invalid .box{ border-color:#dc2626; }

.rg-send{
  margin-top:18px; width:100%; display:flex; align-items:center; justify-content:center; gap:10px;
  padding:14px 18px; border:0; border-radius:999px; cursor:pointer;
  background:#15803d; color:#fff; font:inherit; font-size:16px; font-weight:900;
  box-shadow:0 10px 24px rgba(21,128,61,.3); transition:background .15s, transform .15s;
}
.rg-send:hover, .rg-send:focus{ background:#166534; transform:translateY(-1px); }
.rg-send svg{ width:22px; height:22px; flex:none; }
.rg-note{ margin:10px 0 0; text-align:center; color:#64748b; font-size:12.5px; }
.rg-done{ display:none; margin:12px 0 0; padding:10px 12px; border-radius:12px; background:#ecfdf5; color:#166534; font-size:13.5px; font-weight:700; text-align:center; }
.rg-done.show{ display:block; }

@media (max-width:767px){
  .rg-section{ padding:32px 12px; }
  .rg-card{ grid-template-columns:1fr; }
  .rg-side{ padding:22px 20px; }
  .rg-side h2{ font-size:26px; }
  .rg-form{ padding:22px 18px 20px; }
  .rg-grid, .rg-options{ grid-template-columns:1fr; }
}
html.dark .rg-section{ background:#0b1220; }
