/* register-page-patches.css
   Extracted from register.php inline <style> blocks.
   Keep order intact to preserve cascade.
*/

.rg-verify-code-next{
  width:min(520px,100%);
  margin:18px auto 0;
  padding:16px 18px;
  border-radius:18px;
  background:linear-gradient(135deg,#eef6ff,#f8fbff);
  border:1px solid rgba(25,118,210,.18);
}
.rg-verify-code-next-title{
  font-weight:900;
  color:#0d47a1;
  margin-bottom:4px;
}
.rg-verify-code-next-text{
  color:#475569;
  font-size:14px;
  line-height:1.65;
  margin-bottom:12px;
}
.rg-btn-verify-code{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:10px 20px;
  border-radius:999px;
  background:#1976d2;
  color:#fff!important;
  font-weight:900;
  text-decoration:none;
  box-shadow:0 12px 28px rgba(25,118,210,.22);
}
.rg-btn-verify-code:hover{
  filter:brightness(.96);
}
.rg-success-actions{
  margin-top:12px;
}
@media(max-width:640px){
  .rg-btn-verify-code,
  .rg-success-actions .rg-btn-home{
    width:100%;
  }
}


/* ---- extracted block ---- */
.rg-registration-details[hidden]{
  display:none!important;
}
.rg-registration-details{
  animation:rgDetailsIn .28s ease-out both;
}
.rg-selection-notice{
  margin:0 0 18px;
  padding:14px 18px;
  border-radius:18px;
  background:linear-gradient(135deg,#eef6ff,#f8fbff);
  border:1px solid rgba(25,118,210,.18);
  color:#0d47a1;
  font-weight:900;
  line-height:1.65;
  text-align:center;
}
.rg-zone-row.is-picked{
  box-shadow:0 18px 42px rgba(13,71,161,.16);
  transform:translateY(-1px);
}
@keyframes rgDetailsIn{
  from{opacity:0;transform:translateY(10px)}
  to{opacity:1;transform:translateY(0)}
}


/* ---- extracted block ---- */
.rg-external-form-list{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
  margin-top:14px;
}
.rg-external-form-card{
  position:relative;
  display:flex;
  flex-direction:column;
  min-height:210px;
  padding:22px;
  border-radius:26px;
  text-decoration:none!important;
  overflow:hidden;
  isolation:isolate;
  border:1px solid rgba(15,23,42,.10);
  box-shadow:0 18px 38px rgba(15,23,42,.08);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.rg-external-form-card::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:-2;
  background:linear-gradient(135deg,#ffffff,#f8fbff);
}
.rg-external-form-card::after{
  content:"";
  position:absolute;
  width:150px;
  height:150px;
  right:-48px;
  top:-48px;
  z-index:-1;
  border-radius:999px;
  opacity:.22;
}
.rg-external-form-card--innovator{
  border-color:rgba(25,118,210,.22);
}
.rg-external-form-card--innovator::after{
  background:#1976d2;
}
.rg-external-form-card--story{
  border-color:rgba(217,119,6,.24);
}
.rg-external-form-card--story::after{
  background:#f59e0b;
}
.rg-external-form-card:hover{
  transform:translateY(-4px);
  box-shadow:0 26px 52px rgba(15,23,42,.14);
}
.rg-external-form-badge{
  align-self:flex-start;
  padding:7px 12px;
  border-radius:999px;
  background:#eef6ff;
  color:#0d47a1;
  font-size:13px;
  font-weight:900;
  margin-bottom:16px;
}
.rg-external-form-card--story .rg-external-form-badge{
  background:#fff7ed;
  color:#9a3412;
}
.rg-external-form-main{
  display:flex;
  gap:14px;
  align-items:flex-start;
  flex:1;
}
.rg-external-form-icon{
  width:52px;
  height:52px;
  border-radius:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#fff;
  box-shadow:0 10px 24px rgba(15,23,42,.08);
  font-size:28px;
  flex:0 0 auto;
}
.rg-external-form-kicker{
  font-size:13px;
  color:#64748b;
  font-weight:900;
  margin-bottom:5px;
}
.rg-external-form-title{
  color:#0f172a;
  font-size:18px;
  line-height:1.55;
  font-weight:950;
}
.rg-external-form-en{
  margin-top:8px;
  color:#475569;
  font-size:14px;
  line-height:1.45;
  font-weight:800;
}
.rg-external-form-action{
  margin-top:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  border-radius:999px;
  background:#1976d2;
  color:#fff;
  font-weight:950;
  box-shadow:0 12px 26px rgba(25,118,210,.22);
}
.rg-external-form-card--story .rg-external-form-action{
  background:#d97706;
  box-shadow:0 12px 26px rgba(217,119,6,.20);
}
.rg-external-form-note{
  margin-top:14px;
  padding:13px 15px;
  border-radius:16px;
  background:#fff7ed;
  color:#9a3412;
  font-weight:900;
  text-align:center;
}
@media(max-width:840px){
  .rg-external-form-list{
    grid-template-columns:1fr;
  }
  .rg-external-form-card{
    min-height:auto;
  }
}


/* ---- extracted block ---- */
.rg-competition-type-box{
  margin-top:10px;
  padding:12px 14px;
  border-radius:14px;
  background:linear-gradient(135deg,#eef6ff,#f8fbff);
  border:1px solid rgba(25,118,210,.18);
  color:#0d47a1;
  font-weight:900;
  line-height:1.5;
}
.rg-competition-type-box.individual{
  background:linear-gradient(135deg,#fff7ed,#fffbeb);
  border-color:rgba(217,119,6,.24);
  color:#9a3412;
}


/* ---- extracted block ---- */
.rg-teacher-only-note{
  margin-top:12px;
  padding:14px 16px;
  border-radius:16px;
  background:linear-gradient(135deg,#f0fdf4,#ecfeff);
  border:1px solid rgba(20,184,166,.22);
  color:#0f766e;
  font-weight:900;
  line-height:1.65;
}
.rg-teacher-only-note b{
  color:#065f46;
}


/* ---- extracted block ---- */
/* ===== Teacher-only activity rule card ===== */
.rg-teacher-only-rule-card{
  margin-top:14px;
  padding:16px 18px;
  border-radius:18px;
  background:linear-gradient(135deg,#f0fdf4,#ecfeff);
  border:1px solid rgba(20,184,166,.28);
  color:#0f766e;
  font-weight:900;
  line-height:1.65;
}
.rg-teacher-only-rule-title{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:15px;
  color:#065f46;
  font-weight:950;
  margin-bottom:8px;
}
.rg-teacher-only-rule-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px 14px;
}
.rg-teacher-only-rule-item{
  padding:9px 11px;
  border-radius:13px;
  background:rgba(255,255,255,.72);
  border:1px solid rgba(20,184,166,.14);
  color:#0f766e;
}
.rg-teacher-only-rule-item b{
  color:#064e3b;
}
@media(max-width:720px){
  .rg-teacher-only-rule-grid{
    grid-template-columns:1fr;
  }
}


/* ---- extracted block ---- */
/* ===== Province-first school selector ===== */
.rg-school-hint{margin-top:8px;color:#64748b;font-size:13px;line-height:1.55;font-weight:800;}
.rg-school-hint.is-warning{color:#b45309;}
.rg-school-hint.is-ok{color:#047857;}
.rg-school-hint.is-error{color:#b91c1c;}
#inputName:disabled{background:#f8fafc;color:#94a3b8;cursor:not-allowed;}


/* ---- extracted block ---- */
/* ===== Mobile friendly province + school picker ===== */
.rg-school-mobile-results{
  margin-top:10px;
  display:grid;
  gap:8px;
  max-height:260px;
  overflow:auto;
  padding:8px;
  border-radius:18px;
  background:#f8fafc;
  border:1px solid #e2e8f0;
  -webkit-overflow-scrolling:touch;
}
.rg-school-mobile-results[hidden]{
  display:none!important;
}
.rg-school-mobile-item{
  width:100%;
  display:block;
  text-align:left;
  border:1px solid #dbe5ef;
  background:#fff;
  color:#0f172a;
  border-radius:15px;
  padding:12px 13px;
  font-family:inherit;
  font-weight:900;
  line-height:1.35;
  cursor:pointer;
  box-shadow:0 8px 18px rgba(15,23,42,.04);
}
.rg-school-mobile-item:active{
  transform:scale(.99);
}
.rg-school-mobile-item small{
  display:block;
  margin-top:3px;
  color:#64748b;
  font-weight:800;
  font-size:12px;
}
.rg-school-mobile-empty{
  padding:12px 13px;
  border-radius:15px;
  background:#fff7ed;
  color:#9a3412;
  font-weight:900;
  line-height:1.45;
}
.rg-school-mobile-picked{
  border-color:#10b981!important;
  background:#ecfdf5!important;
}
@media(max-width:720px){
  /* ให้จังหวัดและโรงเรียนอยู่คนละบรรทัด จะกดง่ายกว่าในมือถือ */
  .rg-card:has(#provinceSelect) .rg-form-row{
    grid-template-columns:1fr!important;
    gap:14px!important;
  }

  #provinceSelect,
  #inputName{
    min-height:52px!important;
    font-size:16px!important;
    border-radius:16px!important;
  }

  #inputName{
    padding-right:12px!important;
  }

  .rg-school-hint{
    font-size:13px!important;
    line-height:1.45!important;
  }

  .rg-school-mobile-results{
    max-height:310px;
    padding:7px;
    border-radius:16px;
  }

  .rg-school-mobile-item{
    min-height:50px;
    padding:12px;
    font-size:15px;
  }

  .rg-school-mobile-item small{
    font-size:12px;
  }
}


/* ---- extracted block ---- */
/* ===== Combined teacher article selector ===== */
.rg-teacher-article-choice-box{
  margin-top:14px;
  padding:16px 18px;
  border-radius:18px;
  background:linear-gradient(135deg,#f0fdf4,#ecfeff);
  border:1px solid rgba(20,184,166,.28);
  color:#0f766e;
  font-weight:900;
  line-height:1.6;
}
.rg-teacher-article-title{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:16px;
  color:#065f46;
  font-weight:950;
  margin-bottom:10px;
}
.rg-teacher-article-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.rg-teacher-article-card{
  display:grid;
  gap:8px;
  padding:13px;
  border-radius:16px;
  background:rgba(255,255,255,.76);
  border:1px solid rgba(20,184,166,.16);
}
.rg-teacher-article-check{
  display:flex;
  align-items:flex-start;
  gap:9px;
  cursor:pointer;
  color:#064e3b;
}
.rg-teacher-article-template{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:36px;
  padding:7px 12px;
  border-radius:999px;
  background:#0f766e;
  color:#fff!important;
  font-weight:950;
  text-decoration:none!important;
}
.rg-teacher-article-hint{
  margin-top:10px;
  padding:10px 12px;
  border-radius:14px;
  background:#fff;
  color:#0f766e;
}
@media(max-width:720px){
  .rg-teacher-article-grid{
    grid-template-columns:1fr;
  }
}


/* ---- extracted block ---- */
/* ===== Show teacher article template files immediately after selecting item 49/52 ===== */
.rg-teacher-article-template-files{
  margin:12px 0 10px;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.rg-teacher-article-file-card{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:13px 14px;
  border-radius:16px;
  background:#ffffff;
  border:1px solid rgba(15,118,110,.18);
  box-shadow:0 8px 20px rgba(15,23,42,.04);
}
.rg-teacher-article-file-card strong{
  display:block;
  color:#064e3b;
  font-size:15px;
  line-height:1.25;
}
.rg-teacher-article-file-card small{
  display:block;
  color:#64748b;
  font-size:12px;
  font-weight:800;
  margin-top:3px;
  word-break:break-all;
}
.rg-teacher-article-file-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:36px;
  padding:8px 12px;
  border-radius:999px;
  background:#0f766e;
  color:#fff!important;
  text-decoration:none!important;
  font-weight:950;
  white-space:nowrap;
}
@media(max-width:720px){
  .rg-teacher-article-template-files{
    grid-template-columns:1fr;
  }
  .rg-teacher-article-file-card{
    align-items:flex-start;
    flex-direction:column;
  }
  .rg-teacher-article-file-btn{
    width:100%;
  }
}


/* ---- extracted block ---- */
/* ===== Remove duplicated template buttons: keep only main template file buttons ===== */
.rg-teacher-article-choice-box .rg-teacher-article-grid{
  margin-top:8px;
}
.rg-teacher-article-card{
  min-height:auto;
}
.rg-teacher-article-card .rg-teacher-article-template{
  display:none!important;
}
