/* ═══════════════════════════════════════════════════
   JanSewa Job Table — Stylesheet
   Color scheme: matches jansewaup.in (orange/red/white)
   Font: Noto Sans Devanagari for Hindi support
   ═══════════════════════════════════════════════════ */

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

:root {
  --jjt-primary:   #c0392b;   /* deep red — matches sarkari job sites */
  --jjt-accent:    #e74c3c;   /* bright red */
  --jjt-orange:    #e67e22;   /* orange for urgency */
  --jjt-green:     #27ae60;
  --jjt-blue:      #2980b9;
  --jjt-purple:    #8e44ad;
  --jjt-gray:      #7f8c8d;
  --jjt-light:     #f8f9fa;
  --jjt-border:    #dee2e6;
  --jjt-text:      #2c3e50;
  --jjt-hindi:     'Noto Sans Devanagari', sans-serif;
  --jjt-font:      -apple-system, 'Segoe UI', sans-serif;
  --jjt-radius:    8px;
}

/* ── Wrapper ── */
.jjt-wrap {
  font-family: var(--jjt-font);
  color: var(--jjt-text);
  margin: 0 0 30px;
  line-height: 1.5;
}

/* ── Page Heading ── */
.jjt-page-heading {
  background: linear-gradient(135deg, #c0392b, #e74c3c);
  color: white;
  padding: 16px 20px;
  border-radius: var(--jjt-radius) var(--jjt-radius) 0 0;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--jjt-hindi), var(--jjt-font);
}
.jjt-heading-icon { font-size: 24px; }

/* ── Summary Bar ── */
.jjt-summary-bar {
  display: flex;
  background: #2c3e50;
  color: white;
  flex-wrap: wrap;
}
.jjt-sum-item {
  flex: 1;
  text-align: center;
  padding: 12px 8px;
  border-right: 1px solid rgba(255,255,255,0.1);
  min-width: 70px;
}
.jjt-sum-item:last-child { border-right: none; }
.jjt-sum-num {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
  display: block;
}
.jjt-sum-datestr { font-size: 13px !important; font-weight: 700 !important; }
.jjt-sum-lbl {
  font-size: 11px;
  opacity: 0.8;
  margin-top: 3px;
  font-family: var(--jjt-hindi), var(--jjt-font);
  line-height: 1.4;
}
.jjt-sum-lbl span { display: block; }
.jjt-sum-active .jjt-sum-num { color: #2ecc71; }
.jjt-sum-closed .jjt-sum-num { color: #e74c3c; }
.jjt-sum-date  .jjt-sum-num  { color: #f39c12; }

/* ── Search Row ── */
.jjt-search-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ecf0f1;
  padding: 10px 14px;
  border-bottom: 1px solid var(--jjt-border);
  flex-wrap: wrap;
}
.jjt-search {
  flex: 1;
  padding: 9px 14px;
  border: 1.5px solid var(--jjt-border);
  border-radius: 20px;
  font-size: 14px;
  font-family: var(--jjt-hindi), var(--jjt-font);
  min-width: 180px;
  outline: none;
  transition: border 0.15s;
}
.jjt-search:focus { border-color: var(--jjt-primary); }
.jjt-search-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--jjt-gray);
  white-space: nowrap;
}

/* ── Table Scroll Container ── */
.jjt-table-outer {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--jjt-border);
  border-top: none;
}

/* ── Table ── */
.jjt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 520px;
}

/* ── Header ── */
.jjt-table thead tr {
  background: var(--jjt-primary);
  color: white;
}
.jjt-table th {
  padding: 12px 10px;
  text-align: center;
  font-weight: 700;
  font-family: var(--jjt-hindi), var(--jjt-font);
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
  border-right: 1px solid rgba(255,255,255,0.15);
}
.jjt-table th:last-child { border-right: none; }
.jjt-th-sno   { width: 50px;  }
.jjt-th-title { text-align: left !important; min-width: 220px; }
.jjt-th-date  { width: 130px; }
.jjt-th-status{ width: 120px; }

/* ── Body Rows ── */
.jjt-table tbody tr {
  border-bottom: 1px solid var(--jjt-border);
  transition: background 0.12s;
}
.jjt-table tbody tr:nth-child(even) { background: #fafafa; }
.jjt-table tbody tr:hover           { background: #fff8f8; }

/* Closed row */
.jjt-row-closed { opacity: 0.72; }
.jjt-row-closed td { background: #f9f9f9 !important; }

/* Urgent row */
.jjt-row-urgent {
  background: #fff9f0 !important;
  border-left: 4px solid var(--jjt-orange) !important;
}

/* ── Cells ── */
.jjt-table td { padding: 11px 10px; vertical-align: middle; }

.jjt-td-sno {
  text-align: center;
  font-weight: 700;
  color: var(--jjt-gray);
  font-size: 13px;
  background: #f1f3f5;
  width: 50px;
}

.jjt-td-title { text-align: left; }
.jjt-post-link {
  color: var(--jjt-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.4;
  display: block;
  transition: color 0.15s;
}
.jjt-post-link:hover { color: var(--jjt-accent); text-decoration: underline; }
.jjt-dept {
  font-size: 11px;
  color: var(--jjt-gray);
  margin-top: 3px;
  font-style: italic;
}

.jjt-td-date  { text-align: center; }
.jjt-td-status{ text-align: center; }

/* ── Date Styles ── */
.jjt-date       { font-size: 13px; font-weight: 600; color: var(--jjt-text); }
.jjt-date em    { display: block; font-size: 11px; font-style: normal; font-weight: 700; margin-top: 2px; }
.jjt-date-today { color: var(--jjt-primary) !important; }
.jjt-date-today em { color: var(--jjt-orange); }
.jjt-date-urgent { color: var(--jjt-orange) !important; }
.jjt-date-urgent em { color: var(--jjt-orange); }
.jjt-date-past  { color: var(--jjt-gray); }
.jjt-na         { color: #ccc; font-size: 16px; }

/* ── Download Button ── */
.jjt-dl-btn {
  display: inline-block;
  background: var(--jjt-blue);
  color: white !important;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  text-decoration: none !important;
  margin-top: 4px;
  transition: background 0.15s;
}
.jjt-dl-btn:hover { background: #1a6fa8; }

/* ── Status Badges ── */
.jjt-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  font-family: var(--jjt-hindi), var(--jjt-font);
}
.jjt-badge-active   { background: #d4edda; color: #155724; }
.jjt-badge-closed   { background: #f8d7da; color: #721c24; }
.jjt-badge-soon     { background: #fff3cd; color: #856404; }
.jjt-badge-today    { background: #f8d7da; color: #721c24; animation: jjt-pulse 1.5s infinite; }
.jjt-badge-admit    { background: #cce5ff; color: #004085; }
.jjt-badge-result   { background: #e2d9f3; color: #432874; }
.jjt-badge-upcoming { background: #d1ecf1; color: #0c5460; }
.jjt-badge-awaited  { background: #fff3cd; color: #856404; }
.jjt-badge-na       { background: #f1f3f5; color: #adb5bd; }
.jjt-badge-notify   { background: #fff3cd; color: #856404; }
.jjt-badge-counsel  { background: #d4edda; color: #155724; }

@keyframes jjt-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

/* ── Footer Note ── */
.jjt-footer-note {
  background: #ecf0f1;
  border: 1px solid var(--jjt-border);
  border-top: none;
  padding: 8px 14px;
  font-size: 12px;
  color: var(--jjt-gray);
  font-family: var(--jjt-hindi), var(--jjt-font);
  border-radius: 0 0 var(--jjt-radius) var(--jjt-radius);
}

/* ── No Results / Empty ── */
.jjt-no-results, .jjt-empty {
  text-align: center;
  padding: 30px;
  color: var(--jjt-gray);
  font-size: 14px;
  font-family: var(--jjt-hindi), var(--jjt-font);
  background: #f8f9fa;
  border: 1px solid var(--jjt-border);
  border-top: none;
}

/* ── Type-specific header colors ── */
.jjt-type-admit  .jjt-page-heading { background: linear-gradient(135deg, #1565c0, #1976d2); }
.jjt-type-admit  .jjt-table thead tr { background: #1565c0; }
.jjt-type-result .jjt-page-heading { background: linear-gradient(135deg, #6a1b9a, #8e24aa); }
.jjt-type-result .jjt-table thead tr { background: #6a1b9a; }
.jjt-type-answer_key .jjt-page-heading { background: linear-gradient(135deg, #e65100, #f57c00); }
.jjt-type-answer_key .jjt-table thead tr { background: #e65100; }
.jjt-type-admission .jjt-page-heading { background: linear-gradient(135deg, #00695c, #00897b); }
.jjt-type-admission .jjt-table thead tr { background: #00695c; }
.jjt-type-govt .jjt-page-heading { background: linear-gradient(135deg, #37474f, #546e7a); }
.jjt-type-govt .jjt-table thead tr { background: #37474f; }

/* ── Mobile ── */
@media (max-width: 600px) {
  .jjt-page-heading { font-size: 16px; padding: 12px 14px; }
  .jjt-table { font-size: 12px; }
  .jjt-table th, .jjt-table td { padding: 8px 6px; }
  .jjt-th-status, .jjt-td-status { display: none; } /* hide status on very small screens */
  .jjt-post-link { font-size: 12px; }
  .jjt-sum-num { font-size: 18px; }
  .jjt-search-row { padding: 8px 10px; }
}

@media (max-width: 400px) {
  .jjt-th-date, .jjt-td-date { white-space: nowrap; }
}
