/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

.allocation-timeline {
  --timeline-label-width: 12rem;
  width: max(100%, calc(var(--timeline-label-width) + var(--timeline-days) * 2.75rem));
  table-layout: fixed;
  border-collapse: collapse;
}

.allocation-timeline-label {
  width: var(--timeline-label-width);
}

@media (max-width: 767px) {
  .allocation-timeline {
    --timeline-label-width: 8rem;
  }
}

.allocation-timeline-heading {
  position: sticky;
  left: 0;
  z-index: 1;
  background: white;
  border: 1px solid #e2e8f0;
  padding: 0.75rem;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.allocation-timeline-track {
  display: grid;
  grid-template-columns: repeat(var(--timeline-days), minmax(0, 1fr));
  padding-block: 0.125rem;
  background-image: linear-gradient(to right, #e2e8f0 1px, transparent 1px);
  background-size: calc(100% / var(--timeline-days)) 100%;
}

.allocation-timeline-bar {
  display: flex;
  min-width: 0;
  margin-inline: 2px;
  border: 1px solid #a7f3d0;
  border-radius: 0.375rem;
  background: #ecfdf5;
  padding: 0.375rem;
  color: #065f46;
  font-weight: 600;
}

.allocation-timeline-bar:hover {
  background: #d1fae5;
}

.allocation-timeline-bar:focus-visible {
  outline: 2px solid #059669;
  outline-offset: 1px;
}
