/* ==========================
   Global Styles
   ========================== */

/* Ensure the full height of the page and set a default font size */
html,
body {
  height: 100%;
  font-size: 16px;
}

/* Apply a light theme with a clean, readable font */
body {
  font-family: 'Arial', sans-serif;
  background-color: #ffffff; /* White background */
  color: #000000; /* Black text */
}

/* ==========================
   Header Styles
   ========================== */

/* Style the header with a gradient background */
header {
  background: linear-gradient(90deg, #a5d7d2 0%, #80deea 100%);
  padding: 20px;
  display: flex;
  align-items: center; /* Vertically center elements */
  justify-content: space-between; /* Distribute elements */
  position: relative;
}

/* Style the logo */
.logo {
  height: 110px; /* Adjust based on logo size */
  width: auto; /* Maintain aspect ratio */
}

/* Style the text beside the logo */
.welcome-text {
  color: #000000;
  margin-right: 40px; /* Adjust spacing */
}

/* Header title styles */
header h1 {
  font-size: 2.5em;
  color: #151c24; /* Darker primary color */
  font-weight: bold;
}

/* Header subtitle */
header .lead {
  font-size: 1.5em;
  color: #1c2b38; /* Darker secondary color */
}

/* ==========================
   Button Styles
   ========================== */

/* Custom button style for enhanced visibility */
.btn-custom {
  background-color: #3ca9b8;
  border-color: #80deea;
  color: #ffffff;
  padding: 10px 20px;
  font-size: 1em;
  font-weight: 600;
  border-radius: 5px;
  transition: background-color 0.3s ease-in-out;
}

/* Button hover and focus effects */
.btn-custom:hover,
.btn-custom:focus {
  background-color: #4db6ac;
  border-color: #4db6ac;
  color: #ffffff;
  outline: none;
}

/* ==========================
   Sidebar & Intro Section
   ========================== */

/* Padding adjustments for sidebar content */
nav.flex-column {
  padding-bottom: 2rem;
}

/* Adjust padding for a better layout */
.nav {
  padding-bottom: 70px;
}

/* Intro text and tips-list styles */
.intro-text {
  font-size: 1.1em;
  line-height: 2.1;
  color: #333;
  text-align: justify; /* Justify only the intro text */
  padding: 0 10px 10px 10px;
}

.tips-list {
  font-size: 1em;
  line-height: 1.3;
  color: #333;
  text-align: left; /* Ensure the list items stay aligned to the left */
  padding-left: 20px; /* Add some indentation for better spacing */
}

/* ==========================
   Calendar & FullCalendar Styles
   ========================== */

#calendarContainer {
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1); /* Adds subtle shadow */
  border-radius: 10px; /* Slightly rounded corners */
  background: #fff; /* Ensure background remains clean */
  padding: 15px; /* Add some space inside */
}

/* Make the calendar expand dynamically without unnecessary scrollbars */
.fc {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

/* Ensure the calendar grid adapts dynamically */
.fc-scrollgrid {
  overflow: visible !important;
}

/* Position calendar date numbers properly */
.fc-daygrid-day-frame {
  position: relative !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60px;
}

/* Adjust event width inside the calendar */
.fc-daygrid-event {
  width: 100% !important;
  white-space: normal !important;
}

/* Style date numbers in the calendar */
.fc-daygrid-day-number {
  position: absolute !important;
  top: 5px !important;
  right: 8px !important;
  color: rgb(0, 102, 255) !important;
  text-decoration: underline !important;
  font-size: 16px !important;
  z-index: 2;
}

/* Placeholder text inside calendar */
.placeholder-text {
  color: rgba(0, 0, 0, 0.5);
  font-size: 10px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 50%;
  left: 40%;
  transform: translate(-50%, -50%);
  width: 40%;
  pointer-events: none;
}

/* ==========================
   Logout Button (User Menu)
   ========================== */

.logout-container {
  position: absolute;
  right: 10px;
  top: 10px;
}

/* Circular user button */
.logout-container .btn {
  width: 50px;
  height: 50px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: #6c757d;
  border: none;
}

/* Style user icon inside the logout button */
.logout-container .btn i {
  color: #f0f0f0;
}

/* ==========================
   Event Styling (Calendar)
   ========================== */

.clickable-event {
  cursor: pointer;
}

/* Add underline effect on hover */
.clickable-event:hover {
  text-decoration: underline;
}

/* ==========================
   Modal Form Styling
   ========================== */

/* Spacing between form elements inside modal */
.modal-body .form-group {
  margin-bottom: 15px;
}

/* Form labels */
.modal-body .form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
}

/* Form input fields */
.modal-body .form-group input,
.modal-body .form-group textarea,
.modal-body .form-group select {
  width: 100%;
  padding: 10px;
  font-size: 1em;
  border: 1px solid #ccc;
  border-radius: 5px;
}

/* ==========================
   Footer Styles (Fixed Width)
   ========================== */

.footer .text-center {
  background: linear-gradient(90deg, #a5d7d2 0%, #80deea 100%); /* Gradient background */
  color: #fff; /* White text */
  padding: 20px 0; /* Top & bottom spacing */
  text-align: center; /* Center the content */
  margin-top: 24px; /* Space from the content above */
}

/* Restrict footer width to match the header & main content */
.footer .container {
  max-width: 1140px; /* ✅ Matches the header width */
  margin: 0 auto; /* ✅ Centers the footer */
}

/* Footer links */
.footer a {
  color: #fff;
  margin: 0 10px;
  font-size: 1.5em;
}

/* Footer link hover effect */
.footer a:hover {
  color: #ddd;
  text-decoration: underline;
}

/* Footer text */
.footer p {
  margin: 0;
  font-size: 1em;
}

/* ==========================
     Ensure 24px Bottom Margin Always
     ========================== */

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* Ensure the page takes full viewport height */
}

.footer {
  margin-bottom: 24px !important; /* ✅ Ensure consistent bottom spacing */
}

/* ==========================
     Responsive Design
     ========================== */

/* Ensure footer always has 24px margin-bottom on all screen sizes */
@media (max-width: 1200px) {
  .footer {
    margin-bottom: 24px !important;
  }
}

@media (max-width: 992px) {
  .footer {
    margin-bottom: 24px !important;
  }
}

@media (max-width: 768px) {
  .footer {
    margin-bottom: 24px !important;
  }
}

@media (max-width: 576px) {
  .footer {
    margin-bottom: 24px !important;
  }
}

/* Restrict calendar width and center it on large screens */
@media (min-width: 1200px) {
  #calendarContainer {
    max-width: 900px; /* Prevents calendar from stretching too much */
    margin: 0 auto; /* Centers it */
  }
}

/* Large screens (above 767px) */
@media (min-width: 767px) {
  .container {
    max-width: 1140px; /* Restrict max width */
    padding: 0 15px; /* Spacing for better layout */
  }
  #calendarContainer {
    max-width: 720px; /* Prevents calendar from stretching too much */
    margin: 0 auto; /* Centers it */
  }
}

/* Medium screens (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
  .container {
    max-width: 720px; /* Adjust max width for tablets */
    padding: 0 10px;
  }
}

/* Small screens (below 767px) */
@media (max-width: 766px) {
  header {
    display: flex;
    flex-direction: column;
    text-align: center;
    padding: 10px 0;
  }

  .logo,
  .welcome-text {
    width: 100%;
    margin-bottom: 10px;
  }

  .navbar {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;
  }

  .container {
    width: 100%;
    padding: 0 15px;
  }
}

/* Extra small screens (below 576px) */
@media (max-width: 576px) {
  .btn-custom {
    font-size: 0.9em; /* Reduce button size */
    padding: 8px 16px; /* Adjust padding */
  }

  .btn {
    padding: 12px 20px; /* Increase button touch area */
  }
}

/* Fix header text overflow on very small screens (346px - 400px) */
@media (max-width: 400px) {
  header {
    text-align: center;
    padding: 10px;
  }

  header h1 {
    font-size: 1.8em; /* Reduce font size for better fit */
    word-wrap: break-word; /* Prevent text from overflowing */
    margin-bottom: 5px;
  }

  header .lead {
    font-size: 1.1em;
    margin-bottom: 5px;
  }

  .logo {
    height: 90px; /* Reduce logo size */
  }

  .welcome-text {
    margin-right: 0;
    width: 100%;
  }
}

/* Improve scrollbar visibility for textareas (applies to all screen sizes) */
textarea {
  overflow-y: scroll;
  resize: vertical;
  padding-right: 15px;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Customize scrollbar appearance for textarea */
textarea::-webkit-scrollbar {
  width: 12px; /* Wider scrollbar */
}

textarea::-webkit-scrollbar-thumb {
  background-color: #a0a0a0; /* Scrollbar thumb color */
  border-radius: 6px;
}

textarea::-webkit-scrollbar-track {
  background-color: #f0f0f0; /* Scrollbar track color */
}
