/**
 * Content Studio — Module-specific styles
 *
 * Calendar grid, Kanban board, AI Generator layout.
 * Apple quality: 12px radius, generous spacing, clear hierarchy.
 */

/* ═══════════════════════════════════════════
   TOOLBAR
   ═══════════════════════════════════════════ */
.cs-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}
.cs-toolbar-left {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.cs-toolbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}
.cs-month-label {
  font-size: var(--text-xl);
  font-weight: 700;
  min-width: 180px;
  text-align: center;
}
.cs-filter-select {
  width: auto;
  min-width: 140px;
  min-height: 40px;
  font-size: var(--text-sm);
  padding: var(--space-sm) var(--space-md);
}

/* View Switcher */
.cs-view-switch {
  display: flex;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 2px;
}
.cs-view-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.cs-view-btn.active {
  background: var(--bg-card);
  color: var(--fitcom-orange);
  box-shadow: var(--shadow-sm);
}
.cs-view-btn:hover:not(.active) {
  color: var(--text-primary);
}

/* ═══════════════════════════════════════════
   CALENDAR GRID
   ═══════════════════════════════════════════ */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border-default);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.cal-weekday {
  background: var(--bg-primary);
  padding: var(--space-md);
  text-align: center;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-tertiary);
}
.cal-day {
  background: var(--bg-card);
  min-height: 90px;
  padding: var(--space-sm);
  cursor: pointer;
  transition: background 0.15s ease;
}
.cal-day:hover {
  background: var(--bg-hover);
}
.cal-day-empty {
  background: var(--bg-primary);
  cursor: default;
}
.cal-day-today {
  background: var(--fitcom-orange-bg);
}
.cal-day-num {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}
.cal-today-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--fitcom-orange);
  color: white;
  font-weight: 700;
}
.cal-day-items {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}
.cal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cal-more {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Mobile calendar: compact */
@media (max-width: 768px) {
  .cal-day {
    min-height: 60px;
    padding: var(--space-xs);
  }
  .cal-weekday {
    padding: var(--space-sm);
    font-size: 12px;
  }
  .cal-day-num {
    font-size: 12px;
  }
  .cs-month-label {
    font-size: var(--text-lg);
    min-width: 140px;
  }
  .cs-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .cs-toolbar-left, .cs-toolbar-right {
    justify-content: center;
  }
}

/* ═══════════════════════════════════════════
   KANBAN BOARD
   ═══════════════════════════════════════════ */
.kanban-board {
  display: flex;
  gap: var(--space-md);
  overflow-x: auto;
  padding-bottom: var(--space-md);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.kanban-col {
  flex: 0 0 280px;
  min-width: 280px;
  max-width: 320px;
}
.kanban-col-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-sm);
  margin-bottom: var(--space-sm);
}
.kanban-col-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.kanban-col-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}
.kanban-col-count {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 500;
  margin-left: auto;
}
.kanban-col-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  min-height: 120px;
  padding: var(--space-xs);
  background: var(--bg-primary);
  border-radius: var(--radius-md);
}
.kanban-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  cursor: pointer;
}
.kanban-card-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  line-height: var(--leading-normal);
}
.kanban-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}
.kanban-card-dir {
  font-weight: 600;
}
.kanban-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.kanban-card-plats {
  display: flex;
  gap: 3px;
}
.kanban-plat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.kanban-card-user {
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.kanban-empty {
  min-height: 80px;
}

/* ═══════════════════════════════════════════
   AI GENERATOR LAYOUT
   ═══════════════════════════════════════════ */
.gen-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

@media (max-width: 1023px) {
  .gen-layout {
    grid-template-columns: 1fr;
  }
}

.gen-type-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}
.gen-type-btn {
  padding: var(--space-sm) var(--space-md);
  min-height: 40px;
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.gen-type-btn:hover {
  border-color: var(--fitcom-orange-light);
  color: var(--text-primary);
}
.gen-type-btn.active {
  border-color: var(--fitcom-orange);
  background: var(--fitcom-orange-bg);
  color: var(--fitcom-orange);
  font-weight: 600;
}

.gen-output-card {
  position: sticky;
  top: var(--space-lg);
}
.gen-output-text {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 200px;
}

.gen-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════
   REVIEW CARDS
   ═══════════════════════════════════════════ */
.review-card {
  transition: all 0.2s ease;
}
.review-card:hover {
  border-color: var(--fitcom-orange-light);
}

/* ═══════════════════════════════════════════
   PLATFORM CHECKBOX (in add/edit modal)
   ═══════════════════════════════════════════ */
.cs-plat-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}
.cs-plat-check {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: var(--text-sm);
  transition: all 0.15s ease;
  user-select: none;
}
.cs-plat-check input { display: none; }
.cs-plat-check:hover {
  border-color: var(--text-muted);
}
.cs-plat-check.checked {
  border-color: var(--fitcom-orange);
  background: var(--fitcom-orange-bg);
}
.cs-plat-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
