/* 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;
}