/* Container card */
.timezone-card {
  border: 1px solid #d6ccff;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.06);
  background: #fff;
  padding: 1rem;
}

.section-title {
  font-size: 1.25rem;
  font-weight: bold;
  background: linear-gradient(45deg, indigo, purple);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.title {
  text-align: center;
  margin-bottom: 10px;
  font-size: 1.4rem;
  color: #333;
}

/* Current time */
.current-time {
  text-align: center;
  margin-bottom: 15px;
  font-size: 0.95rem;
  color: #555;
}

/* Month + Year Controls */
.month-year-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}

.month-year-controls select {
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 0.9rem;
}

/* Override quick date arrows with subtle gray theme */
.quick-dates-wrapper .date-arrow {
  background: #ced4da !important;   /* soft gray */
  color: #495057 !important;        /* dark gray text/icon */
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.quick-dates-wrapper .date-arrow:hover {
  transform: scale(1.1);
  background: #adb5bd !important;   /* slightly darker gray on hover */
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}


.quick-dates {
  display: flex;
  gap: 6px;
}

.quick-dates button {
  min-width: 34px;
  padding: 4px 6px;
  font-size: 0.8rem;
  border-radius: 6px;
  border: none;
  background: #eee;
  cursor: pointer;
  transition: background 0.2s;
}

.quick-dates button:hover {
  background: #ddd;
}

.quick-dates button.selected {
  background: #ff8c42;
  color: #fff;
  font-weight: bold;
}

.nav-arrow {
  background: #ff8c42;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  transition: background 0.2s;
}

.nav-arrow:hover {
  background: #e6782f;
}





/* Timeline wrapper */
.timeline-wrapper {
  position: relative;
  
}

/* Scrollable timelines */
.timelines-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
  max-width: 100%;
  z-index: 1;
 padding: 5px 0; /* Add space between last timeline and scrollbar */
 border: 1px solid #ccc;      /* optional border */
  border-radius: 8px;           /* rounded corners */
  background-color: #f9f9f9;    /* optional background */
}



/* Timeline row wrapper */
.timeline-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
    position: relative;
    background: #fff; /* ensures dropdown doesn't show background while sticky */
      flex-shrink: 0;
      overflow: visible !important;
     /* remove overflow: hidden */
}


/* Sticky timezone select stays fully on top */
.timeline-row select {
  min-width: 160px;
  width: 160px;
  border-radius: 6px;
  border: 1px solid #ccc;
  flex-shrink: 0;
  padding: 3px 6px;

  position: sticky; /* stick to left */
  left: 0;
  background: #fff;  /* solid background to hide timeline behind */
  z-index: 100;       /* always above timeline blocks & hover */
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
}

/* Timeline bar container scrolls normally */
.bar-container {
  display: flex;
  gap: 1px;
  flex-grow: 1;
  position: relative;
  min-width: max-content;  /* force horizontal scrolling */
  position: relative;
  z-index: 0;
}




.hour-block {
  position: relative;
  z-index: 2;  /* below hover box, below sticky select */
  min-width: 60px;
  text-align: center;
  padding: 2px 4px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.65rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: transform 0.1s, background 0.2s;
}


.timezone-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.timezone-row select {
  width: 160px;
  flex-shrink: 0;
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 10;
}

.timeline {
  display: flex;
  flex-grow: 1;
  position: relative;
}

.time-block {
  flex: 0 0 80px;
  text-align: center;
  padding: 4px 0;
  border: 1px solid #eee;
  font-size: 0.85rem;
  cursor: pointer;
}

.time-block.highlight {
  background: #ff8c42;
  color: #fff;
}

/* Hover highlight */
.hover-highlight {
  pointer-events: none;
  border: 2px solid #ff8c42;
  background: rgba(255,165,0,0.2);
  border-radius: 4px;
  display: none;

  position: absolute; /* relative to .timelines-scroll */
  top: 0;
  left: 0;
  z-index: 2; /* below sticky select (z=10), above blocks */
}





.hour-block .day { font-weight: 600; font-size: 0.65rem; }
.hour-block .hour { font-weight: 700; font-size: 0.75rem; }
 


/* Timeline block colors by day */
.hour-block.past-day { background: #e0e0e0; color: #555; }      /* grey */
.hour-block.present-day { background: #3b82f6; color: #fff; }   /* blue */
.hour-block.future-day { background: #10b981; color: #fff; }    /* green */




/* Actions */
.actions {
  display: flex;
  justify-content: space-between;
}

.actions button {
  padding: 6px 10px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
}

.add-timeline {
  background: #6c757d;
  color: #fff;
  margin-top: 15px; /* Add space above the Add button */
}

.add-timeline:hover {
  background: #5a6268;
}


/* Reset button */

#reset-zones {
  border-radius: 8px;
  font-weight: 500;
  color: #495057;
  border: 1px solid #ced4da;
  background: #f8f9fa;
  transition: all 0.2s ease;
}
#reset-zones:hover {
  background: #e9ecef;
  color: #212529;
}



/* Quick date arrows - subtle theme */
.date-arrow {
  background: #ced4da;       /* soft gray */
  color: #495057;            /* dark gray text/icon */
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.date-arrow:hover {
  transform: scale(1.1);
  background: #adb5bd;       /* slightly darker gray on hover */
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}






.hour-block .month {
  font-weight: 600;
  font-size: 0.65rem;
  color: #333;
  margin-bottom: 2px;
}

.hour-block .day {
  font-weight: 600;
  font-size: 0.65rem;
}

.hour-block .year {
  font-size: 0.65rem;
  color: #222; /* darker for better contrast */
  font-weight: 600; /* slightly bolder */
}


.hour-block .hour {
  font-weight: 700;
  font-size: 0.7rem;
}


.timeline-legend .legend-color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.timeline-legend .past-day {
  background-color: #e0e0e0; /* same as past blocks */
}

.timeline-legend .present-day {
  background-color: #3b82f6; /* same as present blocks */
}

.timeline-legend .future-day {
  background-color: #10b981; /* same as future blocks */
}

.timeline-legend .legend-item {
  font-size: 0.85rem;
  color: #333;
}

.timeline-actions {
  display: flex;
  justify-content: space-between; /* Add button left, legend right */
  align-items: center;
  margin-bottom: 12px; /* spacing from timelines */
  gap: 12px; /* ensures spacing between button and legend */
}

/* Optional: adjust legend alignment for smaller screens */
@media (max-width: 576px) {
  .timeline-actions {
    flex-direction: column;
    align-items: flex-start;
  }
  .timeline-legend {
    margin-top: 8px;
  }
}

.quick-dates button.past-date {
  background: #ffd6a5; /* light orange */
  color: #333;
}

.quick-dates button.present-date {
  background: #3b82f6; /* blue */
  color: #fff;
  font-weight: bold;
}

.quick-dates button.future-date {
  background: #6ee7b7; /* light green */
  color: #333;
}

/* Scrollable timeline container */
.timelines-scroll {
  overflow-x: auto;       /* horizontal scroll */
  overflow-y: hidden;     /* no vertical scroll */
  padding: 5px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background-color: #f9f9f9;
  position: relative;     /* for hover highlight */
  z-index: 1;
}

/* Inner timeline blocks container */
.timeline-container {
  display: flex;          /* horizontal layout */
  gap: 1px;               /* space between hour blocks */
  white-space: nowrap;    /* keep blocks in one line */
}

/* Sticky dropdown row above scrollable box */
.timeline-row {
  display: flex;
  gap: 10px;
  margin-bottom: 5px;
}

.timeline-row select {
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 10;            /* above timeline blocks */
}

/* Timeline blocks */
.hour-block {
  min-width: 80px;
  text-align: center;
  padding: 4px 0;
  border: 1px solid #eee;
  font-size: 0.85rem;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: transform 0.1s, background 0.2s;
}

/* Highlighted timeline block */
.time-block.highlight {
  background: #ff8c42;
  color: #fff;
}

/* Hover highlight */
.hover-highlight {
  pointer-events: none;
  border: 2px solid #ff8c42;
  background: rgba(255,165,0,0.2);
  border-radius: 4px;
  display: none;
  position: absolute;     /* relative to .timelines-scroll */
  top: 0;
  left: 0;
  z-index: 2;
}

/* Timeline block colors */
.hour-block.past-day { background: #e0e0e0; color: #555; }
.hour-block.present-day { background: #3b82f6; color: #fff; }
.hour-block.future-day { background: #10b981; color: #fff; }



