/* RRB NTPC Result Checker - widget styles
   Palette follows the Veranda RACE site (green #2ea87e primary, #E5214E accent). */

:root {
  --brand:        #2ea87e;
  --brand-dark:   #267a5d;
  --brand-tint:   #eaf7f2;
  --danger:       #E5214E;
  --danger-tint:  #FFF0F4;
  --slate:        #4a5563;
  --slate-tint:   #eef1f5;
  --ink:          #1c2430;
  --ink-muted:    #6f7580;
  --line:         #e3e7ec;
  --field-bg:     #f7f9fb;
  --card-bg:      #ffffff;
  --radius:       14px;
  --font: "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  /* Transparent so the widget inherits the blog page's background through the
     iframe instead of punching a white rectangle into it. */
  background: transparent;
  font-family: var(--font);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}

.widget-card {
  max-width: 460px;
  margin: 0 auto;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: 0 2px 14px rgba(28, 36, 48, .06);
}

.view-panel[hidden] { display: none; }

/* ---------- Header ---------- */

.widget-header { text-align: center; margin-bottom: 22px; }

.widget-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 12px;
  border-radius: 13px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .5px;
}

.widget-title  { margin: 0 0 4px; font-size: 21px; font-weight: 700; line-height: 1.25; }
.widget-subtitle { margin: 0; font-size: 13px; color: var(--ink-muted); }

/* ---------- Form ---------- */

.form-group { margin-bottom: 15px; }

.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.input-container { position: relative; }

.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field-bg);
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s, background .15s;
}

.form-input::placeholder { color: #a3aab4; }

.form-input:focus {
  outline: none;
  background: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(46, 168, 126, .15);
}

select.form-input {
  appearance: none;
  cursor: pointer;
  /* Inline chevron - a data: URI keeps the widget free of extra asset requests. */
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236f7580' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.form-input:disabled {
  background: #eef1f4;
  color: #a3aab4;
  cursor: not-allowed;
}

.form-input.input-error {
  border-color: var(--danger);
  background: var(--danger-tint);
}

.error-msg {
  display: none;
  margin-top: 5px;
  font-size: 12px;
  color: var(--danger);
}

.field-hint {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-muted);
}

.field-hint[hidden] { display: none; }

.link-btn {
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-dark);
  text-decoration: underline;
  cursor: pointer;
}

.link-btn:hover { color: var(--brand); }

.link-btn[hidden] { display: none; }

.form-notice {
  margin: 4px 0 14px;
  padding: 11px 13px;
  border-radius: 9px;
  background: var(--danger-tint);
  border: 1px solid rgba(229, 33, 78, .25);
  font-size: 13px;
  line-height: 1.45;
  color: #9c1233;
}

.form-notice[hidden] { display: none; }

/* ---------- Submit ---------- */

.submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 48px;
  margin-top: 6px;
  padding: 13px;
  border: 0;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}

.submit-btn:hover:not(:disabled) { background: var(--brand-dark); }

.submit-btn:disabled { background: #c9ccd1; cursor: not-allowed; }

.spinner {
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.spinner[hidden] { display: none; }

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

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2s; }
}

.disclaimer {
  margin: 16px 0 0;
  padding: 12px 14px;
  border: 1px solid #f2d99a;
  border-left: 3px solid #e0a800;
  border-radius: 9px;
  background: #fffaef;
}

.disclaimer-line {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: #6b5518;
}

.disclaimer-line + .disclaimer-line {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid #f2e3bd;
}

.disclaimer-line strong { color: #4d3c10; }

/* Devanagari needs a taller line box than Latin to keep matras legible, and a
   font stack that names faces actually present on Indian Android/Windows. */
.disclaimer-line[lang="hi"] {
  font-family: "Nirmala UI", "Noto Sans Devanagari", "Mangal", var(--font);
  font-size: 12.5px;
  line-height: 1.85;
}

.consent-note {
  margin: 13px 0 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ink-muted);
  text-align: center;
}

/* ---------- Result panels ---------- */

.result-status { text-align: center; }

.result-icon-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  margin-bottom: 14px;
  border-radius: 50%;
}

.qualified     .result-icon-container { background: var(--brand-tint); color: var(--brand); }
.not-qualified .result-icon-container { background: var(--slate-tint);  color: var(--slate); }

.result-badge {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 13px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
}

.qualified     .result-badge { background: var(--brand-tint); color: var(--brand-dark); }
.not-qualified .result-badge { background: var(--slate-tint);  color: var(--slate); }

.result-heading {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.2px;
}

.result-msg {
  margin: 0 auto 18px;
  max-width: 330px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-muted);
}

.result-msg strong { color: var(--ink); font-weight: 600; }

/* The "what now" line, set apart from the verdict so the two don't compete. */
.result-next {
  margin: 0 0 18px;
  padding: 11px 13px;
  border-radius: 9px;
  background: var(--field-bg);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-muted);
  text-align: left;
}

.qualified .result-next {
  background: var(--brand-tint);
  color: var(--brand-dark);
}

.detail-table {
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  text-align: left;
}

.detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}

.detail-row:last-child { border-bottom: 0; }

.detail-label {
  font-size: 12.5px;
  color: var(--ink-muted);
  flex: 0 0 auto;
}

.detail-value.mono {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  letter-spacing: .3px;
}

.detail-value {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  text-align: right;
  /* Roll numbers are long - allow a break rather than overflowing the card. */
  word-break: break-all;
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 46px;
  margin-top: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}

.action-btn:hover { background: var(--field-bg); }

.action-btn.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.action-btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }

.action-btn.primary[hidden] { display: none; }

/* ---------- Small screens ---------- */

@media (max-width: 420px) {
  .widget-card { padding: 20px 16px; border-radius: 12px; }
  .widget-title { font-size: 19px; }
  .detail-row { flex-direction: column; align-items: flex-start; gap: 3px; }
  .detail-value { text-align: left; }
}
