/* ============================================================
   yoga.css – shared styles for yoga session pages
   Colors: olive green, forest green, warm terracotta
   ============================================================ */

:root {
  --sage-bg:       #f2f5ed;
  --sage-light:    #ddebc4;
  --forest:        #8ab870;
  --forest-mid:    #5a8a46;
  --forest-dark:   #3a5e2e;
  --olive:         #7a8c4a;
  --olive-light:   #b5c87a;
  --olive-dark:    #4e5c2a;
  --text-main:     #1c2e18;
  --text-muted:    #5a7050;
  --row-hover:     #ddebc4;
  --expand-bg:     #f0f8e8;
  --expand-border: #b8d890;
  --badge-bg:      #cce8c0;
  --badge-text:    #2c5820;
  --alt-badge-bg:  #f5e0c8;
  --alt-badge-text:#7a3e14;
  --white:         #ffffff;
  --shadow:        rgba(62, 96, 42, 0.12);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background-color: var(--sage-bg);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Decorative header strip ---------- */
.deco-top {
  background: linear-gradient(135deg, var(--forest-dark) 0%, var(--forest-mid) 60%, var(--forest) 100%);
  padding: 0.5rem 1.5rem 0;
  display: flex;
  align-items: flex-end;
  gap: 0.6rem;
  min-height: 80px;
  position: relative;
}

.deco-top svg { display: block; }

/* ---------- Language switcher ---------- */
.lang-switcher {
  position: absolute;
  top: 0.75rem;
  right: 1.5rem;
  display: flex;
  gap: 0.4rem;
  z-index: 10;
}

.lang-switcher a {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1.5px solid rgba(255,255,255,0.7);
  color: var(--white);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.lang-switcher a:hover,
.lang-switcher a.active {
  background: var(--white);
  color: var(--forest-dark);
}

/* ---------- Main content ---------- */
main {
  flex: 1;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

h1 {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--forest-dark);
  margin-bottom: 0.4rem;
}

.subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 2rem;
}

/* ---------- Table wrapper ---------- */
.pose-table-wrapper {
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 4px 24px var(--shadow);
  overflow: hidden;
}

/* ---------- Grid layout ---------- */
.pose-header,
.pose-item > summary {
  display: grid;
  grid-template-columns: 2fr 0.65fr 1.8fr 2fr 2fr;
  align-items: center;
  column-gap: 1rem;
}

.pose-header {
  background: linear-gradient(90deg, var(--forest-mid), var(--forest));
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.85rem 1rem;
  white-space: nowrap;
}

.pose-item > summary {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--sage-light);
  cursor: pointer;
  transition: background 0.18s;
  font-size: 0.93rem;
  list-style: none;
}

.pose-item > summary::-webkit-details-marker { display: none; }

.pose-item > summary:hover { background: var(--row-hover); }

/* chevron indicator */
.pose-name-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--forest-dark);
}

.chevron {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 0.25s;
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a8a46' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='9 18 15 12 9 6'/></svg>") center/contain no-repeat;
}

details[open] > summary .chevron {
  transform: rotate(90deg);
}

/* duration cell */
.duration-cell {
  color: var(--text-muted);
  font-size: 0.88rem;
  white-space: nowrap;
}

/* ---------- Badges ---------- */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-meridian {
  background: var(--badge-bg);
  color: var(--badge-text);
}

.badge-alt {
  background: var(--alt-badge-bg);
  color: var(--alt-badge-text);
}

.badge-meridian::before,
.badge-alt::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  background: center/contain no-repeat;
}

.badge-meridian::before {
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232c5820' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><line x1='12' y1='8' x2='12' y2='16'/><line x1='8' y1='12' x2='16' y2='12'/></svg>");
}

.badge-alt::before {
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a3e14' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 2a10 10 0 1 0 0 20A10 10 0 0 0 12 2z'/><path d='M12 8v4l3 3'/></svg>");
}

/* sensation cell */
.sensation-cell {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ---------- Expanded detail ---------- */
.detail-inner {
  background: var(--expand-bg);
  border-left: 4px solid var(--forest);
  border-bottom: 2px solid var(--expand-border);
  padding: 1.2rem 1.5rem 1.4rem 1.8rem;
}

.detail-inner h3 {
  font-size: 1rem;
  color: var(--forest-dark);
  margin-bottom: 0.5rem;
}

.detail-inner p {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-main);
  margin-bottom: 0.8rem;
}

.detail-inner .alt-section {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--expand-border);
}

.detail-inner .alt-section h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--olive);
  margin-bottom: 0.5rem;
}

.detail-inner .alt-item {
  font-size: 0.9rem;
  color: var(--text-main);
  margin-bottom: 0.4rem;
  padding-left: 1rem;
  position: relative;
}

.detail-inner .alt-item::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: var(--olive-light);
  font-size: 0.65rem;
  top: 0.25em;
}

/* ---------- Decorative footer strip ---------- */
.deco-bottom {
  background: linear-gradient(135deg, #7a3e14 0%, #b05a30 60%, #d48a58 100%);
  padding: 0.5rem 1.5rem 0;
  display: flex;
  align-items: flex-end;
  gap: 0.6rem;
  min-height: 64px;
}

/* ---------- Mobile-only detail info (hidden on desktop) ---------- */
.mobile-info { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .pose-header,
  .pose-item > summary {
    grid-template-columns: 1fr auto;
  }

  .col-alternatives,
  .col-meridians,
  .col-sensation { display: none; }

  h1 { font-size: 1.4rem; }

  .mobile-info { display: block; }

  main { padding: 1.2rem 1rem 2rem; }
}

/* ---------- Print ---------- */
@media print {
  /* Expand all poses */
  .pose-item > .detail-inner { display: block !important; }

  /* Show all columns */
  .col-alternatives,
  .col-meridians,
  .col-sensation { display: revert; }

  .pose-header,
  .pose-item > summary {
    grid-template-columns: 2fr 0.65fr 1.8fr 2fr 2fr;
  }

  /* Hide mobile-only info (columns visible in print) */
  .mobile-info { display: none !important; }

  /* Don't split a pose across pages */
  .pose-item { break-inside: avoid; }

  /* Hide decorative and interactive elements */
  .deco-top, .deco-bottom, .lang-switcher { display: none; }
  .chevron { display: none; }

  /* Clean appearance */
  .pose-table-wrapper { box-shadow: none; border: 1px solid var(--sage-light); }
  .pose-item > summary { background: none !important; cursor: default; }
  .detail-inner { border-left: 2px solid var(--olive-light); }

  main { padding: 1rem; }
}
