/* ================================================================
   Sarkari Age Calculator — Plugin Styles
   Clean, professional, mobile-first
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

.sac-wrap {
  --sac-blue:     #2563EB;
  --sac-blue-d:   #1D4ED8;
  --sac-blue-l:   #EFF6FF;
  --sac-blue-m:   #DBEAFE;
  --sac-green:    #16A34A;
  --sac-green-l:  #DCFCE7;
  --sac-green-m:  #BBF7D0;
  --sac-red:      #DC2626;
  --sac-red-l:    #FEE2E2;
  --sac-amber:    #D97706;
  --sac-amber-l:  #FEF3C7;
  --sac-amber-m:  #FDE68A;
  --sac-gray-50:  #F9FAFB;
  --sac-gray-100: #F3F4F6;
  --sac-gray-200: #E5E7EB;
  --sac-gray-300: #D1D5DB;
  --sac-gray-400: #9CA3AF;
  --sac-gray-500: #6B7280;
  --sac-gray-600: #4B5563;
  --sac-gray-700: #374151;
  --sac-gray-800: #1F2937;
  --sac-radius:   12px;
  --sac-radius-sm:8px;
  --sac-shadow:   0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);

  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  color: var(--sac-gray-800);
  max-width: 700px;
  margin: 0 auto;
  padding: 0 0 2rem;
  box-sizing: border-box;
}

.sac-wrap *, .sac-wrap *::before, .sac-wrap *::after {
  box-sizing: border-box;
}

/* ── Header ── */
.sac-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 1.25rem 0 1rem;
  border-bottom: 1.5px solid var(--sac-gray-100);
  margin-bottom: 1.25rem;
}
.sac-title {
  font-size: 20px !important;
  font-weight: 700 !important;
  color: var(--sac-gray-800) !important;
  margin: 0 0 2px !important;
  padding: 0 !important;
  line-height: 1.2 !important;
  border: none !important;
}
.sac-sub {
  font-size: 13px !important;
  color: var(--sac-gray-500) !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.4 !important;
}

/* ── Section label ── */
.sac-section-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--sac-gray-400);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 8px;
}

/* ── Exam Grid ── */
.sac-exam-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 6px;
  margin-bottom: 1.25rem;
}
.sac-exam-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 6px;
  border-radius: var(--sac-radius-sm);
  border: 1.5px solid var(--sac-gray-200);
  background: white;
  cursor: pointer;
  font-family: inherit;
  gap: 3px;
  transition: all .15s;
  text-align: center;
}
.sac-exam-btn:hover {
  border-color: var(--sac-blue);
  background: var(--sac-blue-l);
}
.sac-exam-btn.active {
  border-color: var(--sac-blue);
  background: var(--sac-blue-l);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.sac-exam-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--sac-gray-800);
}
.sac-exam-btn.active .sac-exam-name {
  color: var(--sac-blue-d);
}
.sac-exam-range {
  font-size: 10px;
  color: var(--sac-gray-400);
  font-weight: 500;
}
.sac-exam-btn.active .sac-exam-range {
  color: var(--sac-blue);
}

/* ── Main Card ── */
.sac-card {
  background: white;
  border-radius: var(--sac-radius);
  border: 1px solid var(--sac-gray-200);
  padding: 1.25rem;
  box-shadow: var(--sac-shadow);
}

/* ── Form grid ── */
.sac-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
.sac-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sac-field-group:last-child {
  grid-column: 1 / -1;
}
.sac-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--sac-gray-600);
  display: flex;
  align-items: center;
  gap: 5px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.sac-input {
  padding: 9px 12px;
  border-radius: var(--sac-radius-sm);
  border: 1.5px solid var(--sac-gray-200);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--sac-gray-800);
  background: white;
  outline: none;
  transition: border-color .15s;
  width: 100%;
}
.sac-input:focus {
  border-color: var(--sac-blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.sac-field-hint {
  font-size: 11px;
  color: var(--sac-gray-400);
}

/* ── Category Pills ── */
.sac-category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sac-cat-pill {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--sac-gray-200);
  background: white;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--sac-gray-600);
  cursor: pointer;
  transition: all .15s;
}
.sac-cat-pill:hover {
  border-color: var(--sac-blue);
  color: var(--sac-blue);
}
.sac-cat-pill.active {
  border-color: var(--sac-blue);
  background: var(--sac-blue);
  color: white;
}

/* ── Limits Box ── */
.sac-limits-box {
  background: var(--sac-gray-50);
  border: 1px solid var(--sac-gray-100);
  border-radius: var(--sac-radius-sm);
  padding: 12px 14px;
  margin-bottom: 1rem;
}
.sac-limits-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--sac-gray-600);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.sac-limits-exam-name {
  font-weight: 700;
  color: var(--sac-blue);
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
}
.sac-limits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}
.sac-limit-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sac-limit-field label {
  font-size: 10px;
  font-weight: 600;
  color: var(--sac-gray-500);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.sac-limit-input {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--sac-gray-200);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--sac-gray-800);
  background: white;
  outline: none;
  width: 100%;
}
.sac-limit-input:focus {
  border-color: var(--sac-blue);
}

/* ── Primary Button ── */
.sac-btn {
  width: 100%;
  padding: 13px 20px;
  border-radius: var(--sac-radius-sm);
  border: none;
  background: var(--sac-blue);
  color: white;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all .15s;
  letter-spacing: .01em;
  margin-bottom: 0;
}
.sac-btn:hover {
  background: var(--sac-blue-d);
  transform: translateY(-1px);
}

/* ── Result Panel ── */
.sac-result {
  margin-top: 1.25rem;
  border-top: 1.5px solid var(--sac-gray-100);
  padding-top: 1.25rem;
}

/* Big age display */
.sac-age-big {
  text-align: center;
  padding: 1.25rem;
  background: var(--sac-blue-l);
  border-radius: var(--sac-radius-sm);
  margin-bottom: 1rem;
}
.sac-age-number {
  font-size: 48px;
  font-weight: 800;
  color: var(--sac-blue-d);
  line-height: 1;
  margin-bottom: 4px;
}
.sac-age-unit {
  font-size: 14px;
  font-weight: 600;
  color: var(--sac-blue);
}
.sac-age-detail {
  font-size: 13px;
  color: var(--sac-blue);
  margin-top: 6px;
  font-weight: 500;
}

/* Stat cards */
.sac-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 1rem;
}
.sac-stat {
  background: var(--sac-gray-50);
  border-radius: var(--sac-radius-sm);
  padding: 10px 12px;
  text-align: center;
}
.sac-stat-n {
  font-size: 20px;
  font-weight: 800;
  color: var(--sac-gray-800);
  line-height: 1.1;
}
.sac-stat-l {
  font-size: 11px;
  color: var(--sac-gray-500);
  margin-top: 3px;
}

/* Verdict */
.sac-verdict {
  border-radius: var(--sac-radius-sm);
  padding: 14px 16px;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.sac-verdict.eligible {
  background: var(--sac-green-l);
  border: 1.5px solid var(--sac-green-m);
}
.sac-verdict.ineligible {
  background: var(--sac-red-l);
  border: 1.5px solid #FECACA;
}
.sac-verdict.warn {
  background: var(--sac-amber-l);
  border: 1.5px solid var(--sac-amber-m);
}
.sac-verdict.noexam {
  background: var(--sac-gray-100);
  border: 1.5px solid var(--sac-gray-200);
}
.sac-verdict-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.eligible  .sac-verdict-icon { background: var(--sac-green-m); }
.ineligible .sac-verdict-icon { background: #FECACA; }
.warn      .sac-verdict-icon { background: var(--sac-amber-m); }
.noexam    .sac-verdict-icon { background: var(--sac-gray-200); }

.sac-verdict-body {}
.sac-verdict-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 3px;
}
.eligible  .sac-verdict-title { color: var(--sac-green); }
.ineligible .sac-verdict-title { color: var(--sac-red); }
.warn      .sac-verdict-title { color: var(--sac-amber); }
.noexam    .sac-verdict-title { color: var(--sac-gray-600); }

.sac-verdict-desc {
  font-size: 13px;
  color: var(--sac-gray-600);
  line-height: 1.5;
}

/* Relaxation table */
.sac-relax-section {
  background: var(--sac-gray-50);
  border: 1px solid var(--sac-gray-100);
  border-radius: var(--sac-radius-sm);
  padding: 12px 14px;
  margin-bottom: 1rem;
}
.sac-relax-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--sac-gray-500);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 10px;
}
.sac-relax-table {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 6px;
}
.sac-relax-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  border-radius: 6px;
  padding: 7px 10px;
  border: 1px solid var(--sac-gray-100);
}
.sac-relax-cat {
  font-size: 12px;
  font-weight: 600;
  color: var(--sac-gray-700);
}
.sac-relax-range {
  font-size: 11px;
  font-weight: 700;
  color: var(--sac-blue);
}
.sac-relax-row.you-are {
  border-color: var(--sac-blue);
  background: var(--sac-blue-l);
}
.sac-relax-row.you-are .sac-relax-cat {
  color: var(--sac-blue-d);
}
.sac-relax-ok  { color: var(--sac-green) !important; }
.sac-relax-no  { color: var(--sac-red) !important; }

/* Breakdown */
.sac-breakdown {
  background: var(--sac-gray-50);
  border-radius: var(--sac-radius-sm);
  padding: 12px 14px;
  border: 1px solid var(--sac-gray-100);
}
.sac-breakdown-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--sac-gray-500);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 10px;
}
.sac-breakdown-rows {}
.sac-bd-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid var(--sac-gray-100);
  font-size: 13px;
}
.sac-bd-row:last-child { border-bottom: none; }
.sac-bd-label { color: var(--sac-gray-500); }
.sac-bd-value { font-weight: 600; color: var(--sac-gray-800); }
.sac-bd-value.ok  { color: var(--sac-green); }
.sac-bd-value.bad { color: var(--sac-red); }
.sac-bd-value.warn { color: var(--sac-amber); }

/* ── Error ── */
.sac-error {
  margin-top: 10px;
  padding: 10px 14px;
  background: var(--sac-red-l);
  border: 1px solid #FECACA;
  border-radius: var(--sac-radius-sm);
  color: var(--sac-red);
  font-size: 13px;
  font-weight: 500;
}

/* ── Info Strip ── */
.sac-info-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 1rem;
  padding: 10px 0;
  border-top: 1px solid var(--sac-gray-100);
}
.sac-info-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--sac-gray-400);
}

/* ── Responsive ── */
@media (max-width: 520px) {
  .sac-form-grid { grid-template-columns: 1fr; }
  .sac-field-group:last-child { grid-column: 1; }
  .sac-exam-grid { grid-template-columns: repeat(3, 1fr); }
  .sac-stat-row { grid-template-columns: repeat(3, 1fr); }
  .sac-age-number { font-size: 38px; }
  .sac-limits-grid { grid-template-columns: repeat(2, 1fr); }
}
