/* mcasyllabus-table.css */

.syl-wrap {
  display: block;
  overflow-x: scroll !important;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  box-sizing: border-box;
  padding: 1.5rem;
  margin: 2rem auto;
  max-width: 1000px;
  background: #fff;
  border-radius: 15px;
  border: 3px solid rgba(220,53,69,0.6);
  box-shadow: 0 6px 15px rgba(0,0,0,0.2), 0 0 10px rgba(220,53,69,0.35);
  scrollbar-width: thin;
  scrollbar-color: #0056b3 #e0e9f8;
}

.syl-wrap::-webkit-scrollbar {
  height: 8px;
  display: block;
}

.syl-wrap::-webkit-scrollbar-track {
  background: #e0e9f8;
  border-radius: 10px;
}

.syl-wrap::-webkit-scrollbar-thumb {
  background: #0056b3;
  border-radius: 10px;
  border: 2px solid #e0e9f8;
}

.syl-wrap::-webkit-scrollbar-thumb:hover {
  background: #003d82;
}

.syl-wrap *,
.syl-wrap *::before,
.syl-wrap *::after {
  max-width: none !important;
  box-sizing: border-box;
}

.syl-table {
  border-collapse: collapse;
  width: max-content;
  min-width: 100%;
  font-size: 1rem;
  table-layout: auto;
}

.syl-table caption {
  font-size: 1.4rem;
  font-weight: bold;
  margin-bottom: 1rem;
  text-align: left;
  color: #0056b3;
  text-transform: uppercase;
  white-space: nowrap;
}

.syl-table th,
.syl-table td {
  border: 1px solid #ddd;
  padding: 1rem 1.2rem;
  text-align: left;
  white-space: nowrap;
  max-width: none !important;
}

.syl-table th {
  background: linear-gradient(135deg, #0056b3, #003d82);
  color: #fff;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.syl-table tbody tr:nth-child(even) { background: #f9f9f9; }
.syl-table tbody tr:hover { background: #e6f7ff; }

/* Subject column — must come AFTER the general th,td rule */
.syl-wrap .syl-table tbody tr td:nth-child(2) {
  white-space: normal !important;
  word-break: break-word !important;
  min-width: 180px;
  max-width: 280px !important;
}

.subject-collapsible-content { max-height: none !important; overflow: visible !important; }
.subject-toggle-btn { display: none !important; }

@media (max-width: 768px) {
  .syl-wrap { padding: 1rem 0.8rem 1.6rem; margin: 1.5rem auto; }
  .syl-table { font-size: 0.82rem; }
  .syl-table th, .syl-table td { padding: 0.65rem 0.75rem; }
  .syl-table caption { font-size: 1rem; }
  .syl-wrap::-webkit-scrollbar { height: 6px; }
  .syl-wrap .syl-table tbody tr td:nth-child(2) { min-width: 140px; max-width: 200px !important; }
}

@media (max-width: 480px) {
  .syl-wrap { padding: 0.7rem 0.5rem 1.4rem; margin: 1rem auto; }
  .syl-table { font-size: 0.74rem; }
  .syl-table th, .syl-table td { padding: 0.5rem 0.55rem; }
  .syl-table caption { font-size: 0.88rem; }
  .syl-wrap .syl-table tbody tr td:nth-child(2) { min-width: 120px; max-width: 170px !important; }
}

@media (max-width: 375px) {
  .syl-wrap { padding: 0.6rem 0.4rem 1.3rem; }
  .syl-table { font-size: 0.68rem; }
  .syl-table th, .syl-table td { padding: 0.4rem 0.45rem; }
  .syl-table caption { font-size: 0.8rem; }
  .syl-wrap .syl-table tbody tr td:nth-child(2) { min-width: 100px; max-width: 150px !important; }
}

@media (max-width: 320px) {
  .syl-wrap { padding: 0.5rem 0.3rem 1.2rem; border-width: 2px; }
  .syl-table { font-size: 0.62rem; }
  .syl-table th, .syl-table td { padding: 0.35rem 0.4rem; }
  .syl-table caption { font-size: 0.74rem; }
  .syl-wrap .syl-table tbody tr td:nth-child(2) { min-width: 90px; max-width: 130px !important; }
}

.syl-wrap::-webkit-scrollbar {
  height: 8px;
  display: block !important;
  visibility: visible !important;
}

/* ──────────────── SYLLABUS ACCORDION (+ / −) ────────────────
   Built by the "SYLLABUS ACCORDION" block in /main_js/script.js (pages with <body data-syl-acc>). */
.syl-acc{margin:.5rem 0;border:1px solid rgba(30,58,138,.22);border-radius:10px;background:rgba(0,123,255,.04);overflow:hidden}
.syl-acc>summary{display:flex;align-items:center;gap:.6rem;cursor:pointer;list-style:none;padding:.6rem .85rem;font-weight:700;color:var(--primary,#1e3a8a);user-select:none;-webkit-tap-highlight-color:transparent}
.syl-acc>summary::-webkit-details-marker{display:none}
.syl-acc>summary::marker{content:""}
.syl-acc>summary::before{content:"+";flex:0 0 1.5rem;width:1.5rem;height:1.5rem;line-height:1.4rem;text-align:center;border-radius:50%;background:linear-gradient(135deg,#007bff,#0056b3);color:#fff;font-size:1.1rem;font-weight:700}
.syl-acc[open]>summary::before{content:"\2212"}
.syl-acc>summary:focus-visible{outline:2px solid #1e3a8a;outline-offset:2px}
.syl-acc-body{padding:.1rem .95rem .6rem}
.syl-acc-body p{margin:.35rem 0}
.syl-acc-body ul,.syl-acc-body ol{margin:.25rem 0 .25rem 1.1rem;padding-left:1rem}
