/* assets/css/profile.css
   Colors/tokens come from assets/css/base.css, loaded before this file. */

.profile-header {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.profile-avatar {
    width: 6rem;
    height: 6rem;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.profile-header-info h1 {
    margin: 0 0 0.15rem;
}

.profile-username {
    margin: 0 0 0.75rem;
    color: var(--color-text-muted);
}

.profile-meta,
.profile-follow-counts {
    margin: 0.25rem 0;
    color: var(--color-text-muted);
}

.profile-bio {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
    line-height: 1.6;
}

.profile-trips-heading {
    margin: 2.5rem 0 1rem;
}

.profile-trips-card {
    padding: 0;
}

/* Horizontal scroll as a safety net on narrow screens rather than
   collapsing columns -- keeps the table (and its zebra striping)
   intact instead of reflowing into stacked cards. */
.profile-trip-table-wrap {
    overflow-x: auto;
}

.profile-trip-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.profile-trip-table th {
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--color-text-muted);
    padding: 0.75rem 1.5rem;
    border-bottom: 2px solid var(--color-border);
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}

.profile-trip-table th:hover,
.profile-trip-table th:focus-visible {
    color: var(--color-text);
}

.profile-trip-table th:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: -2px;
}

.profile-trip-table th[aria-sort]::after {
    display: inline-block;
    margin-left: 0.4em;
    font-size: 0.75em;
}

.profile-trip-table th[aria-sort="ascending"]::after {
    content: "\25B2";
}

.profile-trip-table th[aria-sort="descending"]::after {
    content: "\25BC";
}

.profile-trip-table td {
    padding: 0.85rem 1.5rem;
    white-space: nowrap;
}

.profile-trip-table td.profile-trip-title {
    white-space: normal;
}

.profile-trip-table th:last-child,
.profile-trip-table td:last-child {
    text-align: right;
}

.profile-trip-table a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 600;
}

.profile-trip-table a:hover {
    color: var(--color-accent);
}

/* Zebra striping in gray -- the pink page-background token blended in
   too easily with the card's own white, making alternating rows look
   like a rendering glitch rather than intentional striping. */
.profile-trip-table tbody tr:nth-child(even) {
    background: var(--color-border);
}

.profile-trip-table tbody tr:hover {
    background: color-mix(in srgb, var(--color-accent) 12%, transparent);
}

@media (max-width: 40rem) {
    .profile-trip-table th,
    .profile-trip-table td {
        padding: 0.65rem 0.75rem;
    }
}
