/* Custom styles for responsive lesson plan interface */
body {
  padding-bottom: 60px; /* Ensure content doesn't overlap footer */
}

/* Light mode styles */
body {
  background-color: #f3f4f6;
  color: #1f2937;
}

/* Dark mode styles */
body.dark-mode {
  background-color: #1f2937;
  color: #e5e7eb;
}

body.dark-mode .quadrant {
  background-color: #374151;
  color: #e5e7eb;
}

body.dark-mode .text-gray-800 {
  color: #e5e7eb;
}

body.dark-mode .text-gray-700 {
  color: #d1d5db;
}

body.dark-mode .text-gray-600 {
  color: #1f2937; /* Darker text for better contrast in dark mode */
}

body.dark-mode .bg-white {
  background-color: #374151;
}

body.dark-mode .bg-gray-200 {
  background-color: #4b5563;
}

body.dark-mode .border-gray-300 {
  border-color: #6b7280;
}

body.dark-mode .text-red-500 {
  color: #f87171;
}

body.dark-mode select {
  background-color: #374151;
  color: #e5e7eb;
  border-color: #6b7280;
}

/* Ensure quadrants are touch-friendly and scrollable on mobile */
.quadrant {
  min-height: 300px;
  overflow-y: auto;
  transition: all 0.3s ease;
}

/* Carousel modal styling */
#carouselModal, #standardModal {
  z-index: 20;
}

#carouselContent, #standardContent {
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background-color: #ffffff;
}

body.dark-mode #carouselContent, body.dark-mode #standardContent {
  border-color: #6b7280;
  background-color: #374151;
}

/* Curved spinner arrow buttons */
.carousel-arrow {
  transition: transform 0.2s ease, background-color 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transform: rotate(5deg);
}

.carousel-arrow:hover {
  transform: rotate(0deg) scale(1.1);
}

body.dark-mode .carousel-arrow {
  background-color: #2563eb;
}

/* Style clickable day title and standard link */
.day-title {
  cursor: pointer;
  transition: color 0.2s ease;
}

.day-title:hover {
  color: #2563eb;
}

body.dark-mode .day-title:hover {
  color: #60a5fa;
}

.standard-link {
  cursor: pointer;
  color: #2563eb;
  text-decoration: underline;
}

body.dark-mode .standard-link {
  color: #60a5fa;
}

.standard-link:hover {
  color: #1e40af;
}

body.dark-mode .standard-link:hover {
  color: #93c5fd;
}

/* Adjust font sizes and spacing for mobile */
@media (max-width: 640px) {
  .quadrant {
    min-height: 250px;
  }
  select, input[type="date"], input[type="checkbox"] {
    font-size: 14px;
    padding: 8px;
  }
  h2 {
    font-size: 1.25rem;
  }
  p {
    font-size: 0.875rem;
  }
  button {
    font-size: 0.875rem;
    padding: 6px 10px;
  }
  footer label span {
    font-size: 0.75rem;
  }
  footer input[type="checkbox"] {
    width: 16px;
    height: 16px;
  }
  #carouselModal .max-w-lg, #standardModal .max-w-lg {
    max-width: 90%;
  }
  .carousel-arrow {
    width: 36px;
    height: 36px;
  }
}

/* Ensure footer stays fixed and doesn't obscure content */
footer {
  z-index: 10;
}

/* Improve touch interaction for dropdowns */
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
  background-repeat: no-repeat;
  background-position-x: 98%;
  background-position-y: 50%;
}

body.dark-mode select {
  background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
}

/* Ensure date picker and toggle are styled consistently */
input[type="date"], input[type="checkbox"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 100%;
  max-width: 200px;
}

/* Style navigation buttons and footer toggle */
button, input[type="checkbox"] {
  min-width: 40px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}