/* Body style */
body {
  font-family: 'Archivo', sans-serif;
  font-size: 16px;
  background-color: #f9f9f9;
  margin: 0;
  padding: 0;
}

/* Main Containers */
.first-container,
#student-form-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 50vw;
  max-width: 600px;
  margin: 50px auto;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  padding: 40px 30px;
  min-height: 60vh;
  box-sizing: border-box;
}

/* Inner section */
.inner-section { width: 100%; }

/* Titles */
.titles {
  font-size: 18px;
  letter-spacing: 0.1px;
  font-weight: bold;
}

/* Heading */
.heading-message {
  text-align: center;
  margin-bottom: 30px;
}
.heading-message h4 {
  font-weight: 700;
  letter-spacing: 0.1px;
  color: #333;
  margin-bottom: 12px;
}
.heading-message p {
  font-size: 16px;
  color: #555;
}
.heading-message a {
  color: #00457A;
  text-decoration: underline;
}

/* Buttons Row */
.buttons-row {
  display: flex;
  gap: 50px;
  justify-content: center;
  flex-wrap: nowrap;
  width: 100%;
}
.booking-btn {
  flex: 1 1 190px;
  height: 75px;
  font-size: 17px;
  font-weight: 700;
  background-color: white;
  color: #001c55;
  border: 2px solid #00457A;
  transition: background-color 0.3s, color 0.3s;
  cursor: pointer;
  border-radius: 6px;
  min-width: 190px;
  max-width: 250px;
}
.booking-btn:hover,
.booking-btn:focus,
.booking-btn:active {
  background: #00457A;
  color: white;
  outline: none;
}

/* Form Inputs */
.form-check-input {
  width: auto !important;
  height: auto !important;
  min-width: 16px;
  min-height: 16px;
}
.error-message { color: red; font-size: 14px; margin-top: 4px; }
#calendar-section .error-message {
  display: block;
  max-width: 850px;
  margin: 12px auto 0;
  text-align: center;
  font-size: 15px;
}

/* Navigation Buttons (Next/Previous in form) */
.next-btn {
  background: #00457A !important;
  color: white !important;
  border-radius: 8px;
  padding: 8px 20px;
}
.previous-btn {
  background: #e0e0e0 !important;
  color: black !important;
  border-radius: 8px;
  padding: 8px 20px;
}

/* Calendar Section */
#calendar-section {
  max-width: 900px;
  padding: 20px;
  background-color: #fff;
  border-radius: 18px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
  margin: 0 auto;
}

/* Calendar section heading */
#calendar-section .heading-message,
#student-form-section .heading-message,
#company-form-section .heading-message {
  background: #e0e0e0;
  color: black !important;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 18px;
  letter-spacing: 0.1px;
  text-align: left;
  margin-bottom: 15px;
  font-weight: 700;
}

#calendar-section p.small.text-muted {
  text-align: left;
  margin-bottom: 10px;
}

/* FullCalendar Container */
#fullcalendar {
  width: 100%;
  max-width: 850px;
  min-height: 650px;
  margin: 20px auto;
  padding: 20px;
  background-color: #fefefe;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.fc-toolbar {
  background-color: #00457A;
  color: white;
  font-size: 18px;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 10px;

  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
.fc-toolbar-chunk {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Calendar toolbar buttons */
.fc-button {
  background: white !important;
  color: #00457A !important;
  border: 1px solid #00457A !important;
  border-radius: 6px !important;
  padding: 5px 12px !important;
  font-size: 14px;
  transition: 0.3s;
}
.fc-button:hover { background: #00457A !important; color: white !important; }

/* Calendar Day Cells */
.fc .fc-daygrid-day { cursor: pointer; font-size: 16px; }
.fc .fc-daygrid-day-frame { min-height: 60px; }
.fc .fc-daygrid-day:hover {
  background-color: #e6f2ff;
  border-radius: 8px;
  box-shadow: inset 0 0 5px rgba(0,0,0,0.1);
}

/* Selected day */
.fc .fc-daygrid-day.fc-day-selected,
.fc .fc-daygrid-day.fc-day-selected .fc-daygrid-day-frame,
.fc .fc-daygrid-day.fc-day-selected .fc-daygrid-day-number {
  background-color: #2e7d32 !important;
  color: white !important;
  border-radius: 8px;
}

/* Drag selection highlight */
.fc .fc-highlight {
  background: #dcedc8 !important;
  opacity: 0.9 !important;
}

/* Today cell forced white */
.fc .fc-day-today,
.fc .fc-day-today .fc-daygrid-day-frame {
  background: white !important;
  color: inherit !important;
  font-weight: bold;
}

/* Previous/next month days forced white */
.fc .fc-day-other,
.fc .fc-day-other .fc-daygrid-day-frame {
  background: white !important;
  color: #999 !important;
}

/* Remove hover color change */
.fc .fc-daygrid-day-frame:hover,
.fc .fc-daygrid-day-number:hover {
  background: none !important;
  color: inherit !important;
  cursor: default;
}

/* Remove underline */
.fc .fc-daygrid-day-number,
.fc .fc-col-header-cell a {
  text-decoration: none !important;
  color: inherit !important;
}

/* Calendar Navigation Buttons */
.fc .fc-prev-button,
.fc .fc-next-button,
.fc .fc-today-button {
  background: #fff !important;
  color: #00457A !important;
  border: 1px solid #00457A !important;
}
.fc .fc-prev-button:hover,
.fc .fc-next-button:hover,
.fc .fc-today-button:hover,
.fc .fc-prev-button:focus,
.fc .fc-today-button:focus {
  background: #fff !important;
  color: #00457A !important;
}
.fc .fc-today-button:disabled,
.fc .fc-prev-button:disabled,
.fc .fc-button-primary:disabled {
  background: #fff !important;
  color: #00457A !important;
  border: 1px solid #00457A !important;
  opacity: 1 !important;
  filter: none !important;
  box-shadow: none !important;
}

/* Slot Labels */
.fc .slots-info {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: bold;
  text-align: center;
  border-radius: 4px;
  padding: 3px 6px;
  letter-spacing: 0.2px;
}
.fc .slots-available { background-color: #00457A; color: white; }
.fc .slots-full { background-color: #ff4d4d; color: white; font-weight: 700; }

/* Navigation container */
.calendar-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
}
.calendar-nav .btn {
  min-width: 100px;
  padding: 8px 16px;
  font-size: 16px;
  border-radius: 8px;
}

/* Next button alignment */
.calendar-buttons-container {
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

.calendar-buttons-container .previous-btn,
.calendar-buttons-container .next-btn {
  padding: 8px 20px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  min-width: 120px; 
  height: auto;
}

/* Match form nav button colors */
.calendar-buttons-container .previous-btn {
  background: #e0e0e0 !important;
  color: black !important;
}
.calendar-buttons-container .next-btn {
  background: #00457A !important;
  color: white !important;
}
.calendar-buttons-container .previous-btn:hover {
  background: #ccc;
}
.calendar-buttons-container .next-btn:hover {
  background: #002d66;
}

/* Blocked Thursday hatching */
.fc-daygrid-day.blocked-thursday .fc-daygrid-day-frame { position: relative; }
.blocked-thursday,
.fc-day-disabled,
.slots-full { position: relative; }
.blocked-thursday::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(200,0,0,0.15),
    rgba(200,0,0,0.15) 8px,
    transparent 8px,
    transparent 16px
  );
  pointer-events: none;
}

/* Unscheduled hatch style */
.unscheduled {
  text-decoration: none !important;
  position: relative;
  cursor: not-allowed !important;
  background: white !important;
  color: #999 !important;
}
.unscheduled::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(128,128,128,0.3),
    rgba(128,128,128,0.3) 2px,
    transparent 2px,
    transparent 6px
  );
  pointer-events: none;
  border-radius: 4px;
}
.fc-day-other.unscheduled,
.fc-day-other.unscheduled .fc-daygrid-day-frame {
  background: white !important;
  color: #999 !important;
}

/* Hover effect only for available days */
.fc .fc-daygrid-day:not(.unscheduled):hover {
  background-color: #e6f2ff;
  border-radius: 8px;
  box-shadow: inset 0 0 5px rgba(0,0,0,0.1);
}
.fc .fc-daygrid-day:not(.unscheduled) { cursor: pointer; }

/* Responsive styles  */

/* Tablet screens */
@media (max-width: 768px) {
  .first-container,
  #student-form-section {
    width: 90%;
    max-width: 100%;
    margin: 30px auto;
    padding: 25px 20px;
  }
  .buttons-row {
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
  }
  .booking-btn {
    flex: 1 1 100%;
    max-width: 100%;
    height: auto;
    padding: 15px;
  }
  #calendar-section {
    width: 95%;
    padding: 15px;
  }
  .fc-toolbar-title { font-size: 1.1rem; }
  .fc .fc-daygrid-day-frame { min-height: 70px; }
}

/* Tablet landscape (769px – 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
  .buttons-row {
    flex-wrap: nowrap;      
    gap: 20px;  
    justify-content: center;
  }
  .booking-btn {
    flex: 1 1 auto;         /* allow flexible shrinking */
    min-width: 140px;       /* shrink a bit from 190px */
    max-width: 220px;       /* prevent oversized buttons */
    height: auto;
    padding: 15px;
  }
}
/* Mobile screens */
@media (max-width: 480px) {
  .first-container,
  #student-form-section {
    width: 95% !important;
    margin: 20px auto !important;
    padding: 20px 15px !important;
    border-radius: 8px !important;
    align-items: stretch !important;
  }

  /* Force booking buttons to stack (Bootstrap override included) */
  #booking-buttons,
  .buttons-row {
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 15px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Stronger overrides to beat Bootstrap */
  #booking-buttons .booking-btn,
  .buttons-row .booking-btn {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    white-space: normal !important;
    height: auto;
    padding: 14px;
    font-size: 16px;
  }

  /* Calendar section */
  #calendar-section {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
  }

  /* Form fields full width */
  .inner-section input,
  .inner-section select,
  .inner-section textarea {
    width: 100%;
    box-sizing: border-box;
  }

  
  .calendar-buttons-container {
    gap: 10px;
    padding: 0;
  }
  .calendar-buttons-container .next-btn { margin-left: 0 !important; }
  .fc-toolbar {
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 8px !important;
}
  .fc-toolbar-chunk:first-child {
  justify-content: flex-start !important;
  width: auto !important;
}
.fc-toolbar-chunk:nth-child(2) {
  justify-content: center !important;
  flex: 1 1 auto !important;
  text-align: center !important;
}
.fc-toolbar-chunk:last-child {
  justify-content: flex-end !important;
  width: auto !important;
}
  .fc-toolbar-title {
    font-size: 1rem;
    text-align: center;
    width: 100%;
    margin-bottom: 5px;
  }
  .fc .slots-info { font-size: 11px; padding: 2px 4px; }
}


/* Very small screens (<=430px) */
@media (max-width: 430px) {
  .buttons-row { gap: 12px !important; }
  .buttons-row .booking-btn {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
}


