/* CA_THEDRAL — Settings Drawer collapsibility styles. R-015 feature module. */

/* Cascade fix: body-prefixed selector beats inline .right-panel rule (line 188) */
body .right-panel { flex-direction: row; }

/* Left-edge toggle strip (always visible when right-panel is rendered on desktop) */
.rp-toggle {
  width: 28px;
  background: var(--surface-raised);
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
  padding: 0;
}
.rp-toggle:hover { background: var(--surface-elevated); color: var(--text-primary); }

/* Gear SVG inside the toggle */
.rp-toggle-gear {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Active state — gear glows green when drawer is open (not collapsed) */
.right-panel:not(.rp-collapsed) .rp-toggle {
  color: var(--global-green);
}

/* Body container holds tabs + tab-content vertically */
.rp-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* Collapsed state — body hidden, only toggle visible */
.right-panel.rp-collapsed .rp-body { display: none; }

/* Grid column override — narrows right column to toggle width when collapsed (Trade Entry only) */
.main.rp-collapsed-grid { grid-template-columns: 1fr 28px; gap: 8px; }

/* (Retro-light .rp-toggle override relocated to theme-retro-light.css per
   S66 Phase D — component CSS becomes theme-blind.) */

/* Mobile: revert right-panel to column layout (preserves existing mobile-open behavior); hide rp-toggle entirely (mobile uses #mobile-settings-btn overlay path) */
@media (max-width: 768px) {
  body .right-panel { flex-direction: column; }
  .rp-toggle { display: none; }
}

/* End R-015 */


/* ================================================================
   R-057 T1b.2 — Group Wallet Trading frontend (Settings drawer Wallets tab)
   ================================================================ */

/* Copy-wallet card — same subtle outline as other cards; copy identity carried by the highlighted COPY action button. */
.wp-card.wp-card-copy { border-color: var(--border-default); }

/* Copy-toggle button — ON state ("COPY OFF" label) */
.wp-btn.wp-btn-copy-on {
  border-color: var(--badge-copy);
  color: var(--badge-copy);
}

/* Group Composition sub-panel inside copy-wallet card */
.wp-group-panel {
  margin-top: 10px;
  padding: 10px;
  border: 1px dashed var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
}
.wp-group-header {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}
.wp-group-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.wp-group-name {
  flex: 1;
  font-size: 12px;
  color: var(--text-primary);
}
.wp-group-alloc {
  width: 80px;
  padding: 4px 8px;
  background: var(--surface-base);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-numeric);
  font-size: 12px;
}
.wp-group-mult {
  width: 50px;
  text-align: right;
  font-size: 11px;
  color: var(--text-secondary);
  font-family: var(--font-numeric);
}
.wp-group-empty {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  padding: 6px 0;
}
/* R-057 T2 polish — explicit grid keeps ADD button inside the panel's right edge regardless of select-text length */
.wp-group-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px auto;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-default);
}
.wp-group-select {
  min-width: 0;
  padding: 4px 8px;
  background: var(--surface-base);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 12px;
}

/* End R-057 T1b.2 */
