/*
 * Tela Network v2 — public profile (Record mode).
 */

.v2-profile {
    padding-bottom: 3.5rem;
}

.v2-profile-preview-banner {
    border: 1px solid var(--v2-border);
    margin: 0 0 1.5rem;
    padding: 0.75rem 1rem;
}


/* Identity header */

.v2-profile-header {
    border-bottom: 1px solid var(--v2-rule);
    padding-bottom: 2rem;
}

@media (min-width: 768px) {
    .v2-profile-header {
        padding-bottom: 3rem;
    }
}

.v2-profile-header-grid {
    align-items: start;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) auto;
}

@media (min-width: 640px) {
    .v2-profile-header-grid {
        gap: 1.5rem;
        grid-template-columns: auto minmax(0, 1fr);
    }
}

.v2-profile-avatar {
    align-items: center;
    background-color: var(--v2-secondary);
    border: 1px solid var(--v2-input);
    display: grid;
    font-size: var(--v2-text-md);
    font-weight: 600;
    grid-column: 2;
    height: 3.5rem;
    place-items: center;
    width: 3.5rem;
}

@media (min-width: 640px) {
    .v2-profile-avatar {
        font-size: var(--v2-text-lg);
        grid-column: 1;
        height: 4rem;
        width: 4rem;
    }
}

.v2-profile-identity {
    grid-column: 1;
    min-width: 0;
}

@media (min-width: 640px) {
    .v2-profile-identity {
        grid-column: 2;
    }
}

.v2-profile-name {
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin: 0;
}

@media (min-width: 640px) {
    .v2-profile-name {
        font-size: 2.125rem;
    }
}

.v2-profile-headline {
    font-size: var(--v2-text-base);
    margin: 0.375rem 0 0;
}

.v2-profile-badges {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-top: 0.75rem;
}

.v2-profile-badge {
    border: 1px solid color-mix(in oklch, var(--v2-confirmed) 35%, transparent);
    color: var(--v2-confirmed);
    padding: 3px 6px;
}

.v2-profile-thin-note {
    border-left: 2px solid var(--v2-rule);
    font-size: var(--v2-text-base);
    line-height: 1.625;
    margin: 1.5rem 0 0;
    max-width: 36rem;
    padding-left: 1rem;
}

.v2-profile-summary {
    margin-top: 1.5rem;
    max-width: 36rem;
}

.v2-profile-summary-label {
    margin: 0 0 0.5rem;
}

.v2-profile-summary-body {
    font-size: 1.0625rem;
    line-height: 1.625;
    margin: 0;
}


/* Stat grid */

.v2-profile-stat-grid {
    border-top: 1px solid var(--v2-rule);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
}

@media (min-width: 640px) {
    .v2-profile-stat-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.v2-profile-stat-grid > div {
    border-bottom: 1px solid var(--v2-rule);
    padding: 1rem 1rem 1rem 0;
}

.v2-profile-stat-value {
    font-size: 1.375rem;
    line-height: 1;
    margin: 0;
}

.v2-profile-stat-grid dt {
    margin: 0.5rem 0 0;
}


/* Tabs */

.v2-profile-tabs {
    border-bottom: 1px solid var(--v2-border);
    display: flex;
    gap: 1.5rem;
}

.v2-profile-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--v2-muted-foreground);
    cursor: pointer;
    margin-bottom: -1px;
    padding: 1rem 0;
    text-decoration: none;
    transition: color 0.15s ease;
}

.v2-profile-tab:hover {
    color: var(--v2-foreground);
}

.v2-profile-tab--active {
    border-bottom-color: var(--v2-accent);
    color: var(--v2-foreground);
}

.v2-profile-tab-count {
    font-size: var(--v2-text-sm);
    font-weight: 400;
    margin-left: 0.35rem;
    opacity: 0.6;
}


/* Panels */

.v2-profile-panel {
    padding-bottom: 2rem;
}

.v2-profile-panel-lead {
    margin: 1.5rem 0 0;
}

.v2-profile-posts-note,
.v2-profile-empty {
    font-size: var(--v2-text-base);
    line-height: 1.625;
    margin: 1.5rem 0 0;
    max-width: 36rem;
}

.v2-profile-posts-list {
    list-style: none;
    margin: 0;
    padding: 0;
}


/* Ledger */

.v2-profile-year-heading {
    border-bottom: 1px solid color-mix(in oklch, var(--v2-foreground) 80%, transparent);
    color: var(--v2-muted-foreground);
    font-size: var(--v2-text-base);
    margin: 2rem 0 0;
    padding-bottom: 0.375rem;
    position: sticky;
    top: 3.5rem;
    z-index: 1;
    background-color: var(--v2-background);
}

.v2-profile-ledger-row {
    border-bottom: 1px solid var(--v2-border);
    display: grid;
    gap: 0.75rem 1.5rem;
    grid-template-columns: 3.75rem 1fr;
    padding-block: 0.875rem;
}

@media (min-width: 768px) {
    .v2-profile-ledger-row {
        grid-template-columns: 6.5rem 1fr auto;
    }
}

.v2-profile-ledger-date {
    padding-top: 3px;
}

.v2-ledger-time {
    display: block;
    margin-top: 0.125rem;
}

.v2-profile-ledger-parties {
    font-size: 0.9375rem;
    line-height: 1.375;
    margin-top: 0.375rem;
}

.v2-profile-ledger-link {
    color: inherit;
    text-decoration: none;
}

.v2-profile-ledger-link:hover {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: currentColor;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.v2-profile-ledger-summary {
    font-size: var(--v2-text-base);
    line-height: 1.375;
    margin: 0.25rem 0 0;
}

.v2-profile-ledger-status-mobile {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

@media (min-width: 768px) {
    .v2-profile-ledger-status-mobile {
        display: none;
    }
}

.v2-profile-ledger-status-desktop {
    align-items: flex-end;
    display: none;
    flex-direction: column;
    gap: 0.375rem;
}

@media (min-width: 768px) {
    .v2-profile-ledger-status-desktop {
        display: flex;
    }
}


.v2-profile-network-stat-grid {
    margin-top: 1.5rem;
}

.v2-profile-posts-footnote {
    margin-top: 1.25rem;
}


/* Network */

.v2-profile-network-section {
    margin-top: 2rem;
}

.v2-profile-section-heading {
    border-bottom: 1px solid color-mix(in oklch, var(--v2-foreground) 80%, transparent);
    margin: 0;
    padding-bottom: 0.5rem;
}

.v2-profile-network-list,
.v2-profile-org-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.v2-profile-network-row,
.v2-profile-org-row {
    align-items: baseline;
    border-bottom: 1px solid var(--v2-border);
    display: grid;
    gap: 0.25rem 1rem;
    grid-template-columns: minmax(0, 1fr) auto;
    padding-block: 0.875rem;
}

@media (min-width: 768px) {
    .v2-profile-network-row {
        grid-template-columns: 14rem 1fr auto;
    }
}

.v2-profile-network-types {
    font-size: var(--v2-text-base);
    grid-column: 1 / -1;
}

@media (min-width: 768px) {
    .v2-profile-network-types {
        grid-column: auto;
    }
}

.v2-profile-network-meta {
    font-size: var(--v2-text-base);
    text-align: right;
}

.v2-profile-network-span {
    display: block;
    margin-top: 0.125rem;
    opacity: 0.7;
}

.v2-profile-org-row {
    grid-template-columns: minmax(0, 1fr) auto;
}


/* Pagination */

.v2-profile-pagination {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    margin-top: 1rem;
}

.v2-profile-pagination-form {
    margin: 0;
}

.v2-profile-pagination-disabled {
    cursor: default;
    opacity: 0.45;
    pointer-events: none;
}


/* Footer */

.v2-profile-footer {
    border-top: 1px solid var(--v2-rule);
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1.5rem;
}

.v2-profile-record-event {
    display: inline-block;
}
