/* Earnings calendar month grid — added for the 60-day calendar feature.
   Uses existing design tokens from styles.css.
   from the rest of styles.css; scoped under .cal- prefixes so nothing
   else on the page is affected. */

.cal-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  flex-wrap: wrap;
  min-width: 0;
}

.cal-controls button#cal-prev,
.cal-controls button#cal-next {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  flex: 0 0 auto;
}
.cal-controls button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

#cal-month-label {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  min-width: 160px;
  text-align: center;
}

.cal-mystocks {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  margin-left: auto;
  white-space: nowrap;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.cal-dow {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
  padding: 4px 0;
}

.cal-cell {
  min-width: 0;
  box-sizing: border-box;
  aspect-ratio: 1 / 1;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 4px;
  cursor: pointer;
  overflow: hidden;
  font: inherit;
  color: inherit;
}

.cal-cell-empty {
  border: none;
  cursor: default;
}

.cal-cell-outofrange {
  opacity: 0.3;
  cursor: not-allowed;
}

.cal-cell-today {
  border-color: var(--amber);
}

.cal-cell-selected {
  background: rgba(232, 163, 61, 0.14);
}

.cal-cell-daynum {
  font-size: 11px;
  color: var(--text-muted);
}

.cal-cell-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-top: 2px;
  width: 100%;
  min-width: 0;
}

.cal-chip {
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--neutral-bg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.cal-chip-more {
  font-size: 9px;
  color: var(--text-muted);
}

.cal-day-detail {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.cal-day-detail-item {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}

.cal-day-detail-company {
  color: var(--text-muted);
  font-size: 13px;
}

.cal-day-detail-eps {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: auto;
}

.cal-day-detail-empty {
  color: var(--text-muted);
  font-size: 13px;
  padding: 8px 0;
}

@media (max-width: 480px) {
  .cal-cell-chips {
    display: none; /* keep mobile cells compact; detail panel below shows the list */
  }
  .cal-cell {
    min-height: 36px;
  }
  .cal-mystocks {
    margin-left: 0;
  }
  .cal-day-detail-eps {
    margin-left: 0;
  }
}
