/* ======================================
   TAMILAI CALENDAR DESKTOP + MOBILE
====================================== */
.calendar-popup {
  width: 90%;
  max-width: 520px;
  background: #001b3d;
  border: 2px solid #00d9ff;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 0 25px #00d9ff;
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-height: 85vh;
  overflow-y: auto;
}
/* HEADER */
.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.calendar-header h2 {
  color: #00d9ff;
  font-size: 26px;
  font-weight: 700;
}
.calendar-header button {
  width: 45px;
  height: 45px;
  border: none;
  border-radius: 50%;
  background: #13c7ff;
  color: #001b3d;
  cursor: pointer;
  font-weight: bold;
  font-size: 18px;
}
/* WEEKDAYS */
.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
}
/* DAYS */
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.calendar-day {
  min-height: 50px;
  background: #082d63;
  border: 1px solid #00bfff;
  border-radius: 10px;
  color: var(--text-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: 0.3s;
}
.calendar-day:hover {
  background: #13c7ff;
  color: #001b3d;
}
.calendar-day.has-task {
  box-shadow: 0 0 12px #00d9ff;
  border: 2px solid #00d9ff;
}
/* TASK PANEL */
.calendar-tasks {
  background: #082d63;
  border-radius: 12px;
  padding: 12px;
}
.calendar-tasks h3 {
  color: #00d9ff;
  margin-bottom: 10px;
}
.task-card {
  background: #001b3d;
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 8px;
}
.task-card h4 {
  color: var(--text-primary);
  margin-bottom: 5px;
}
.task-card p {
  color: #d9f8ff;
  font-size: 13px;
}
.task-card button {
  margin-top: 10px;
  background: #ff4d4d;
  border: none;
  color: var(--text-primary);
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}
/* ======================================
   TAMILAI CALENDAR MOBILE V3
====================================== */
@media screen and (max-width: 768px) {
  .calendar-popup {
    width: 95%;
    max-width: 260px;
    height: auto;
    max-height: 85vh;
    overflow-y: auto;
  }
  .calendar-header {
    margin-bottom: 10px;
  }
  .calendar-header h2 {
    font-size: 11px;
    font-weight: 700;
  }
  .calendar-header button {
    width: 30px;
    height: 30px;
    font-size: 11px;
  }
  .calendar-weekdays {
    font-size: 8px;
    margin-bottom: 4px;
  }
  .calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    justify-content: center;
  }
  .calendar-day {
    width: 28px;
    height: 28px !important;
    min-height: 28px;
    font-size: 9px;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 6px;
  }
  .calendar-actions {
    margin-top: 8px;
    position: sticky;
    bottom: 0;
    background: #02142b;
    padding-top: 8px;
  }
  .today-tasks-panel {
    margin-top: 8px;
    padding: 8px;
    border-radius: 10px;
    max-height: 140px;
    overflow-y: auto;
  }
  .today-tasks-panel h3 {
    font-size: 12px;
    margin-bottom: 6px;
  }
  .task-item {
    padding: 7px;
    margin-bottom: 6px;
    font-size: 10px;
    border-radius: 8px;
  }
  .task-delete {
    padding: 4px 6px;
    font-size: 10px;
  }
  #closeCalendarBtn {
    display: block;
    width: 180px;
    height: 45px;
    margin: 15px auto 0 auto;
    border: none;
    border-radius: 12px;
    background: linear-gradient(90deg, #13c7ff, #1da1f2);
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 0 15px #13c7ff;
    transition: 0.3s;
  }
  #closeCalendarBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px #13c7ff;
  }
}
/* ======================================
   TASK POPUP
====================================== */
.task-popup {
  width: 450px;
  max-width: 95%;
  background: #02142b;
  border: 1px solid var(--primary);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 0 20px var(--primary);
}
.task-popup h2 {
  color: var(--primary);
  margin-bottom: 15px;
}
.task-popup input,
.task-popup textarea {
  width: 100%;
  margin-bottom: 12px;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: #07254d;
  color: var(--text-primary);
}
.task-buttons {
  display: flex;
  gap: 10px;
}
.task-buttons button {
  flex: 1;
  height: 45px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}
#saveTaskBtn {
  background: #00cfff;
  color: var(--text-primary);
}
#cancelTaskBtn {
  background: #ff4d4d;
  color: var(--text-primary);
}
/* TASK PANEL */
.today-tasks-panel {
  margin-top: 20px;
  padding: 15px;
  border-radius: 12px;
  background: #07254d;
  color: var(--text-primary);
}
.today-tasks-panel h3 {
  color: var(--primary);
  margin-bottom: 10px;
}
.task-item {
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 10px;
  background: #02142b;
}
.task-delete {
  margin-top: 8px;
  border: none;
  background: #ff4d4d;
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.has-task {
  border: 2px solid var(--primary) !important;
  box-shadow: 0 0 15px var(--primary);
}
#closeCalendarBtn {
  display: block;
  width: 180px;
  height: 45px;
  margin: 15px auto 0 auto;
  border: none;
  border-radius: 12px;
  background: linear-gradient(90deg, #13c7ff, #1da1f2);
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 0 15px #13c7ff;
  transition: 0.3s;
}
#closeCalendarBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 12px #13c7ff;
}
