/* ==========================================================================
   Teacher App Guides Stylesheet (site/css/guides.css)
   Complements site.css with WCAG 2.2 AA compliant tokens, accessible typography,
   diagram embedding containers, file format tables, and responsive cards.
   ========================================================================== */

:root {
  --guides-max-width: 72rem;
  --guides-content-width: 52rem;
  --guides-accent: #f59e0b;
  --guides-accent-hover: #d97706;
  --guides-border: #334155;
  --guides-card-bg: #1e293b;
  --guides-badge-green-bg: rgba(16, 185, 129, 0.15);
  --guides-badge-green-text: #34d399;
  --guides-badge-amber-bg: rgba(245, 158, 11, 0.15);
  --guides-badge-amber-text: #fbbf24;
  --guides-badge-rose-bg: rgba(244, 63, 94, 0.15);
  --guides-badge-rose-text: #fb7185;
}

/* Container & Layout */
.guides-page {
  max-width: var(--guides-max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.guides-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.guides-breadcrumb a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.guides-breadcrumb a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

.guides-header {
  border-bottom: 1px solid var(--guides-border);
  padding-bottom: 2rem;
  margin-bottom: 2.5rem;
}

.guides-eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--guides-accent);
  margin-bottom: 0.5rem;
}

.guides-title {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  color: var(--color-text);
  margin-bottom: 1rem;
}

.guides-lead {
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--color-text-muted);
  max-width: 48rem;
}

/* Status Badge Component */
.guides-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
}

.guides-badge.green {
  background: var(--guides-badge-green-bg);
  color: var(--guides-badge-green-text);
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.guides-badge.amber {
  background: var(--guides-badge-amber-bg);
  color: var(--guides-badge-amber-text);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.guides-badge.rose {
  background: var(--guides-badge-rose-bg);
  color: var(--guides-badge-rose-text);
  border: 1px solid rgba(251, 113, 133, 0.3);
}

/* Quick Facts / At a Glance Panel */
.guides-at-a-glance {
  background: var(--guides-card-bg);
  border: 1px solid var(--guides-border);
  border-radius: 0.75rem;
  padding: 1.75rem;
  margin-bottom: 3rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.guides-at-a-glance h2 {
  font-size: 1.375rem;
  margin-bottom: 1.25rem;
  color: var(--color-text);
}

.guides-glance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.guides-glance-item strong {
  display: block;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 0.25rem;
}

.guides-glance-item span {
  font-size: 1.0625rem;
  color: var(--color-text);
}

/* Interactive Diagram Embeds */
.guides-diagram-block {
  margin: 3rem 0;
  border: 1px solid var(--guides-border);
  border-radius: 1rem;
  background: var(--color-bg-elevated);
  overflow: hidden;
}

.guides-diagram-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(15, 23, 42, 0.6);
  border-bottom: 1px solid var(--guides-border);
}

.guides-diagram-header h3 {
  font-size: 1.125rem;
  margin: 0;
}

.guides-diagram-actions {
  display: flex;
  gap: 0.75rem;
}

.guides-diagram-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  padding: 0.35rem 0.75rem;
  border-radius: 0.375rem;
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--guides-border);
  cursor: pointer;
  text-decoration: none;
}

.guides-diagram-btn:hover {
  background: var(--guides-accent);
  color: #0f172a;
  text-decoration: none;
}

.guides-diagram-frame {
  width: 100%;
  height: 600px;
  border: 0;
  display: block;
  background: #020617;
}

.guides-diagram-caption {
  padding: 1rem 1.5rem;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  border-top: 1px solid var(--guides-border);
  background: rgba(15, 23, 42, 0.4);
}

/* Your Files Table */
.guides-table-wrap {
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid var(--guides-border);
  border-radius: 0.75rem;
}

.guides-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.guides-table th {
  background: var(--color-bg-elevated);
  padding: 0.875rem 1rem;
  border-bottom: 2px solid var(--guides-border);
  color: var(--color-text);
  font-weight: 600;
}

.guides-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--guides-border);
  color: var(--color-text);
}

.guides-table tr:last-child td {
  border-bottom: none;
}

.guides-table code {
  font-family: monospace;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  color: var(--guides-accent);
}

/* Callout Boxes */
.guides-callout {
  border-left: 4px solid var(--guides-accent);
  background: rgba(245, 158, 11, 0.08);
  padding: 1.25rem 1.5rem;
  border-radius: 0 0.5rem 0.5rem 0;
  margin: 2rem 0;
}

.guides-callout.warning {
  border-left-color: #fb7185;
  background: rgba(244, 63, 94, 0.08);
}

.guides-callout h4 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
}

.guides-callout p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
}

/* Responsive Grid of Guide Cards (Hub) */
.guides-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0 4rem;
}

.guide-card {
  background: var(--guides-card-bg);
  border: 1px solid var(--guides-border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
  color: var(--color-text);
}

.guide-card:hover {
  transform: translateY(-2px);
  border-color: var(--guides-accent);
  text-decoration: none;
}

.guide-card-header {
  margin-bottom: 1rem;
}

.guide-card-title {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.guide-card-desc {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.guide-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8125rem;
  color: var(--guides-accent);
  font-weight: 600;
}

/* Print optimizations */
@media print {
  .site-header, .site-footer, .guides-diagram-actions, .guides-breadcrumb {
    display: none !important;
  }
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .guides-page {
    max-width: 100% !important;
    padding: 0 !important;
  }
  .guides-diagram-frame {
    border: 1px solid #ccc !important;
    height: 480px !important;
  }
}
