/* website/static/css/timetable-monthly-chess.css */

/* ---------------------------------------------------------
🌌 Luxury Chessboard Timetable & Schedule (Theme-Aware)
------------------------------------------------------------
- Background: follows global theme variables (no image)
- Timetable wrapped in a scrollable container (.timetable-wrapper)
- Compact cells on desktop to avoid page takeover
- Integrated Activity Box styles with internal scrolling
- Footer clock styling added
------------------------------------------------------------ */

/* 🌌 Page Background (theme-driven) */
body {
  background: var(--content-bg, #111);
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  color: var(--color-text, #fff);
  overflow-y: auto; /* ensure page scroll always works */
}

/* 🌌 Timetable Editor Container */
.timetable-editor {
  margin: 2rem auto;
  max-width: 1000px;
  padding: 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid var(--glass-border, rgba(255,255,255,0.2));
  box-shadow: 0 0 25px rgba(0,0,0,0.35);
}

/* ✅ Scrollable wrapper to contain the timetable height/width */
.timetable-wrapper {
  max-height: 70vh;     /* contain vertical space */
  overflow-y: auto;     /* vertical scroll within timetable */
  overflow-x: auto;     /* horizontal scroll if table is wide */
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0.5rem;
}

/* ------------------------------------------------------------
📅 Schedule Table Styling (Monthly)
------------------------------------------------------------ */
table.schedule {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  border-radius: 16px;
  background: transparent;
}

table.schedule th,
table.schedule td {
  border: 1px solid rgba(255,255,255,0.15);
  padding: 0.6rem; /* compact padding for PC screens */
  transition: background 0.3s ease;
}

/* Header with rose-gold gradient */
table.schedule th {
  background: linear-gradient(90deg, #ff9966, #ff5e62, #ffa07a);
  color: #fff;
  font-weight: bold;
  font-size: 0.95rem;
}

/* Chessboard vibe (theme-aware fallback) */
table.schedule tr:nth-child(even) td:nth-child(odd),
table.schedule tr:nth-child(odd) td:nth-child(even) {
  background-color: rgba(245, 222, 179, 0.28); /* light tone */
  backdrop-filter: blur(8px);
}
table.schedule tr:nth-child(even) td:nth-child(even),
table.schedule tr:nth-child(odd) td:nth-child(odd) {
  background-color: rgba(92, 51, 23, 0.28);    /* dark tone */
  backdrop-filter: blur(12px);
}
table.schedule tr:hover td {
  background: rgba(255,255,255,0.18);
}

/* 📆 Calendar Day Cells (compact) */
.calendar-day {
  min-width: 70px;   /* reduced width */
  height: 90px;      /* reduced height */
  vertical-align: top;
  cursor: pointer;
  position: relative;
  border-radius: 12px;
}
.calendar-day strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.2rem;
}
.calendar-day .date-muted {
  font-size: 0.75rem;
  color: #aaa;
}
.calendar-day.empty {
  background: rgba(255,255,255,0.02);
  cursor: default;
}

/* ✅ Current Day Highlight */
.calendar-day.today {
  background: linear-gradient(135deg, #ff9966, #ff5e62);
  color: #fff;
  border: 2px solid #ffd700;
  box-shadow: 0 0 15px rgba(255,215,0,0.6);
}

/* 🌫️ Past Days */
.calendar-day.past {
  background: rgba(255,255,255,0.05);
  color: #888;
  opacity: 0.7;
}

/* 🌫️ Other-Month Days */
.calendar-day.other-month {
  background: transparent;
  color: #bbb;
  opacity: 0.4;
}

/* 📌 Activity Badge */
.badge-info {
  display: inline-block;
  margin-top: 0.3rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: linear-gradient(45deg, #ff9966, #ff5e62);
  color: #fff;
  font-size: 0.75rem;
}

/* ✔ / ✘ Checklist Marks */
.checkmark {
  color: #ffd700;
  font-weight: bold;
  margin-left: 4px;
}
.crossmark {
  color: #ff4444;
  font-weight: bold;
  margin-left: 4px;
}

/* ------------------------------------------------------------
📅 Weekly Timetable Styling (kept compact)
------------------------------------------------------------ */
table.timetable {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  border-radius: 16px;
  background: transparent;
}
table.timetable th,
table.timetable td {
  border: 1px solid rgba(255,255,255,0.15);
  padding: 0.6rem;
  transition: background 0.3s ease;
}

/* Rose-gold glowing headers */
table.timetable th.day-header {
  background: linear-gradient(90deg, #ff9966, #ff5e62, #ffa07a);
  color: #fff;
  font-weight: bold;
}
table.timetable th.day-header.today {
  background: linear-gradient(135deg, #ff9966, #ff5e62);
  color: #fff;
  box-shadow: 0 0 12px rgba(255,215,0,0.6);
}
table.timetable th.day-header.past {
  background: rgba(255,255,255,0.05);
  color: #888;
}

/* Chess vibe for tasks */
.task-box {
  min-width: 90px; /* reduced width */
  padding: 0.5rem;
  vertical-align: top;
  border-radius: 10px;
}
.task-box:nth-child(even) {
  background-color: rgba(245, 222, 179, 0.28);
  backdrop-filter: blur(8px);
}
.task-box:nth-child(odd) {
  background-color: rgba(92, 51, 23, 0.28);
  backdrop-filter: blur(12px);
}
.task-box.today {
  background: linear-gradient(135deg, #ff9966, #ff5e62);
  color: #fff;
}
.task-box.past {
  background: rgba(255,255,255,0.05);
  color: #888;
  opacity: 0.7;
}
.task-box.empty {
  background: rgba(255,255,255,0.02);
  color: #aaa;
}

/* ------------------------------------------------------------
🔘 Navigation Buttons
------------------------------------------------------------ */
.nav-btn {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: bold;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}
.nav-btn-primary {
  background: linear-gradient(45deg, #ff9966, #ff5e62);
  color: #fff;
}
.nav-btn-secondary {
  background: linear-gradient(45deg, #ffa07a, #ff7f50);
  color: #fff;
}
.nav-btn-success {
  background: linear-gradient(45deg, #ff9966, #ffd700);
  color: #fff;
}
.nav-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 0 12px rgba(255,255,255,0.35);
}

/* ------------------------------------------------------------
🏷️ Tag Chips & Suggestions
------------------------------------------------------------ */
.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0.5rem 0;
}
.chip {
  background: rgba(224,240,255,0.8);
  color: #034a7c;
  padding: 4px 8px;
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background 0.3s ease, transform 0.2s ease;
}
.chip:hover {
  background: rgba(255,153,102,0.3);
  transform: scale(1.05);
}
.suggestion {
  cursor: pointer;
  background: rgba(240,240,240,0.85);
  margin: 2px 0;
  padding: 4px 6px;
  border-radius: 6px;
  color: #000;
  transition: background 0.3s ease, transform 0.2s ease;
}
.suggestion:hover {
  background: rgba(255,153,102,0.25);
  transform: scale(1.05);
}

/* ------------------------------------------------------------
⚠️ Error Styling
------------------------------------------------------------ */
.error {
  color: #ff4444;
  font-size: 0.9rem;
  margin-top: 4px;
  font-weight: bold;
}

/* ------------------------------------------------------------
🌈 Rainbow Title Styling
------------------------------------------------------------ */
.rainbow-title {
  text-align: center;
  background: linear-gradient(90deg, #ff9966, #ff5e62, #ffa07a, #ffd700);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: roseTitle 8s ease infinite;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 1px;
}
@keyframes roseTitle {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ------------------------------------------------------------
📦 Activity Box Styling (Inline Panel Below Timetable)
------------------------------------------------------------ */
.activity-box {
  margin-top: 2rem;
  padding: 1.5rem;
  border-radius: 16px;
  background: var(--glass-bg, rgba(255,255,255,0.08));
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid var(--glass-border, rgba(255,255,255,0.2));
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  color: var(--glass-text, #fff);
}
.activity-box-header {
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  background: linear-gradient(90deg, #ff9966, #ff5e62, #ffa07a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
}

/* ✅ Scrollable activity list inside the box */
#activity-list {
  max-height: 250px;
  overflow-y: auto;
  padding-right: 0.5rem; /* room for scrollbar */
}
#activity-list::-webkit-scrollbar {
  width: 8px;
}
#activity-list::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
}
#activity-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ff9966, #ff5e62);
  border-radius: 8px;
}
#activity-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ffa07a, #ffd700);
}

.activity-box label {
  font-weight: 600;
  color: var(--color-accent, #ffd700);
}
.activity-box input,
.activity-box textarea {
  width: 100%;
  padding: 0.6rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.06);
  color: #fff;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.activity-box input:focus,
.activity-box textarea:focus {
  border-color: #ff9966;
  background: rgba(255,255,255,0.1);
  outline: none;
}
.activity-box .nav-btn {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: bold;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}
.activity-box .nav-btn-primary {
  background: linear-gradient(45deg, #ff9966, #ff5e62);
  color: #fff;
}
.activity-box .nav-btn-secondary {
  background: linear-gradient(45deg, #ffa07a, #ff7f50);
  color: #fff;
}
.activity-box .nav-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(255,255,255,0.4);
}

/* ------------------------------------------------------------
📱 Responsive Adjustments
------------------------------------------------------------ */
@media (max-width: 768px) {
  .calendar-day {
    min-width: 64px;
    height: 84px;
    font-size: 0.9rem;
  }
  .task-box {
    min-width: 72px;
    font-size: 0.85rem;
  }
  .activity-box {
    padding: 1rem;
  }
  .activity-box-header {
    font-size: 1rem;
  }
  .timetable-wrapper {
    max-height: 60vh; /* shorter wrapper on tablets */
  }
}

@media (max-width: 480px) {
  .calendar-day {
    min-width: 56px;
    height: 76px;
    font-size: 0.8rem;
  }
  .task-box {
    min-width: 64px;
    font-size: 0.8rem;
  }
  .rainbow-title {
    font-size: 1.5rem;
  }
  #activity-list {
    max-height: 180px; /* tighter list on small screens */
  }
  .timetable-wrapper {
    max-height: 50vh; /* even shorter wrapper on phones */
  }
}

/* ------------------------------------------------------------
🕒 Footer Clock Styling
------------------------------------------------------------ */
.footer-clock {
  text-align: center;
  margin-top: 2rem;
  padding: 0.8rem;
  font-weight: bold;
  color: var(--color-accent, #ffd700);
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
