/*
 * 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.
 */

.planning-gantt {
  height: min(68vh, 720px);
  min-height: 430px;
}

.planning-gantt .gantt_task_line.planning-activity {
  background: #6d28d9;
  border-color: #5b21b6;
  cursor: grab;
}

.planning-gantt .gantt_task_line.planning-activity:active { cursor: grabbing; }

.planning-gantt .gantt_row.planning-editable-row { cursor: pointer; }

.planning-gantt .gantt_row.planning-editable-row:hover,
.planning-gantt .gantt_row.planning-editable-row.gantt_selected {
  background: #f5f3ff;
  box-shadow: inset 4px 0 #6d28d9;
}

.planning-gantt .gantt_task_line.planning-locked::after {
  content: "Bloqueada";
  position: absolute;
  inset-inline-end: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
}

.planning-gantt .gantt_task_line.planning-phase {
  background: #374151;
  border-color: #1f2937;
}

.planning-gantt .gantt_task_content {
  color: #fff;
  font-weight: 600;
  overflow: hidden;
  padding-inline: 0.35rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Gantt adds its tooltip to the document body, outside the chart scroller. */
body .gantt_tooltip {
  box-sizing: border-box;
  max-width: calc(100vw - 2rem);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  white-space: normal;
  overflow-wrap: anywhere;
}

.planning-gantt .gantt_task_drag.task_left,
.planning-gantt .gantt_task_drag.task_right {
  top: 50%;
  width: 24px;
  height: 24px;
  margin-top: -12px;
}

.planning-gantt .gantt_task_drag.task_left { left: -12px; }
.planning-gantt .gantt_task_drag.task_right { right: -12px; }

.planning-gantt .planning-weekend {
  background-color: #f3f4f6;
}

.planning-gantt .planning-holiday {
  background-color: #fef3c7;
  background-image: repeating-linear-gradient(135deg, transparent 0, transparent 5px, rgb(180 83 9 / 14%) 5px, rgb(180 83 9 / 14%) 8px);
}

.planning-gantt .gantt_row:focus-within,
.planning-gantt .gantt_task_row:focus-within,
.planning-gantt [tabindex]:focus-visible {
  outline: 3px solid #6d28d9;
  outline-offset: -3px;
}

[data-planning-gantt-target="row"][data-selected] {
  background: #f5f3ff;
  box-shadow: inset 4px 0 #6d28d9;
}

[data-planning-gantt-target="dependencyRow"][data-selected-role] {
  background: #f5f3ff;
  box-shadow: inset 4px 0 #6d28d9;
}

@media (max-width: 767px) {
  .planning-gantt {
    height: 480px;
    min-height: 420px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .planning-gantt *,
  dialog[open] {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
