/* -------------------------------------------------------------
 * LeafBrowser - Study Schedule Generator
 * Modern SaaS UI Redesign
 * ------------------------------------------------------------- */

.leaf-ss-settings-panel,
.leaf-ss-subjects-panel {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 2rem;
  margin-bottom: 1.5rem;
}

/* ── Interactive Rest Day Chips ─────────────────────────────── */
.leaf-ss-days-selector {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.leaf-ss-day-chip {
  cursor: pointer;
  user-select: none;
}

.leaf-ss-day-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.leaf-ss-day-chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 9999px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  font-size: 0.88rem;
  font-weight: 700;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.leaf-ss-day-chip:hover span {
  border-color: #94a3b8;
  color: #0f172a;
}

.leaf-ss-day-chip input:checked + span {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

/* ── Subjects Table & Rows ──────────────────────────────────── */
.leaf-ss-cols-header {
  display: grid;
  grid-template-columns: 20px 2fr 100px 120px 38px;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  padding: 0 0.5rem;
  align-items: center;
}

.leaf-fc-col-header {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.leaf-ss-subject-list {
  margin-bottom: 1.25rem;
}

.leaf-ss-subject-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  background: #ffffff;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  transition: all 0.2s ease;
}

.leaf-ss-subject-row:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05);
}

.leaf-ss-rm-subject {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.leaf-ss-rm-subject:hover {
  color: #ef4444;
  background-color: #fee2e2;
  transform: scale(1.08);
}

.leaf-ss-add-subject {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: rgba(16, 185, 129, 0.06);
  color: #059669;
  border: 1.5px dashed #a7f3d0;
  border-radius: 9999px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.leaf-ss-add-subject:hover {
  background: #ecfdf5;
  border-style: solid;
  border-color: #059669;
  transform: translateY(-1px);
}

/* ── Generated Schedule Timeline ────────────────────────────── */
.leaf-ss-output {
  margin-top: 2.5rem;
  display: none;
}

.leaf-ss-output.visible {
  display: block;
  animation: leafFadeIn 0.35s ease;
}

.leaf-ss-week-header {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  margin: 2rem 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.leaf-ss-day-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.leaf-ss-day-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  border-color: #cbd5e1;
}

.leaf-ss-day-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 0.75rem;
}

.leaf-ss-day-date {
  font-weight: 600;
  color: #64748b;
  font-size: 0.85rem;
  background: #f1f5f9;
  padding: 3px 10px;
  border-radius: 9999px;
}

.leaf-ss-session-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.leaf-ss-session-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f8fafc;
  font-size: 0.96rem;
}

.leaf-ss-session-item:last-child {
  border-bottom: none;
}

.leaf-ss-session-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.leaf-ss-subject-name {
  font-weight: 700;
  color: #0f172a;
}

.leaf-ss-session-time {
  color: #047857;
  font-size: 0.88rem;
  font-weight: 700;
  background: #ecfdf5;
  padding: 3px 10px;
  border-radius: 9999px;
  margin-left: auto;
}

.leaf-ss-rest-day {
  color: #94a3b8;
  font-size: 0.95rem;
  font-style: italic;
}

/* Vibrant color palette */
.ss-color-0 { background: #059669; }
.ss-color-1 { background: #0284c7; }
.ss-color-2 { background: #7c3aed; }
.ss-color-3 { background: #e11d48; }
.ss-color-4 { background: #d97706; }
.ss-color-5 { background: #0891b2; }
.ss-color-6 { background: #4f46e5; }
.ss-color-7 { background: #16a34a; }
