/* =========================================================
PROJECT: Walanda platform
FILE: role-picker.css
PATH: /src/modules/auth/css/role-picker.css
MODULE: auth
SCOPE: styling (page)
PURPOSE: layout for the post-login role chooser + the add-role page. Cards use
         the shared .card / .card--interactive base; this file only positions
         them and styles the icon/labels with design tokens (no hardcoded
         colours, spacing, or radii).
AUTHOR: Simasiku Nasilele
STANDARD: Walanda pro ui system
VERSION: 1.1.0
LAST UPDATED: 2026
========================================================= */

.role-picker {
    padding-block: var(--space-xl);
}

.role-picker__head {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.role-picker__sub {
    color: var(--muted);
    max-width: 52ch;
    margin: var(--space-sm) auto 0;
}

.role-picker__status {
    text-align: center;
    min-height: var(--space-lg);
    color: var(--muted);
    margin-bottom: var(--space-sm);
}

.role-picker__status.is-error {
    color: var(--status-danger-fg);
}

.role-picker__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.role-picker__card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xs);
    padding: var(--space-lg);
    text-align: left;
    cursor: pointer;
    position: relative;
}

.role-picker__card:disabled {
    opacity: 0.6;
    cursor: progress;
}

/* The action button on an add-role card sits below the copy. */
.role-picker__card .btn {
    margin-top: var(--space-sm);
}

.role-picker__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--space-xl);
    height: var(--space-xl);
    border-radius: var(--radius-md);
    background: var(--primary-light);
    color: var(--surface);
    font-size: 1.25em;
    margin-bottom: var(--space-xs);
}

.role-picker__label {
    font-weight: 700;
    color: var(--text-dark);
}

.role-picker__desc {
    color: var(--muted);
    font-size: 0.875em;
}

.role-picker__current {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    font-size: 0.75em;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.role-picker__foot {
    text-align: center;
    color: var(--muted);
}

/* add-role page reuses the grid; this marks roles that need approval. */
.role-picker__badge {
    display: inline-block;
    margin-top: var(--space-xs);
    padding: var(--space-xs);
    border-radius: var(--radius-sm);
    background: var(--primary-light);
    color: var(--surface);
    font-size: 0.75em;
}

/* Warning variant — e.g. an institutional instructor whose school hasn't
   approved the placement yet ("Awaiting approval from <school>"). */
.role-picker__badge--warn {
    background: var(--status-warning-bg);
    color: var(--status-warning-fg);
}

/* Section headings for the "Your roles" / "Add a role" split on the
   manage-roles page. */
.role-picker__section-title {
    color: var(--text-dark);
    margin: var(--space-lg) 0 var(--space-sm);
}
/* =========================================================
END OF FILE
========================================================= */
