/* Availability Grid Styles */
.day-col {
  min-width: 120px;
  /* Remove max-width for flexibility as in teachersShow */
  border-left: 1px solid #e0e0e0;
  border-right: 1px solid #e0e0e0;
  background: #fafbfc;
}
.day-header {
  border-bottom: 1px solid #ccc;
  background-color: #2C3E50; /* Dark background for contrast */
  color: white;
}
.day-availability {
  border-left: 1px solid #ccc;
  border-right: 1px solid #ccc;
  background: #ffe6e6;
}
.unavailable-bg {
  background: #ffe6e6;
  z-index: 1;
  opacity: 1;
}
.available-segments {
  z-index: 1;
}
.available-segment {
  position: absolute;
  left: 0;
  right: 0;
  background: #28a745;
  opacity: 0.5;
  border-radius: 4px;
  z-index: 1;
  min-height: 18px;
  box-shadow: 0 1px 4px rgba(60, 120, 60, 0.08);
  transition: box-shadow 0.2s;
}
.available-segment:hover {
  box-shadow: 0 2px 8px rgba(60, 120, 60, 0.18);
  opacity: 1;
  cursor: pointer;
  z-index: 2;
}
.available-segment .segment-time {
  font-size: 0.93em;
  color: #fff;
  font-weight: 500;
  padding: 0 6px;
  text-shadow: 0 1px 2px #388e3c;
}
.available-segment .edit-icon {
  float: right;
  margin-left: 8px;
  color: #fff;
  opacity: 0.7;
  font-size: 1.1em;
}
.available-segment .edit-icon:hover {
  opacity: 1;
}
.available-segment-label {
  position: absolute;
  left: 0;
  right: 0;
  color: #155724;
  font-weight: bold;
  font-size: 0.9em;
  z-index: 1;
  text-align: center;
  pointer-events: none;
}
.wheel-container {
  width: 60px;
}
.wheel-select {
  height: 96px;
  font-size: 1.3em;
  text-align: center;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: #f8f9fa;
  cursor: pointer;
}
#rangeError {
  min-height: 18px;
}

.match-segment {
  background: #28a745 !important; /* green */
  opacity: 0.7;
}
.teacher-segment {
  background: #ffe066 !important; /* yellow */
  opacity: 0.7;
}
.student-segment {
  background: #6cb2eb !important; /* blue */
  opacity: 0.7;
}
.booked-segment {
  position: absolute;
  left: 0;
  right: 0;
  background: #dc3545; /* Bootstrap red */
  opacity: 0.7;
  border-radius: 4px;
  z-index: 3;
  min-height: 18px;
  box-shadow: 0 1px 4px rgba(180, 60, 60, 0.10);
  transition: box-shadow 0.2s;
}
.booked-segment:hover {
  box-shadow: 0 2px 8px rgba(180, 60, 60, 0.18);
  opacity: 1;
  cursor: pointer;
}
/* On desktop, show full name, hide short */
.day-header-short {
  display: none;
}
.day-header-full {
  display: inline;
}
.day-mobile-wrapper {
  display: none !important;
}

/* Show it on mobile only (already had this, keep it explicit) */
@media (max-width: 576px) {
  /* Hide the global left hour labels on very small screens */
  .hour-labels-global { display: none !important; }

  /* Availability grid: stack day columns vertically and make each row a flex container
     so the mobile hour labels sit to the left of the day's availability area. */
  .availability-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .availability-grid > .day-col {
    width: 100% !important;
    display: block !important;
    margin-bottom: 0 !important;
  }

  /* Show the mobile wrapper inside each day */
  .day-mobile-wrapper {
    display: flex !important;
    align-items: flex-start;
    gap: 8px;
  }
}
@media (max-width: 900px) {
  .day-col {
    min-width: 80px;
    max-width: 80px;
  }
  .hour-label {
    min-width: 40px;
    font-size: 0.85em;
  }
}

/* Show short day header only on mobile */
@media (max-width: 576px) {
  .day-col {
    min-width: 50px;
    max-width: 50px;
  }
  .day-header-full {
    display: none;
  }
  .day-header-short {
    display: inline;
    font-size: 1em;
    font-weight: bold;
  }
  .hour-label {
    min-width: 35px!important;
    font-size: 0.75em!important;
  }
  .hour-label-col {
    width: 36px !important;
    flex: 0 0 36px !important;
  }
  /* Make each day column stack vertically and occupy full width on very small screens */
  .day-col {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    border-left: none;
    border-right: none;
    margin-bottom: 12px;
  }
  

  /* Mobile wrapper layout: hour labels + day content side-by-side */
  .day-mobile-wrapper {
    display: flex !important;
    align-items: flex-start;
    gap: 8px;
  }

  .hour-labels-mobile .hour-label {
    height: 40px;
    line-height: 40px;
    white-space: nowrap;
  }

  .day-mobile-content {
    flex: 1 1 auto;
  }
  /* Marquee effect for segment labels only on mobile */
  .available-segment-label {
    position: absolute;
    left: 0;
    right: 0;
    white-space: nowrap;
    overflow: hidden;
    font-size: 0.9em;
    text-align: center; /* center labels horizontally on mobile */
    pointer-events: none;
  }
  .available-segment-label.marquee span {
    display: inline-block;
    padding-left: 100%;
    animation: marquee-scroll 6s linear infinite;
  }
  @keyframes marquee-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-100%); }
  }
}

@media (max-width: 376px) {
  .day-col {
    min-width: 45px;
    max-width: 45px;
  }
  .hour-label {
    min-width: 30px!important;
    font-size: 0.7em!important;
  }
  .hour-label-col {
    width: 32px !important;
    flex: 0 0 32px !important;
  }
}


