/* ============================================================
   BFX3 — css/team.css  v1.0
   Estilos específicos de team.html
   Depende de perfil.css (variables, navbar, stats-grid, etc.)
   ============================================================ */

/* ── Team Header ──────────────────────────────────────────── */
.team-header-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ── Table Section ────────────────────────────────────────── */
.team-table-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.team-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.team-count-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 100px;
    background: rgba(108,63,197,0.22);
    border: 1px solid rgba(108,63,197,0.40);
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    color: #a78bfa;
}

/* ── Table wrapper (scroll horizontal en mobile) ─────────── */
.team-table-wrap {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.team-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-body);
    font-size: 14px;
}

.team-table thead {
    background: rgba(81,39,123,0.22);
    border-bottom: 1px solid var(--color-border);
}

.team-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-secondary);
    white-space: nowrap;
}

.team-table td {
    padding: 13px 16px;
    vertical-align: middle;
    border-bottom: 1px solid rgba(81,39,123,0.18);
    color: var(--color-text-primary);
}

.team-table tbody tr:last-child td {
    border-bottom: none;
}

.team-table tbody tr {
    background: rgba(255,255,255,0.02);
    transition: background var(--transition);
}

.team-table tbody tr:hover {
    background: rgba(108,63,197,0.10);
}

/* ── ID cell ─────────────────────────────────────────────── */
.team-id {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 13px;
    color: var(--color-action);
}

/* ── Wallet cell ─────────────────────────────────────────── */
.team-wallet {
    font-family: 'DM Mono', 'Courier New', monospace;
    font-size: 13px;
    color: var(--color-text-primary);
}

/* ── Level badges ────────────────────────────────────────── */
.level-badge-active {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font-display);
    background: rgba(74,222,128,0.12);
    border: 1px solid rgba(74,222,128,0.28);
    color: var(--color-success);
}

.level-badge-inactive {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font-display);
    background: rgba(154,154,154,0.08);
    border: 1px solid rgba(154,154,154,0.20);
    color: var(--color-text-secondary);
}

/* ── View link ───────────────────────────────────────────── */
.team-view-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(245,191,93,0.08);
    border: 1px solid rgba(245,191,93,0.22);
    color: var(--color-action);
    font-size: 14px;
    transition: background var(--transition);
    text-decoration: none;
}

.team-view-link:hover {
    background: rgba(245,191,93,0.20);
}

/* ── Skeleton rows ────────────────────────────────────────── */
.skeleton-row td {
    padding: 14px 16px;
}

.skeleton-cell {
    height: 14px;
    border-radius: 6px;
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0.04) 25%,
        rgba(255,255,255,0.09) 50%,
        rgba(255,255,255,0.04) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.4s ease infinite;
}

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-cell.w-40 { width: 40px; }
.skeleton-cell.w-80 { width: 80px; }
.skeleton-cell.w-100 { width: 100px; }
.skeleton-cell.w-120 { width: 120px; }

/* ── Empty state ─────────────────────────────────────────── */
.team-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 48px 24px;
    text-align: center;
}

.team-empty-icon {
    font-size: 40px;
    line-height: 1;
}

.team-empty-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 17px;
    color: var(--color-text-primary);
}

.team-empty-text {
    font-size: 13px;
    color: var(--color-text-secondary);
    line-height: 1.65;
    max-width: 320px;
}

/* ── Network Level 2 Section ─────────────────────────────── */
.network-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.network-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.network-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color var(--transition), transform var(--transition);
}

.network-card:hover {
    border-color: rgba(108,63,197,0.45);
    transform: translateY(-2px);
}

.network-card-wallet {
    font-family: 'DM Mono', 'Courier New', monospace;
    font-size: 12px;
    color: var(--color-text-secondary);
}

.network-card-count {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 22px;
    color: var(--color-action);
    line-height: 1;
}

.network-card-label {
    font-size: 11px;
    color: var(--color-text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Loading progress hint ───────────────────────────────── */
.team-load-hint {
    font-size: 12px;
    color: var(--color-text-secondary);
    text-align: center;
    padding: 8px 0;
    opacity: 0.7;
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE — Mobile: table → cards
   ══════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
    /* Hide the real table on mobile */
    .team-table-wrap { display: none; }

    /* Card list instead */
    .team-card-list {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .team-member-card {
        background: var(--color-surface);
        border: 1px solid var(--color-border);
        border-radius: var(--radius-md);
        padding: 16px;
        display: flex;
        flex-direction: column;
        gap: 10px;
        transition: border-color var(--transition);
    }

    .team-member-card:hover {
        border-color: rgba(108,63,197,0.40);
    }

    .team-mc-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

    .team-mc-id {
        font-family: var(--font-display);
        font-weight: 800;
        font-size: 15px;
        color: var(--color-action);
    }

    .team-mc-body {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px 12px;
    }

    .team-mc-row {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .team-mc-label {
        font-size: 10px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--color-text-secondary);
        font-weight: 600;
    }

    .team-mc-value {
        font-size: 13px;
        color: var(--color-text-primary);
        font-weight: 500;
    }

    .team-mc-wallet {
        font-family: 'DM Mono', 'Courier New', monospace;
        font-size: 12px;
        color: var(--color-text-secondary);
    }
}

@media (min-width: 768px) {
    /* Hide mobile card list on desktop */
    .team-card-list { display: none; }
}

/* -- MODAL SELECCION DE WALLET ---------------------------- */
.wm-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.wm-overlay[hidden] { display: none; }

.wm-box {
    background: var(--color-surface, #25244A);
    border: 1px solid var(--color-border, #51277B);
    border-radius: 16px;
    padding: 32px 28px 28px;
    width: 100%;
    max-width: 420px;
    position: relative;
    animation: wmSlideIn 0.22s ease;
}

@keyframes wmSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.wm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.wm-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text-primary, #fff);
    letter-spacing: -0.3px;
}

.wm-close {
    background: none;
    border: none;
    color: var(--color-text-secondary, #9a9a9a);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
    line-height: 1;
}

.wm-close:hover { color: #fff; background: rgba(255,255,255,0.08); }

.wm-subtitle {
    font-size: 13px;
    color: var(--color-text-secondary, #9a9a9a);
    margin-bottom: 24px;
}

.wm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.wm-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 16px;
    background: rgba(255,255,255,0.04);
    border: 1.5px solid var(--color-border, #51277B);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
    color: var(--color-text-primary, #fff);
}

.wm-option:hover {
    border-color: var(--color-action, #F5BF5D);
    background: rgba(245, 191, 93, 0.06);
    transform: translateY(-2px);
}

.wm-option:active { transform: translateY(0); }

.wm-icon {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.wm-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.wm-label {
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    color: var(--color-text-primary, #fff);
}

.wm-note {
    font-size: 12px;
    color: var(--color-text-secondary, #9a9a9a);
    text-align: center;
    line-height: 1.5;
    padding: 0 8px;
}

@media (max-width: 480px) {
    .wm-box { padding: 24px 18px 22px; }
    .wm-grid { gap: 10px; }
    .wm-option { padding: 16px 10px; }
    .wm-icon { width: 38px; height: 38px; }
    .wm-label { font-size: 12px; }
}
