/* TEAR · Editorial Calendar · styles */

.cal-tabs {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  border-bottom: 1px solid var(--border-1);
  padding-bottom: var(--space-3);
}

.cal-content {
  min-height: 320px;
}

/* ---------- Grid Simulator ---------- */

.cal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-1);
  max-width: 420px;
  margin-bottom: var(--space-6);
  user-select: none;
}

.cal-grid__cell {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  background: var(--surface-2);
  cursor: grab;
  transition: transform var(--duration-fast) var(--easing-out),
              box-shadow var(--duration-fast) var(--easing-out);
  position: relative;
}

.cal-grid__cell:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-2);
  z-index: 1;
}

.cal-grid__cell:active {
  cursor: grabbing;
}

.cal-grid__cell--ghost {
  opacity: 0.3;
}

.cal-grid__label {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--surface-0);
  letter-spacing: var(--tracking-tight);
}

.cal-grid__pilar {
  font-size: var(--text-xs);
  color: var(--surface-0);
  opacity: 0.7;
}

.cal-grid__empty {
  font-size: var(--text-xs);
  color: var(--text-lo);
}

/* ---------- Alerts ---------- */

.cal-alerts {
  background: var(--surface-1);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
}

.cal-alerts__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.cal-alerts__score {
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  color: var(--accent-300);
}

.cal-alert {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  margin-bottom: var(--space-2);
  border-left: 2px solid var(--text-lo);
  color: var(--text-md);
}

.cal-alert:last-child { margin-bottom: 0; }

.cal-alert--warning {
  border-left-color: var(--warning);
  background: rgba(251, 191, 36, 0.06);
}

.cal-alert--info {
  border-left-color: var(--info);
  background: rgba(96, 165, 250, 0.06);
}

.cal-alert--ok {
  border-left-color: var(--accent-500);
  background: rgba(77, 138, 74, 0.08);
  color: var(--accent-300);
}

/* ---------- Timeline ---------- */

.cal-timeline {
  display: grid;
  grid-template-columns: repeat(12, minmax(80px, 1fr));
  gap: var(--space-2);
  overflow-x: auto;
  padding-bottom: var(--space-3);
}

.cal-timeline__col {
  background: var(--surface-1);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-sm);
  padding: var(--space-2);
  min-height: 160px;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.cal-timeline__week {
  font-size: var(--text-xs);
  color: var(--text-lo);
  text-align: center;
  padding-bottom: var(--space-1);
  border-bottom: 1px solid var(--border-1);
  margin-bottom: var(--space-1);
}

.cal-timeline__pill {
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-xs);
  color: var(--surface-0);
  font-weight: var(--weight-medium);
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.cal-timeline__legend {
  margin-top: var(--space-3);
  font-size: var(--text-xs);
  color: var(--text-lo);
}
