/* Days on Road Bottom Sheet Styles */
/* Calendar view for activity days */

.days-on-road-sheet-content {
  padding: 0 24px 24px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.days-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-stat {
  flex: 1;
  min-width: 120px;
  text-align: center;
}

.summary-stat:last-child {
  margin-bottom: 0;
}

.summary-label {
  font-family: var(--_fonts---font-family--ibm-plex-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 4px;
  display: block;
}

.summary-value {
  font-family: var(--_fonts---font-family--instrument-serif);
  font-size: 18px;
  font-weight: 400;
  color: var(--yellow);
  line-height: 1;
}

.calendar-wrapper {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
  min-height: 0; /* Allow flex item to shrink below its content size */
}

.calendar-wrapper::-webkit-scrollbar {
  width: 4px;
}

.calendar-wrapper::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.calendar-wrapper::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

.calendar-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.calendar-month {
  margin-bottom: 24px;
}

.calendar-month:last-child {
  margin-bottom: 0;
}

.calendar-month-title {
  font-family: var(--_fonts---font-family--instrument-serif);
  font-size: 24px;
  font-weight: 400;
  color: var(--yellow);
  margin-bottom: 16px;
  text-align: center;
}

.calendar-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 2px;
}

.calendar-header {
  margin-bottom: 8px;
}

.calendar-day-name {
  font-family: var(--_fonts---font-family--ibm-plex-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  padding: 8px 4px;
  font-weight: 500;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  border-radius: 6px;
  transition: all 0.2s ease;
  cursor: pointer;
  padding: 4px;
  min-height: 40px;
}

.calendar-day:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.calendar-day-other-month {
  opacity: 0.3;
  pointer-events: none;
}

.calendar-day-active {
  background-color: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.3);
}

.calendar-day-active:hover {
  background-color: rgba(255, 193, 7, 0.15);
  border-color: rgba(255, 193, 7, 0.5);
}

.calendar-day-number {
  font-family: var(--_fonts---font-family--ibm-plex-mono);
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1;
}

.calendar-day-active .calendar-day-number {
  color: var(--yellow);
  font-weight: 600;
}

.calendar-day-indicator {
  position: absolute;
  top: 2px;
  right: 2px;
  font-family: var(--_fonts---font-family--ibm-plex-mono);
  font-size: 9px;
  font-weight: 600;
  color: var(--yellow);
  background-color: rgba(0, 0, 0, 0.6);
  padding: 1px 3px;
  border-radius: 8px;
  min-width: 12px;
  text-align: center;
  line-height: 1;
}

/* Activity Modal Styles */
.activity-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.activity-modal {
  background-color: rgba(20, 20, 20, 0.95);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  max-width: 500px;
  max-height: 75vh; /* Reduced from 80vh to fit better in bottom sheet */
  width: 100%;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.activity-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.activity-modal-title {
  font-family: var(--_fonts---font-family--instrument-serif);
  font-size: 24px;
  font-weight: 400;
  color: var(--yellow);
  margin: 0;
}

.activity-modal-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
  line-height: 1;
}

.activity-modal-close:hover {
  color: rgba(255, 255, 255, 0.9);
  background-color: rgba(255, 255, 255, 0.1);
}

.activity-modal-content {
  padding: 20px 24px;
  max-height: calc(75vh - 80px); /* Match the modal max-height */
  overflow-y: auto;
}

.activity-modal-content::-webkit-scrollbar {
  width: 4px;
}

.activity-modal-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.activity-modal-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

.activity-item {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.activity-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.activity-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.activity-name {
  font-family: var(--_fonts---font-family--instrument-serif);
  font-size: 18px;
  font-weight: 400;
  color: var(--yellow);
  margin: 0;
  flex: 1;
}

.activity-type {
  font-family: var(--_fonts---font-family--ibm-plex-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  background-color: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 8px;
  margin-left: 12px;
}

.activity-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.activity-metric {
  display: flex;
  align-items: center;
  gap: 8px;
}

.metric-label {
  font-family: var(--_fonts---font-family--ibm-plex-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  min-width: 60px;
}

.metric-value {
  font-family: var(--_fonts---font-family--ibm-plex-mono);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
}

.activity-location {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.location-start,
.location-end {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 4px;
}

.location-end {
  margin-bottom: 0;
}

.location-label {
  font-family: var(--_fonts---font-family--ibm-plex-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  min-width: 30px;
  flex-shrink: 0;
}

.location-value {
  font-family: var(--_fonts---font-family--ibm-plex-mono);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.3;
}

/* Error states */
.calendar-empty,
.calendar-error {
  text-align: center;
  padding: 40px 20px;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--_fonts---font-family--ibm-plex-mono);
  font-size: 14px;
}

.calendar-error {
  color: #ff6b6b;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
  .days-on-road-sheet-content {
    padding: 0 16px 16px; /* Reduce padding on mobile */
  }

  .calendar-wrapper {
    padding-right: 4px; /* Reduce scrollbar padding */
  }

  .calendar-month-title {
    font-size: 20px; /* Slightly smaller title on mobile */
  }

  .calendar-day {
    min-height: 35px;
    padding: 2px;
  }

  .calendar-day-number {
    font-size: 12px;
  }

  .calendar-day-indicator {
    font-size: 8px;
    padding: 1px 2px;
    min-width: 10px;
  }

  .activity-modal {
    margin: 10px;
    max-height: 85vh; /* Allow more height on mobile since bottom sheet is taller */
  }

  .activity-modal-content {
    padding: 16px 20px;
    max-height: calc(85vh - 80px);
  }

  .activity-modal-header {
    padding: 16px 20px;
  }
}
