/* ════════════════════════════════════════════════════════════════
   timetable-2027.css — 2027 Sathara Rajagaha timetable
   • day colour chips + table extras (courses.html and teacher pages)
   • big timetable popup on index.html (opened by js/timetable-2027.js)
   ════════════════════════════════════════════════════════════════ */
.slot-day.tt-mon{ background:#e3efff; color:#1b4a94; border:1px solid #2f6fd0; }
.slot-day.tt-tue{ background:#ffe9d9; color:#a04a0b; border:1px solid #e2711d; }
.slot-day.tt-wed{ background:#e2f6e6; color:#1c6b32; border:1px solid #2e9e4d; }
.slot-day.tt-thu{ background:#fff3c9; color:#7d6000; border:1px solid #d1a100; }
.slot-day.tt-fri{ background:#f1e6fb; color:#5b2c91; border:1px solid #8a4fc9; }
.slot-day.tt-sat{ background:#e0f5f5; color:#0c6466; border:1px solid #15999b; }
.slot-day.tt-sun{ background:#ffe3e6; color:#9c1f2e; border:1px solid #d63b4c; }
.tt2027 .slot-time{ font-weight:700; white-space:nowrap; }
.tt2027 .table-schedule thead th{ background:#14213d; border-bottom:3px solid #f4a300; text-align:center; }
.tt2027 .table-schedule thead th a{ color:#fff; text-decoration:underline; text-underline-offset:3px; }
.tt2027 .table-schedule tbody td{ text-align:center; }
.tt-teacher{ display:block; margin-top:3px; font-size:11.5px; font-weight:500; color:#ffd98a; }
.tt-teacher.tt-dark{ color:#55607a; }
html.dark .tt-teacher.tt-dark{ color:#cbd5e1; }
.tt-na{ color:#b9c2d3; }
.tt-h3{ margin:18px 0 10px; font-size:18px; font-weight:800; padding-left:10px; border-left:5px solid #f4a300; }
.tt-actions{ display:flex; flex-wrap:wrap; gap:10px; justify-content:center; margin:6px 0 18px; }
.tt-btn{ display:inline-flex; align-items:center; gap:6px; padding:10px 18px; border-radius:999px;
  background:#14213d; color:#fff !important; font-weight:700; font-size:14px; text-decoration:none !important;
  box-shadow:0 6px 16px rgba(20,33,61,.25); transition:transform .15s ease; }
.tt-btn:hover{ transform:translateY(-2px); }
.tt-btn--alt{ background:#f4a300; color:#14213d !important; }
.tt-legend{ margin:16px 0 0; text-align:center; }
.tt-preview{ display:block; margin-top:18px; border-radius:12px; overflow:hidden; border:1px solid rgba(0,0,0,.12); }
.tt-preview img{ display:block; width:100%; height:auto; }
.tt-poster{ max-width:560px; margin:0 auto; }

/* keep the 7-subject table inside its card; scroll sideways on small screens */
.tt2027 .table-responsive{ overflow-x:auto; -webkit-overflow-scrolling:touch; }
.tt2027 .table-schedule thead th, .tt2027 .table-schedule tbody td{ padding:10px 6px; }
.tt2027 .slot-day{ margin-right:0; margin-bottom:4px; }
.tt2027 .slot-time{ display:block; padding:0; margin-bottom:0; background:none; }
.result-card.tt-poster a.fancybox{ display:block; height:auto !important; max-height:none !important; aspect-ratio:auto !important; }
.result-card.tt-poster img{ width:100%; height:auto !important; max-height:none !important; object-fit:contain; }

/* slogan + contact block under the timetable */
.tt-slogan{ display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:18px 36px; margin-top:22px;
  padding:22px 26px; border-radius:16px; background:#14213d; color:#fff; border-bottom:6px solid #f4a300; }
.tt-slogan__l{ display:flex; flex-direction:column; font-family:'Abhaya Libre','Noto Sans Sinhala',serif; font-weight:800; line-height:1.3; }
.tt-slogan__l span:nth-child(1){ font-size:clamp(24px,3.4vw,36px); color:#fff; }
.tt-slogan__l span:nth-child(2){ font-size:clamp(28px,4vw,42px); color:#ffd98a; }
.tt-slogan__l span:nth-child(3){ font-size:clamp(32px,4.6vw,50px); color:#f4a300; }
.tt-slogan__r{ display:flex; flex-direction:column; align-items:center; text-align:center; }
.tt-slogan__brand{ display:flex; align-items:center; gap:12px; }
.tt-slogan__brand img{ width:96px; height:96px; border-radius:16px; border:2px solid #fff; }
.tt-slogan__brand b{ font-family:'Abhaya Libre','Noto Sans Sinhala',serif; font-size:48px; line-height:1.1; color:#fff; }
.tt-slogan__r small{ margin-top:8px; font-size:14px; font-weight:600; color:#ffd98a; }
.tt-slogan__r strong{ font-size:34px; line-height:1.25; font-weight:800; color:#fff; }
.tt-slogan__r a{ font-size:30px; font-weight:800; color:#f4a300 !important; text-decoration:none; letter-spacing:.5px; }

.tt2027 .table-schedule tbody td.tt-grade{ font-size:30px; font-weight:800; line-height:1; color:#14213d; }
html.dark .tt2027 .table-schedule tbody td.tt-grade{ color:#f1f5f9 !important; }

/* ---------- popup ---------- */
.ttp-overlay{ position:fixed; inset:0; z-index:2100; display:none; align-items:center; justify-content:center;
  padding:10px; background:rgba(2,6,23,.78); backdrop-filter:blur(3px); }
.ttp-overlay.open{ display:flex; animation:ttpFade .3s ease both; }
.ttp-box{ position:relative; width:min(1500px,100%); max-height:calc(100vh - 20px); display:flex; flex-direction:column;
  background:#fff; border-radius:16px; overflow:hidden; box-shadow:0 30px 80px rgba(2,6,23,.6);
  font-family:'Noto Sans Sinhala','Open Sans',system-ui,sans-serif; animation:ttpPop .45s cubic-bezier(.2,1.2,.4,1) both; }
.ttp-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 14px;
  background:#14213d; color:#fff; border-bottom:4px solid #f4a300; }
.ttp-head h2{ margin:0; font-size:clamp(16px,2.4vw,24px); font-weight:800; color:#fff; line-height:1.3; }
.ttp-head h2 b{ color:#f4a300; }
.ttp-close{ flex:none; width:38px; height:38px; border:0; border-radius:50%; background:#fff; color:#14213d;
  font-size:18px; font-weight:800; cursor:pointer; line-height:1; }
.ttp-scroll{ overflow:auto; -webkit-overflow-scrolling:touch; background:#eef1f7; }
.ttp-scroll img{ display:block; width:100%; min-width:980px; height:auto; }
.ttp-foot{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; justify-content:center; padding:10px 12px; background:#fff; }
.ttp-hint{ display:none; width:100%; margin:0; text-align:center; font-size:12.5px; color:#55607a; }
.ttp-foot .tt-btn{ padding:9px 16px; font-size:13.5px; }
.ttp-later{ border:1px solid #b9c2d3; background:#fff; color:#14213d; padding:9px 16px; border-radius:999px;
  font-weight:700; font-size:13.5px; cursor:pointer; font-family:inherit; }
@media (max-width:1000px){ .ttp-hint{ display:block; } }
@keyframes ttpFade{ from{opacity:0} to{opacity:1} }
@keyframes ttpPop{ from{opacity:0; transform:scale(.94) translateY(14px)} to{opacity:1; transform:none} }
@media (prefers-reduced-motion:reduce){ .ttp-overlay.open,.ttp-box{ animation:none; } }
