/* Notes styling */
.notepad {
  resize: none;
  outline: none !important;
  background-color: transparent !important;
  transition: all 0.2s ease;
}
.notepad:focus {
  box-shadow: none !important;
  border: none !important;
  outline: none !important;
}

/* Make the card body background match the notepad */
.card-body .form-group .notepad {
  background-color: inherit !important;
}

/* Remove focus outline from title field as well */
.form-control.border-0.bg-transparent:focus {
  box-shadow: none !important;
  outline: none !important;
}

/* Divider styling */
hr.divider {
  border: 0;
  height: 1px;
  background-image: linear-gradient(to right, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.03));
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
}

/* Sticky table headers */
.table-responsive {
  overflow-y: auto;
}

.table-responsive thead.thead-light {
  position: sticky;
  top: 0;
  z-index: 1;
  background-color: #f6f9fc;
}

.table-responsive thead.thead-light th {
  position: sticky;
  top: 0;
  background-color: #f6f9fc;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Simple minimalistic calendar */
.simple-calendar {
  margin: 0 auto;
  max-width: 100%;
  border-radius: 0.375rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  background-color: white;
  border: 1px solid #e9ecef;
}

.simple-calendar .calendar-header {
  background-color: #f6f9fc;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  width: 100%;
  justify-content: space-between;
}

.simple-calendar .day-header {
  text-align: center;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.7rem;
  color: #8898aa;
  padding: 8px 0;
  flex: 1;
  border-right: 1px solid #e9ecef;
}

.simple-calendar .day-header:last-child {
  border-right: none;
}

.simple-calendar .calendar-body {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
}

.simple-calendar .day-cell {
  position: relative;
  flex: 0 0 14.2857142857%;
  aspect-ratio: 1;
  height: 50px;
  border: 1px solid #e9ecef;
  padding: 0;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  overflow: hidden;
  box-sizing: border-box;
}

.simple-calendar .day-cell:nth-child(7n) {
  border-right: 1px solid #e9ecef;
}

.simple-calendar .day-cell.today {
  background-color: rgba(94, 114, 228, 0.1) !important;
  box-shadow: inset 0 0 0 2px #5e72e4 !important;
  z-index: 1;
}

.simple-calendar .day-cell.lesson-day {
  background-color: rgba(45, 206, 137, 0.6) !important;
  box-shadow: inset 0 0 0 2px #2dce89 !important;
  z-index: 1;
}

.simple-calendar .day-cell.today.lesson-day {
  background: linear-gradient(135deg, rgba(94, 114, 228, 0.1) 50%, rgba(45, 206, 137, 0.6) 50%) !important;
  box-shadow: inset 0 0 0 2px #5e72e4, inset 0 0 0 1px #2dce89 !important;
}

.simple-calendar .day-number {
  font-size: 0.9rem;
  font-weight: 600;
  color: #525f7f;
  padding: 5px;
  text-align: center;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.5);
  border-bottom: 1px solid rgba(233, 236, 239, 0.5);
}

.simple-calendar .day-cell.today .day-number {
  background-color: #5e72e4;
  color: white;
  border-radius: 0;
  width: 100%;
  height: auto;
  display: block;
}

.simple-calendar .lesson-indicator {
  margin-top: auto;
  background-color: #2dce89;
  color: white;
  border-radius: 0;
  padding: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  width: 100%;
}

.simple-calendar .lesson-indicator:hover {
  transform: translateY(-2px);
  box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.15);
}

.simple-calendar .day-cell.lesson-day:hover {
  background-color: rgba(45, 206, 137, 0.2);
  transform: scale(1.02);
  z-index: 2;
}

.simple-calendar .lesson-indicator i {
  margin-right: 2px;
}

.calendar-legend {
  margin-top: 10px;
}

.calendar-legend .legend-color {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 5px;
  border-radius: 2px;
}

@media (max-width: 767.98px) {
  .simple-calendar .day-header,
  .simple-calendar .day-cell {
    font-size: 0.7rem;
  }
  .simple-calendar .lesson-indicator {
    font-size: 0.6rem;
    padding: 2px;
  }
  .navbar-toggler {
    float: right !important;
    margin-left: auto !important;
    position: relative !important;
    right: 0 !important;
    top: 0 !important;
    background: transparent !important;
    border: none !important;
    padding: 0.5rem !important;
    z-index: 1031 !important;
  }
  .navbar-toggler i {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: #8b5cf6 !important;
  }
  .navbar {
    padding: 0.5rem !important;
    margin: 0.5rem !important;
    width: auto !important;
    max-width: calc(100% - 1rem) !important;
  }
  .navbar-collapse {
    margin: 0 !important;
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
  }
  .auth-buttons-mobile {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    margin-top: 1rem !important;
    gap: 0.5rem !important;
    flex-wrap: wrap !important;
  }
  .auth-buttons-mobile .btn {
    flex: 1 !important;
    text-align: center !important;
    min-width: 100px !important;
    max-width: 150px !important;
    margin: 0 auto !important;
  }
}
/* Fix for Safari which doesn't support aspect-ratio */
@supports not (aspect-ratio: 1) {
  .simple-calendar .day-cell {
    height: 0;
  }
  .simple-calendar .day-cell > * {
    position: absolute;
  }
  .simple-calendar .day-number {
    top: 0;
    left: 0;
    right: 0;
  }
  .simple-calendar .lesson-indicator {
    bottom: 0;
    left: 0;
    right: 0;
  }
}
/* Note specific styling */
.card.bg-secondary.shadow .card-body {
  background-color: #f8f9fe;
}

/* Auth page navbar fixes */
.auth-page .navbar-toggler {
  background: transparent !important;
  position: absolute !important;
  right: 15px !important;
  top: 10px !important;
  z-index: 1050 !important;
}

.auth-page .navbar-toggler-icon {
  background-image: none !important;
  position: relative;
}

.auth-page .navbar-toggler-icon:after {
  content: "\f0c9";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

@font-face {
  font-family: "Mokoto";
  src: font-url(asset-path("Mokoto.ttf")) format("truetype"), url(/fonts/Mokoto.ttf) format("truetype"), url(/assets/Mokoto.ttf) format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
