/* W3-1a: the six-card member dashboard (/portal). The owner-approved order is
   (1) next satsang + Akhand Sadhna live, (2) My practice, (3) Coming up with its four tabs,
   (4) Today's reflection, (5) My sewa, (6) The wider sangat. Plain djjs- classes: the precompiled bundle
   has no CSS for Tailwind classes it never used, so the new layout lives here and not in the app build. */

/* W3-3: one row-aligned grid. Phones stack; from 48rem two columns; from 64rem the twelve columns below. Cards in a
   row stretch to the row's height, so a shorter card fills its side and no row leaves an empty card bottom. */
.djjs-six { display: grid; align-items: stretch; gap: var(--ds-space-5); margin-top: var(--ds-space-6); min-width: 0; }
.djjs-six-card {
  position: relative; display: grid; align-content: start; gap: 1rem; min-width: 0; padding: 1.25rem;
  border: 1px solid var(--pc-hair); border-radius: 1.75rem;
  background: var(--pc-card); color: var(--pc-ink);
}
.djjs-six-card__t {
  margin: 0; font: 600 1.65rem/1.2 var(--font-display, "Cormorant Garamond", "Cormorant Fallback", Georgia, serif);
  color: var(--pc-ink);
}
.djjs-six-card__actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.djjs-six-card__more { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0; font-size: .9rem; }
.djjs-six-card__more :is(a) { display: inline-flex; align-items: center; min-height: 44px; color: var(--pc-gold); font-weight: 600; text-underline-offset: 3px; }
.djjs-six-card__empty { margin: 0; color: var(--pc-meta); }

/* Today's reflection: its heading over the day's Bodh, which brings no card chrome of its own */
.djjs-six-card--reflection .djjs-reflect__bodh {
  padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible;
}

/* the merged practice card: its inner elements keep their own quiet styling, not a second card frame */
.djjs-six-card--practice > :is(djjs-practice-status, djjs-niyama, djjs-sadhna-milestones, .glass) {
  padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none;
}
.djjs-six-card--practice > djjs-practice-status { padding-top: .25rem; }
.djjs-six-card--practice djjs-niyama { padding-top: .5rem; border-top: 1px solid var(--pc-hair); }
.djjs-six-card--practice > djjs-sadhna-milestones { padding-top: .5rem; border-top: 1px solid var(--pc-hair); }

/* Coming up: four tabs over the same card */
.djjs-tabs { display: flex; gap: .25rem; overflow-x: auto; border-bottom: 1px solid var(--pc-hair); scrollbar-width: none; }
.djjs-tabs::-webkit-scrollbar { display: none; }
.djjs-tabs__btn {
  position: relative; flex: none; min-height: 44px; padding: 0 .8rem; border: 0; background: none;
  color: var(--pc-meta); font: inherit; font-weight: 600; white-space: nowrap; cursor: pointer;
}
.djjs-tabs__btn[aria-selected="true"] { color: var(--pc-ink); }
.djjs-tabs__btn[aria-selected="true"]::after {
  content: ""; position: absolute; inset: auto .6rem -1px; height: 2px; border-radius: 999px;
  background: linear-gradient(90deg, var(--c-primary), var(--c-accent));
}
.djjs-tabs__btn:focus-visible { outline: 3px solid var(--focus, var(--c-accent)); outline-offset: 2px; border-radius: 8px; }
.djjs-tabs__panel { min-width: 0; padding-top: .75rem; }
.djjs-tabs__panel[hidden] { display: none; }
/* the four views bring their own card chrome; inside the Coming up card it is one surface */
.djjs-six-card--coming .djjs-tabs__panel > :is(.glass, .djjs-mine__card, .djjs-col-card) {
  padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none;
}

/* My sewa */
.djjs-sewa-list { display: grid; gap: .1rem; margin: 0; padding: 0; list-style: none; }
.djjs-sewa-list li { display: grid; gap: .15rem; padding: .55rem 0; border-bottom: 1px solid var(--pc-hair); }
.djjs-sewa-list li:last-child { border-bottom: 0; }
.djjs-sewa-list a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--pc-ink); text-underline-offset: 3px; }
.djjs-sewa-list__meta { font-size: .84rem; color: var(--pc-meta); }

/* The wider sangat: plain links only, no tiles */
.djjs-links { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.djjs-links li { border-bottom: 1px solid var(--pc-hair); }
.djjs-links li:first-child { border-top: 1px solid var(--pc-hair); }
.djjs-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--pc-ink); font-weight: 600; text-underline-offset: 3px; }
.djjs-links a:hover { color: var(--pc-gold); }

/* the branch's spotlight: one plain block in the wider-sangat card, never a tile; its picture stays 56px */
.djjs-six-card--wider djjs-branch-spot { margin: 0; padding-top: .75rem; border-top: 1px solid var(--pc-hair); }
.djjs-six-card--wider djjs-branch-spot .djjs-pc-spot { grid-template-columns: minmax(0, 1fr); gap: 0; }
.djjs-six-card--wider djjs-branch-spot .djjs-pc-spot__card { padding: .55rem 0; border: 0; border-radius: 0; background: none; }
.djjs-six-card--wider djjs-branch-spot .djjs-pc-spot__card + .djjs-pc-spot__card { border-top: 1px solid var(--pc-hair); }

/* the one quiet Sadhna Prachar link (assets/js/portal-command.js <djjs-sadhna-prachar>) */
djjs-sadhna-prachar { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .25rem; min-height: 44px; font-size: .9rem; }
djjs-sadhna-prachar[hidden] { display: none; }
djjs-sadhna-prachar .djjs-prachar__a { display: inline-flex; align-items: center; min-height: 44px; color: var(--pc-meta); font-weight: 600; text-underline-offset: 3px; }
djjs-sadhna-prachar .djjs-prachar__n { color: var(--pc-meta); }

/* the hero's one next-satsang line */
.djjs-ah__next { margin: 0; font-size: .84rem; line-height: 1.35; color: var(--pc-meta); }

@media (min-width: 48rem) {
  .djjs-six { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .djjs-six-card--practice, .djjs-six-card--coming, .djjs-six-card--wider { grid-column: 1 / -1; }
}
@media (min-width: 64rem) {
  .djjs-six { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .djjs-six-card--practice { grid-column: span 7; }
  .djjs-six-card--coming { grid-column: span 5; }
  .djjs-six-card--reflection, .djjs-six-card--sewa, .djjs-six-card--wider { grid-column: span 4; }
}
@media (min-width: 80rem) {
  .djjs-six { gap: var(--ds-space-6); }
}
@media (prefers-reduced-motion: reduce) {
  .djjs-tabs__btn, .djjs-links a, .djjs-sewa-list a { transition: none; }
}
