/**
 * sign-in-methods.css — the linked sign-in methods list.
 *
 * These rules lived inline in /auth/account/index.html. When the JS was extracted
 * into auth/js/sign-in-methods.js (2026-09-11) so /studio/connections/ could mount
 * the same list, the styles stayed behind — the connections page rendered the DOM
 * with no styling at all. One stylesheet now serves both hosts.
 *
 * Host-agnostic by construction: separators, chips and hover tints are mixed from
 * `currentColor`, so the list picks up whatever surface it is dropped onto — the
 * md3 card on /auth/account/ and the neutral Tailwind card on /studio/connections/
 * — instead of assuming either page's palette.
 */

.method-list {
    display: flex;
    flex-direction: column;
}

/* ── row ─────────────────────────────────────────────────────────────────── */
.method-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
        'icon identity badge'
        'icon actions  actions';
    align-items: center;
    column-gap: 14px;
    row-gap: 10px;
    padding: 14px 2px;
    border-top: 1px solid color-mix(in srgb, currentColor 12%, transparent);
}

.method-row:first-child { border-top: none; }

.method-icon {
    grid-area: icon;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: color-mix(in srgb, currentColor 8%, transparent);
    flex-shrink: 0;
}

.method-icon .material-symbols-outlined {
    font-size: 20px;
    opacity: .7;
}

/* ── identity ────────────────────────────────────────────────────────────── */
.method-identity {
    grid-area: identity;
    min-width: 0;
}

/* The provider name leads. Two rows that both resolve to the same address were
   indistinguishable while the masked address was the only label. */
.method-name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

.method-mask {
    font-size: 13px;
    line-height: 1.4;
    margin-top: 1px;
    opacity: .75;
    overflow-wrap: anywhere;
}

.method-meta {
    font-size: 12px;
    line-height: 1.4;
    margin-top: 2px;
    opacity: .55;
}

/* ── status badge ────────────────────────────────────────────────────────── */
.method-badge {
    grid-area: badge;
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    background: color-mix(in srgb, currentColor 8%, transparent);
    opacity: .7;
}

.method-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: currentColor;
    opacity: .55;
}

.method-badge.active {
    background: color-mix(in srgb, #16a34a 16%, transparent);
    /* #15803d on this tint measured 4.19:1 on a white card — below the 4.5:1 AA floor for
       11px text. #146c34 on the same tint measures 5.44:1. */
    color: #146c34;
    opacity: 1;
}

.method-badge.active::before {
    background: #16a34a;
    opacity: 1;
}

.dark .method-badge.active { color: #4ade80; }

/* ── actions ─────────────────────────────────────────────────────────────── */
.method-actions {
    grid-area: actions;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.method-btn {
    font: inherit;
    font-size: 12px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
    background: transparent;
    color: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.105s ease, border-color 0.105s ease, transform 0.07s ease;
}

.method-btn:hover { background: color-mix(in srgb, currentColor 8%, transparent); }
.method-btn:active { transform: scale(.97); }
.method-btn:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.method-btn:disabled { opacity: .6; cursor: default; }

.method-btn.danger {
    color: var(--md-error, #b3261e);
    border-color: color-mix(in srgb, var(--md-error, #b3261e) 45%, transparent);
}

.method-btn.danger:hover { background: color-mix(in srgb, var(--md-error, #b3261e) 10%, transparent); }

/* "Link <provider>" buttons carry the brand mark, so they read as an action row
   rather than the run-together text links they were. */
.method-btn.add {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 13px;
}

.method-btn.add svg,
.method-btn.add .material-symbols-outlined {
    width: 18px;
    height: 18px;
    font-size: 18px;
    flex-shrink: 0;
}

.method-busy { pointer-events: none; opacity: .6; }

/* ── add section ─────────────────────────────────────────────────────────── */
.method-add {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.method-add-label {
    width: 100%;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    opacity: .5;
    margin-bottom: 2px;
}

.method-empty {
    font-size: 13px;
    opacity: .65;
    padding: 12px 2px;
}

/* ── narrow screens ──────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .method-row {
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-areas:
            'icon identity'
            'badge badge'
            'actions actions';
        row-gap: 8px;
    }

    .method-badge { justify-self: start; }
}
