/* v5.0 Overlay Styles - Visual Indicators Only */
/* This file contains ONLY visual presentation styles for v5.0 */
/* Does NOT affect v4.0 calculations or logic */

/* Today row styling */
.trip-row.v5-today-row {
  background-color: #f8f9fa !important;
  border: 2px dashed #6c757d !important;
  border-radius: 4px;
  padding: 8px 0 !important;
  margin: 8px 0 !important;
  font-weight: 500;
}

.trip-row.v5-today-row .row-date {
  color: #495057;
  font-weight: 600;
}

.trip-row.v5-today-row .row-reason-col,
.trip-row.v5-today-row .row-day {
  color: #6c757d;
}

/* Grey out pre-restart records */
.trip-row.v5-pre-restart {
  opacity: 0.4;
  color: #999;
}

.trip-row.v5-pre-restart .check-icon,
.trip-row.v5-pre-restart .check-icon-clock {
  opacity: 0.4;
}

/* Ensure all trip rows maintain consistent alignment - fix any indentation issues */
.trip-row {
  display: flex !important;
  align-items: flex-start !important;
  flex-wrap: nowrap !important;
  gap: 15px !important;
  box-sizing: border-box !important;
}

.trip-row .row-date,
.trip-row .row-reason-col,
.trip-row .row-day,
.trip-row .all-checks,
.trip-row .edit-buttons {
  box-sizing: border-box !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Ensure reason column doesn't have unexpected indentation */
.trip-row .row-reason-col {
  margin-left: 20px !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  text-indent: 0 !important;
}

/* Restart point separator line - must match trip-row flex structure exactly */
.v5-restart-separator {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 15px;
  width: 100%;
  padding: 12px 0;
  margin: 8px 0 15px 0;
  border-top: 2px dashed #666;
  border-bottom: 2px dashed #666;
  background-color: #f5f5f5;
  box-sizing: border-box;
  position: relative;
}

/* Match trip-row column structure exactly - same as .trip-row children */
/* Column 1: row-date */
.v5-separator-col-1 {
  flex: 1 1 0;
  min-width: 200px;
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

/* Column 2: row-reason-col */
.v5-separator-col-2 {
  flex: 0 0 auto;
  margin-left: 20px;
  margin-right: 0;
  width: auto;
  box-sizing: border-box;
  padding: 0;
}

/* Column 3: row-day */
.v5-separator-col-3 {
  flex: 0 0 50px;
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

/* Column 4: all-checks (12-month check) */
.v5-separator-col-4 {
  flex: 0 0 100px;
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

/* Column 5: all-checks (5-year check) - THIS IS THE 5TH COLUMN */
.v5-separator-col-5 {
  flex: 0 0 100px;
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

/* Column 6: edit-buttons (50px) */
.v5-separator-col-6 {
  flex: 0 0 50px;
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

/* Separator text - centered across all columns using absolute positioning */
.v5-separator-text {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-weight: 600;
  color: #666;
  font-size: 0.9em;
  white-space: nowrap;
  pointer-events: none;
  z-index: 1;
}

/* Restart icon indicator */
.v5-restart-icon {
  display: inline-block;
  margin-left: 8px;
  color: #f30506;
  font-size: 1.1em;
  vertical-align: middle;
}

/* Top status bar */
.v5-status-bar {
  background-color: #e8f4f8;
  border: 1px solid #b8dce8;
  border-radius: 4px;
  padding: 12px 16px;
  margin: 10px 0 20px 0;
  font-size: 0.95em;
  color: #2c3e50;
  font-weight: 500;
}

.v5-status-bar > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  flex-wrap: wrap;
  gap: 15px;
}

@media (max-width: 768px) {
  .v5-status-bar > div {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .v5-status-bar > div > div:last-child {
    width: 100%;
    margin-top: 10px;
  }
}

/* v5 ILR/BC dates section (overlay on existing section) */
.v5-restart-dates {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #ddd;
}

.v5-restart-dates .v5-label {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 4px;
}

.v5-restart-dates .v5-date {
  color: #f30506;
  font-weight: 600;
}

/* Minimal indicator for 12-month breach */
.v5-breach-indicator {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.9em;
}

/* Force consistent alignment for all trip rows - fix indentation issues */
#datalist .trip-row {
  display: flex !important;
  align-items: flex-start !important;
  flex-wrap: nowrap !important;
  gap: 15px !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  text-indent: 0 !important;
  box-sizing: border-box !important;
}

/* Ensure all columns in trip rows have consistent alignment */
#datalist .trip-row > .row-date {
  flex: 1 1 0 !important;
  min-width: 200px !important;
  margin: 0 !important;
  padding: 0 !important;
  text-indent: 0 !important;
}

#datalist .trip-row > .row-reason-col {
  flex: 0 0 auto !important;
  margin-left: 20px !important;
  margin-right: 0 !important;
  padding: 0 !important;
  padding-left: 0 !important;
  text-indent: 0 !important;
  width: auto !important;
}

#datalist .trip-row > .row-day {
  flex: 0 0 50px !important;
  margin: 0 !important;
  padding: 0 !important;
  text-indent: 0 !important;
}

#datalist .trip-row > .all-checks {
  flex: 0 0 100px !important;
  margin: 0 !important;
  padding: 0 !important;
  text-indent: 0 !important;
}

#datalist .trip-row > .edit-buttons {
  flex: 0 0 50px !important;
  margin: 0 !important;
  padding: 0 !important;
  text-indent: 0 !important;
}

/* ========== V5.0 PENDING ICON (post-restart rows) ========== */
/* Red ⏳ icon to replace red X in check boxes for rows after restart point */
.v5-pending-icon-replacement {
  display: inline-block;
  color: #f30506;
  font-size: 18px;
  line-height: 1;
  vertical-align: middle;
  font-style: normal;
}

/* ========== V5.0 STATUS LEGEND ========== */
.v5-status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 15px 0 20px 0;
  padding: 12px 16px;
  background-color: #f9f9f9;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
  box-sizing: border-box;
}

.v5-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #666;
  white-space: nowrap;
}

.v5-legend-icon {
  font-size: 16px;
  line-height: 1;
  display: inline-block;
}

.v5-legend-text {
  font-size: 14px;
  color: #666;
  line-height: 1.4;
}

/* Responsive: wrap to two rows on smaller screens */
@media (max-width: 768px) {
  .v5-status-legend {
    gap: 12px;
    padding: 10px 12px;
  }
  
  .v5-legend-item {
    font-size: 13px;
    gap: 6px;
  }
  
  .v5-legend-icon {
    font-size: 15px;
  }
  
  .v5-legend-text {
    font-size: 13px;
  }
}

/* ========== V5.0 TOGGLE SWITCH ========== */
.v5-toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
  margin: 0;
}

.v5-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.v5-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 24px;
}

.v5-toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.v5-toggle-switch input:checked + .v5-toggle-slider {
  background-color: #4CAF50;
}

.v5-toggle-switch input:checked + .v5-toggle-slider:before {
  transform: translateX(26px);
}

.v5-toggle-switch input:focus + .v5-toggle-slider {
  box-shadow: 0 0 1px #4CAF50;
}

