/* 
   Workspace V2 Component System
   Strictly adheres to DESIGN.MD "Apostolic Editorial" system.
*/

/* ── Surfaces ── */
.card {
    background: var(--stone);
    border: 1px solid var(--border);
    border-radius: var(--radius-m);
    padding: var(--space-m);
    transition: all var(--transition-fast);
}

.card-dark {
    background: var(--ink);
    border: 1px solid var(--border-ink);
    border-radius: var(--radius-m);
    padding: var(--space-m);
    color: #fff;
}

.card-accent {
    background: var(--stone-2);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-s);
    padding: var(--space-s);
}

/* ── Typography ── */
.editorial-title {
    font-family: var(--ff-display);
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
}

.title-small {
    font-family: var(--ff-display);
    font-weight: 700;
    font-size: var(--fz-1);
    color: var(--text);
}

.label-caps {
    font-family: var(--ff-body);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
}

.label-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: var(--stone-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

/* ── Status Badges ── */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge--active { background: rgba(46, 204, 113, 0.1); color: #2ecc71; }
.status-badge--danger { background: rgba(231, 76, 60, 0.1); color: #e74c3c; }
.status-badge--muted { background: var(--stone-3); color: var(--muted); }

/* ── Buttons ── */
.btn-touch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 var(--space-l);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--stone);
    color: var(--text);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn-touch:hover {
    background: var(--stone-2);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.btn-touch--primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.btn-touch--primary:hover {
    background: var(--primary-dark, #c0392b);
}

/* ── Lists ── */
.list-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.list-item {
    display: flex;
    align-items: center;
    gap: var(--space-m);
    padding: var(--space-s) var(--space-m);
    background: var(--stone);
    border: 1px solid var(--border);
    border-radius: var(--radius-m);
    transition: all var(--transition-fast);
}

.list-item:hover {
    border-color: var(--primary);
    transform: translateX(4px);
}


/* ══════════════════════════════════════════════════════════════
   CONTEXT BAR STANDARD — workspace_v2.css is the source of truth
   ══════════════════════════════════════════════════════════════

   Every context bar (Column 2) in the Apostolic Command Shell
   must be built from these three primitives only:

   1. .ws-label-tag          — section heading pill (from workspace_v2.css)
   2. .ctx-btn               — nav/action button (defined below)
   3. .ctx-divider           — horizontal rule between sections (defined below)

   NEVER use:  .ics-explorer  .explorer-item  .ics-sidebar__item
               .explorer-section  .explorer-header  .ws-sidebar__divider
               embedded <style> blocks in context bar partials

   TEMPLATE PATTERN — copy this shell for any new context bar partial:

      <div style="display: flex; flex-direction: column; gap: 4px; padding: var(--space-s) 0;">

          <div class="ws-label-tag" style="margin-bottom: var(--space-2xs);">Section Title</div>
          <a href="{% url 'app:view' %}" class="ctx-btn {% if active %}active{% endif %}">
              <span class="material-symbols-outlined">icon_name</span>
              Link Label
          </a>

          <div class="ctx-divider"></div>

          <div class="ws-label-tag" style="margin-bottom: var(--space-2xs);">Next Section</div>
          <button class="ctx-btn" hx-get="..." hx-target="...">
              <span class="material-symbols-outlined">icon_name</span>
              Action Label
          </button>

      </div>

   Works on both <a> and <button> elements.
   Active state: add class "active" — handled by .ctx-btn.active below.
   ══════════════════════════════════════════════════════════════ */

.ctx-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 0 12px;
    height: 40px;
    width: 100%;
    background: var(--card-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-s);
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--ff-body);
    text-decoration: none;
    cursor: pointer;
    transition: background var(--transition-fast),
                border-color var(--transition-fast),
                color var(--transition-fast);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ctx-btn .material-symbols-outlined {
    font-size: 20px;
    flex-shrink: 0;
}

.ctx-btn:hover {
    background: var(--hover);
    border-color: var(--muted-light);
}

.ctx-btn.active {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary-alpha);
}

/* Section divider inside context bar */
.ctx-divider {
    height: 1px;
    background: var(--border);
    margin: var(--space-xs) 0;
}
