/* Today — Teaching points */

.today-teaching-section { overflow: hidden; }
.today-teaching-heading { align-items: center; gap: 12px; }
.today-teaching-heading > div:first-child { min-width: 0; }
.today-teaching-heading h3 { margin-bottom: 0; }
.today-teaching-count { flex: 0 0 auto; padding: 5px 9px; border: 1px solid var(--border, #e5e7eb); border-radius: 999px; color: var(--muted, #6b7280); background: var(--surface-subtle, #f8fafc); font-size: 12px; font-weight: 600; white-space: nowrap; }
.today-teaching-controls { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.today-teaching-view-all { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 7px 11px; border: 1px solid var(--border, #e5e7eb); border-radius: 9px; background: var(--surface, #fff); color: var(--text, #111827); font: inherit; font-size: 12px; font-weight: 650; cursor: pointer; white-space: nowrap; box-shadow: 0 1px 1px rgba(0,0,0,.03); transition: background-color 140ms ease, border-color 140ms ease, transform 100ms ease, box-shadow 140ms ease; }
.today-teaching-view-all:hover { background: var(--surface-subtle, #f8fafc); border-color: var(--border-strong, #d1d5db); box-shadow: 0 2px 5px rgba(0,0,0,.05); }
.today-teaching-view-all:active { transform: translateY(1px); box-shadow: none; }
.today-teaching-view-all:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.today-teaching-row { position: relative; align-items: center; gap: 18px; padding: 17px 18px; border-radius: 12px; transition: background-color 140ms ease, transform 140ms ease; }
.today-teaching-row::before { content: ''; width: 3px; align-self: stretch; min-height: 38px; border-radius: 999px; background: currentColor; opacity: .18; flex: 0 0 3px; }
.today-teaching-row:hover { background: var(--surface-subtle, #f8fafc); }
.today-teaching-row:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }
.today-teaching-text { display: block; font-size: 15px; line-height: 1.55; font-weight: 650; }
.today-teaching-meta { margin-top: 5px; color: var(--muted, #6b7280); font-size: 12px; }
.today-teaching-action { flex: 0 0 auto; font-size: 12px; font-weight: 600; white-space: nowrap; }
.today-teaching-empty { margin-top: 2px; }
.today-teaching-empty-content { display: flex; align-items: center; gap: 14px; padding: 4px 2px 2px; }
.today-teaching-empty-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border: 1px dashed var(--border, #d1d5db); border-radius: 11px; color: var(--muted, #6b7280); font-size: 21px; line-height: 1; }
.today-teaching-empty-content strong { display: block; margin-bottom: 3px; font-size: 14px; }
.today-teaching-empty-content p { margin: 0; color: var(--muted, #6b7280); font-size: 12px; line-height: 1.5; }
.stat-grid [data-today-teaching-stat] { min-width: 0; }

/* Dedicated Teaching Points collection */
.teaching-collection-page { position: fixed; inset: 0; z-index: 999; overflow: auto; box-sizing: border-box; width: 100%; min-height: 100%; margin: 0; padding: 24px max(16px, calc((100vw - 980px) / 2)) 100px; background: var(--background, #f8fafc); animation: teachingCollectionIn 160ms ease-out; }
@keyframes teachingCollectionIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
.teaching-collection-open .app-shell > header,
.teaching-collection-open .app-shell > .toast,
.teaching-collection-open .app-shell > .page-section,
.teaching-collection-open .app-shell > .bottom-nav { display: none !important; }
.teaching-collection-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.teaching-collection-header h2 { margin: 2px 0 5px; }
.teaching-collection-header p:last-child { margin: 0; }
.teaching-collection-header .secondary-button { min-height: 36px; padding: 7px 12px; border-radius: 9px; font-size: 12px; font-weight: 650; }
.teaching-collection-toolbar { display: grid; gap: 12px; margin-bottom: 12px; }
.teaching-collection-toolbar input { width: 100%; }
.teaching-scope-switch { display: flex; flex-wrap: wrap; gap: 6px; padding: 3px; border: 1px solid var(--border, #e5e7eb); border-radius: 11px; background: var(--surface-subtle, #f8fafc); width: fit-content; max-width: 100%; }
.teaching-scope-switch button { border: 0; background: transparent; color: var(--muted, #6b7280); border-radius: 8px; padding: 7px 11px; min-height: 31px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; transition: background-color 140ms ease, color 140ms ease, box-shadow 140ms ease; }
.teaching-scope-switch button:hover { color: var(--text, #111827); }
.teaching-scope-switch button.active { background: var(--surface, #fff); color: var(--text, #111827); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.teaching-collection-summary { color: var(--muted, #6b7280); font-size: 12px; margin: 12px 2px; }
.teaching-collection-list { display: grid; gap: 8px; }
.teaching-point-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 18px; border: 1px solid var(--border, #e5e7eb); border-radius: 14px; background: var(--surface, #fff); box-shadow: 0 1px 2px rgba(0,0,0,.03); transition: border-color 140ms ease, box-shadow 140ms ease, transform 100ms ease; }
.teaching-point-card:hover { border-color: var(--border-strong, #d1d5db); box-shadow: 0 3px 10px rgba(0,0,0,.05); }
.teaching-point-card:focus-within { border-color: var(--border-strong, #d1d5db); box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 12%, transparent); }
.teaching-point-main { min-width: 0; }
.teaching-point-main > strong { display: block; font-size: 15px; line-height: 1.55; }
.teaching-point-main > p { margin: 6px 0 0; color: var(--muted, #6b7280); font-size: 12px; line-height: 1.45; }
.teaching-point-actions { display: flex; flex: 0 0 auto; gap: 7px; }
.teaching-point-actions .secondary-button { min-height: 34px; padding: 7px 11px; border-radius: 9px; font-size: 12px; font-weight: 650; }
.teaching-point-actions [data-edit-point] { background: var(--text, #111827); color: var(--surface, #fff); border-color: var(--text, #111827); }
.teaching-point-actions [data-edit-point]:hover { opacity: .9; }
.teaching-collection-empty { padding: 34px 18px; border: 1px dashed var(--border, #d1d5db); border-radius: 14px; text-align: center; background: var(--surface, #fff); }
.teaching-collection-empty strong { display: block; margin-bottom: 5px; }
.teaching-collection-empty p { margin: 0; color: var(--muted, #6b7280); font-size: 13px; }

@media (min-width: 720px) {
  .stat-grid:has([data-today-teaching-stat]) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .teaching-collection-toolbar { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
}

@media (max-width: 560px) {
  .today-teaching-heading { align-items: flex-start; }
  .today-teaching-controls { gap: 6px; }
  .today-teaching-view-all { min-height: 32px; padding-inline: 9px; }
  .today-teaching-row { align-items: flex-start; gap: 10px; padding: 15px 14px; }
  .today-teaching-action { margin-top: 2px; }
  .today-teaching-empty-content { align-items: flex-start; }
  .teaching-collection-page { padding-top: max(16px, env(safe-area-inset-top)); padding-bottom: max(100px, env(safe-area-inset-bottom)); }
  .teaching-collection-header { align-items: center; }
  .teaching-collection-header .secondary-button { padding-inline: 10px; }
  .teaching-scope-switch { width: 100%; }
  .teaching-scope-switch button { flex: 1 1 auto; }
  .teaching-point-card { align-items: flex-start; flex-direction: column; gap: 12px; padding: 15px; }
  .teaching-point-actions { width: 100%; }
  .teaching-point-actions .secondary-button { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .teaching-collection-page { animation: none; }
  .today-teaching-view-all, .teaching-point-card, .teaching-scope-switch button { transition: none; }
}
