:host {
  display: flex;
  flex-direction: column;
  height: 100vh;
  font-family: 'Segoe UI', sans-serif;
  background-color: #f9f9f9;
  padding: 1rem;
}

/* Toolbar */
.calendar-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1rem;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  flex-wrap: nowrap; // Prevent wrapping
  min-width: 0;
  overflow-x: auto; // Allow horizontal scroll if needed

  button,
  select {
    background-color: white;
    color: #834dd0;
    border: 3px solid #834dd0;
    padding: 8px 14px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bolder;
    margin-left: 10px;
  }

  button:hover {
    color: white;
    background-color: #834dd0;
  }

  .toolbar-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    padding-left:20px;
    margin-left:30px;
  }

  .calendar-title {
    font-size: 25px;
    font-weight: bolder;
    margin: 0 1rem;
    color: #834dd0;
    padding-left: 110px;
  }

  select {
    background-color: white;
    color: #834dd0;
    border: 1px solid #834dd0;
    margin-left: 1rem;
    flex-shrink: 0;
    min-width: 120px;
   margin-left:25px;
  }

  .toggle-btn1 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .floating-filter {
    margin-left: 1rem;
    flex-shrink: 0;
  }
}

@media (max-width: 900px) {
  .calendar-toolbar {
    gap: 0.5rem;
    padding: 0.5rem;
  }

  .floating-filter {
    margin-left: 0.5rem;
  }
}

/* FullCalendar container */
.full-calendar-wrapper {
  flex-grow: 1;
  overflow-y: auto;
  height: calc(100vh - 100px);
}

/* FullCalendar deep styles */
::ng-deep .fc {
  font-family: 'Segoe UI', sans-serif;
  background-color: #fff;
  color: #834dd0;
  font-weight: bolder;
}

::ng-deep .fc-toolbar-title {
  color: #834dd0;
}

::ng-deep .fc-button {
  background-color: #834dd0 !important;
  border: none !important;
}

::ng-deep .fc-button-primary:not(:disabled) {
  background-color: #834dd0;
  border-color: #834dd0;
}

::ng-deep .fc-daygrid-day-number {
  color: #834dd0;
  font-weight: 600;
}

::ng-deep .fc-day-today {
  background-color: #f2e6ff !important;
  border: 2px solid #834dd0;
}

::ng-deep .fc-timegrid-slot-label {
  font-weight: 700;
  color: #9821d8;
}

::ng-deep .fc-timegrid-now-indicator-line {
  background-color: #834dd0;
  height: 3px !important;
}

/* Color all events in the calendar to your theme color */
::ng-deep .fc-event, 
::ng-deep .fc-event-dot {
  background-color: #8355c4 !important;
  border-color: #834dd0 !important;
  color: #fff !important;
  font-weight: bold;
}

/* For timeGrid (week/day) event bar color */
::ng-deep .fc-timegrid-event {
  background-color: #834dd0 !important;
  border-color: #834dd0 !important;
  color: #fff !important;
}

/* For dayGrid (month) event dot color */
::ng-deep .fc-daygrid-event-dot {
  background-color: #834dd0 !important;
}

/* For event title text */
::ng-deep .fc-event-title {
  color: #fff !important;
}

/* Modal Overlay */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(217, 190, 255, 0.83);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 2rem;
}

/* Modal Content */
.modal-content {
  background-color: white;
  padding: 2rem;
  border-radius: 10px;
  max-width: 1200px;
  width: 90%;
  max-height: 95vh;
  overflow-y: auto;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
}

.modal-content label {
  font-weight: bold;
  color: #834dd0;
}

.modal-content input,
.modal-content textarea,
.modal-content select {
  border: 1px solid #834dd0;
  border-radius: 4px;
  padding: 6px;
  width: 100%;
  font-size: 14px;
}

.modal-content .modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

.modal-content button {
  background-color: #834dd0;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
}

.close {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 22px;
  cursor: pointer;
  color: #834dd0;
}

/* Today's day rounded */
.fc .fc-day-today .fc-daygrid-day-number {
  background-color: #834dd0;
  color: #fff !important;
  border-radius: 50%;
  width: 1.8rem;
  height: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: auto;
}

/* Screen wrapper inside modal */
.screen-wrapper {
  background-color: #f9f9f9;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  max-height: 70vh;
  overflow-y: auto;
}

/* Ensure dynamic component is styled well */
::ng-deep gb-simpletask {
  display: block;
  width: 100%;
  overflow-x: auto;
  padding: 1rem;
  background-color: #fff;
  border-radius: 8px;
}

.calendar-sidebar {
  width: 300px;
  padding: 1rem;
  background-color: #f8f9fa;
  border-right: 1px solid #ddd;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;

  .sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;

    .hamburger {
      background: none;
      border: none;
      font-size: 20px;
      cursor: pointer;

    }

    .logo {
      height: 24px;
    }

    .brand-title {
      font-size: 18px;
      font-weight: bold;
      color: #202124;
    }
  }

  button.create-button {
    background: #1a73e8;
    color: white;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    width: 50%;
    margin-left: 50px;
    transition: background 0.2s ease;

    &:hover {
      background: #1669c1;
    }
  }

  .mini-calendar-container {
    ::ng-deep .fc {
      background: transparent;
      font-size: 13px;
      color: #202124;
    }

    ::ng-deep .fc-daygrid-day-number {
      padding: 4px;
    }
    ::ng-deep .fc-day-today {
      background: #e8f0fe !important;
      border-radius: 50%;
    }
    ::ng-deep .fc-scrollgrid {
      border: none !important;
    }
    ::ng-deep .fc-toolbar-title {
      text-align: center;
      font-size: 14px;
      font-weight: 500;
      margin-bottom: 0.5rem;
    }

    ::ng-deep .fc-col-header-cell-cushion {
      font-weight: 500;
      font-size: 12px;
    }
  }
}
.mini-date-picker {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;

  select {
    width: 49%;
    padding: 6px;
    border-radius: 6px;
    border: 1px solid #834dd0;
    color: #834dd0;
    font-weight: bold;
    background: white;
    cursor: pointer;
    font-size: 13px;
  }
}


/* ✅ ADDITIONS FOR TOGGLING SIDEBAR AND LAYOUT RESIZING */

.calendar-layout {
  display: flex;
  height: 100vh;
  position: relative;
  transition: all 0.3s ease;

  &.sidebar-closed {
    .calendar-sidebar {
      width: 0 !important;
      padding: 0 !important;
      overflow: hidden;
    }

    .calendar-main {
      width: 100% !important;
    }
  }

  .toggle-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1000;
    background: #834dd0;
    color: white;
    border: none;
    padding: 2px 12px;
    font-size: 20px;
    border-radius: 4px;
    cursor: pointer;
  }
}

.calendar-main {
  flex-grow: 1;
  width: calc(100% - 300px);
  transition: all 0.3s ease;
}
.toggle-btn1 {
  display: inline-flex;
  border: 1px solid #ccc;
  border-radius: 999px;
  overflow: hidden;
  background-color: #fff;
  margin-left: 12px;

  button {
    background: none;
    border: none;
    padding: 8px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex: 1;
    color: #666;
    transition: background 0.3s, color 0.3s;

    mat-icon {
      font-size: 20px;
    }

    &.active {
      background-color: #cce6ff; // light blue
      color: #000;
    }

    &:not(:last-child) {
      border-right: 1px solid #ccc;
    }
  }
}
.todo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.todo-sort-menu {
  position: relative;
  display: inline-block;
}

.dots-btn {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 50%;
  transition: background 0.2s;
}

.dots-btn:hover {
  background: #f0f0f0;
}

.sort-dropdown {
  position: absolute;
  right: 0;
  top: 28px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  min-width: 120px;
  z-index: 10;
  list-style: none;
  padding: 0;
  margin: 0;
}

.sort-dropdown li {
  padding: 8px 16px;
  cursor: pointer;
  font-size: 15px;
  color: #333;
  transition: background 0.2s;
}

.sort-dropdown li:hover {
  background: #f5f7fa;
}

.todo-list-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.todo-table-container {
  height: 350px;         // Or any fixed height you want
  max-height: 50vh;      // Or use viewport height for responsiveness
  overflow-y: auto;
  min-height: 0;
}

.todo-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.todo-table th, .todo-table td {
  padding: 8px;
  border: 1px solid #ddd;
  background: #fff;
}

.todo-table th {
  background: #f5f7fa;
  position: sticky;
  top: 0;
  z-index: 1;
}

.todo-table tr:hover {
  background: #f0f6ff;
}
.todo-table tr.overdue {
  background-color: #ffeaea !important;
  color: #d32f2f !important;
  font-weight: bold;
}

