/* ==========================================================================
   Competishun JEE College Predictor
   All classes prefixed `.cspn-` to avoid clashing with theme styles
   ========================================================================== */

.cspn-predictor {
  --cspn-orange: #F15E03;
  --cspn-navy:   #01009A;
  --cspn-ink:    #1a1a1a;
  --cspn-muted:  #6b6b6b;
  --cspn-bg:     #fafafa;
  --cspn-card:   #ffffff;
  --cspn-line:   #e6e6e6;
  --cspn-safe:   #16a34a;
  --cspn-mod:    #d97706;
  --cspn-aspir:  #dc2626;

  font-family: 'Bricolage Grotesque', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--cspn-ink);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
  line-height: 1.5;
}

.cspn-predictor *,
.cspn-predictor *::before,
.cspn-predictor *::after { box-sizing: border-box; }

.cspn-loading {
  padding: 60px 20px;
  text-align: center;
  color: var(--cspn-muted);
  font-size: 15px;
}

/* ---------- Header ---------- */
.cspn-header {
  background: var(--cspn-navy);
  color: #fff;
  padding: 18px 24px;
  border-radius: 10px 10px 0 0;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.cspn-logo {
  background: var(--cspn-orange);
  color: #fff;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 5px;
  letter-spacing: .5px;
  font-size: 13px;
}
.cspn-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}
.cspn-header .cspn-tag {
  margin-left: auto;
  font-size: 12px;
  color: #bcbcff;
}

/* ---------- Layout grid ---------- */
.cspn-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 0;
  background: var(--cspn-card);
  border: 1px solid var(--cspn-line);
  border-top: none;
  border-radius: 0 0 10px 10px;
  overflow: hidden;
}
@media (max-width: 900px) {
  .cspn-grid { grid-template-columns: 1fr; }
}

.cspn-form-section {
  padding: 22px;
  border-right: 1px solid var(--cspn-line);
  background: #fcfcfc;
}
@media (max-width: 900px) {
  .cspn-form-section { border-right: none; border-bottom: 1px solid var(--cspn-line); }
}
.cspn-results-section { padding: 22px; min-width: 0; }

.cspn-section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--cspn-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin: 0 0 14px 0;
}

/* ---------- Form fields ---------- */
.cspn-field { margin-bottom: 12px; }
.cspn-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--cspn-ink);
}
.cspn-field input[type="number"],
.cspn-field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d4d4d4;
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
  font-family: inherit;
  color: var(--cspn-ink);
  appearance: none;
  -webkit-appearance: none;
}
.cspn-field input[type="number"]:focus,
.cspn-field select:focus {
  outline: 2px solid var(--cspn-orange);
  outline-offset: -1px;
  border-color: var(--cspn-orange);
}
.cspn-field select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%236b6b6b' d='M0 0l5 6 5-6z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.cspn-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  margin: 4px 0 12px;
  cursor: pointer;
}
.cspn-checkbox input { width: auto; }

.cspn-button {
  margin-top: 6px;
  width: 100%;
  background: var(--cspn-orange);
  color: #fff;
  border: 0;
  padding: 12px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: .3px;
  transition: filter .15s;
}
.cspn-button:hover { filter: brightness(.95); }
.cspn-button:active { filter: brightness(.9); }
.cspn-error { color: #dc2626; font-size: 13px; margin-top: 8px; }

/* ---------- Filter pills ---------- */
.cspn-filterbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.cspn-filterbar-label {
  font-size: 12px;
  color: var(--cspn-muted);
  align-self: center;
  margin-right: 4px;
  font-weight: 600;
}
.cspn-pill {
  padding: 6px 12px;
  border: 1px solid #d4d4d4;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  background: #fff;
  user-select: none;
  font-weight: 500;
  transition: all .12s;
}
.cspn-pill:hover { border-color: var(--cspn-navy); }
.cspn-pill.cspn-active {
  background: var(--cspn-navy);
  color: #fff;
  border-color: var(--cspn-navy);
  font-weight: 600;
}

.cspn-summary {
  display: flex;
  gap: 14px;
  font-size: 13px;
  color: var(--cspn-muted);
  margin: 10px 0 14px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--cspn-line);
}
.cspn-summary b { color: var(--cspn-ink); font-weight: 700; }

/* ---------- Results table ---------- */
.cspn-table-wrap { overflow-x: auto; }
.cspn-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.cspn-table thead th {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 2px solid var(--cspn-line);
  background: #fafafa;
  font-size: 11px;
  color: var(--cspn-muted);
  text-transform: uppercase;
  letter-spacing: .8px;
  font-weight: 700;
  white-space: nowrap;
}
.cspn-table tbody td {
  padding: 11px 8px;
  border-bottom: 1px solid var(--cspn-line);
  vertical-align: top;
}
.cspn-table tbody tr:hover { background: #fafafa; }

.cspn-kind {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
  white-space: nowrap;
}
.cspn-kind-Safe         { background: #dcfce7; color: var(--cspn-safe); }
.cspn-kind-Moderate     { background: #ffedd5; color: var(--cspn-mod); }
.cspn-kind-Aspirational { background: #fee2e2; color: var(--cspn-aspir); }

.cspn-ttype {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.cspn-ttype-IIT  { background: #fef3c7; color: #a16207; }
.cspn-ttype-NIT  { background: #dbeafe; color: #1e40af; }
.cspn-ttype-IIIT { background: #e0e7ff; color: #4338ca; }
.cspn-ttype-GFTI { background: #f3f4f6; color: #374151; }

.cspn-branch { font-weight: 600; color: var(--cspn-ink); line-height: 1.35; }
.cspn-inst   { color: var(--cspn-muted); font-size: 12px; margin-top: 3px; line-height: 1.35; }
.cspn-cr     { font-weight: 700; font-variant-numeric: tabular-nums; }

.cspn-empty {
  padding: 50px 20px;
  text-align: center;
  color: var(--cspn-muted);
  font-size: 14px;
}
