/* shell-rail-group.css — the rail's Chaos group (js/shell/rail-chaos-group.js)
   and the dialog its tile opens (js/shell/rail-chaos-vision.js).

   A sheet of its own because shell.css is past the 600-line cap; it loads right
   after shell.css (index.html) and reads only its tokens.

   The group is one Chaos tile with Inbox and Planner under it, a step smaller,
   still on the strip. Folded, the children container carries [hidden]; the rule
   below keeps that true against the display this sheet gives it. */

.rail-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    border-radius: 12px;
}
/* Unfolded, a quiet well holds the tile and its apps together, so the children
   read as belonging to Chaos rather than as rail items of their own (Discord's
   folder, in the skin's tokens). */
.rail-group[data-expanded="true"] {
    background: color-mix(in srgb, var(--bg-hover) 60%, transparent);
    padding-bottom: 4px;
}

/* The tile is a <button> (it folds, it does not navigate), and a button does not
   inherit the page's face the way the app tiles' <a> does. */
.rail-group-btn { font-family: inherit; }

.rail-group-children {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.rail-group-children[hidden] { display: none; }

/* The children: a step smaller than a top-rail app, with an 18px glyph
   (railIconMarkup) and a 44px box inset inside the rail's 48px column. */
.rail-group-children .rail-btn {
    width: 44px;
    padding: 6px 4px;
}
/* A reserved child slot is the same box as the filled one (T-625): 18px, not
   the top rail's 22px, or Planner would grow by 4px when its manifest landed. */
.rail-group-children .rail-app-btn[data-rail-reserved]::before,
.rail-group-children .rail-app-btn[data-rail-unavailable]::before {
    width: 18px;
    height: 18px;
}

/* ── Tablet: the rail narrows to 48px and its buttons to 40px ── */
@media (max-width: 1023px) and (min-width: 768px) {
    .rail-group-children .rail-btn { width: 40px; padding: 6px 2px; }
}

/* ── Phone: the rail is a bottom bar, so the group lies along it ── */
@media (max-width: 767px) {
    .rail-group,
    .rail-group-children { flex-direction: row; }
    .rail-group[data-expanded="true"] { padding: 0 4px 0 0; }
    .rail-group-children .rail-btn { width: auto; padding: 6px 10px; }
}

/* ── The vision dialog ── */
.rail-chaos-vision-body {
    max-width: 30rem;
    color: var(--text-secondary);
    font-size: var(--fs-body);
    line-height: var(--lh-relaxed);
}
.rail-chaos-vision-body p { margin: 0 0 12px; }
.rail-chaos-vision-body p:last-child { margin-bottom: 0; color: var(--text-primary); }

.rail-chaos-vision-optout {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: var(--fs-ui);
    cursor: pointer;
}
