/*
// Filename: profile.css
// Directory: /www/css/
// File path: /www/css/profile.css
// Description: Stiler kun for den nye profilsiden (page_profile.php).
*/

/* --- Hoved-layout for profil --- */
.profile-container {
    max-width: 900px;
    margin: 2rem auto;
}

/* --- Headeren (Avatar + Navn) --- */
.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--color-background);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.profile-header-info h1 {
    margin: 0 0 0.25rem 0;
    font-size: 2rem;
}

.profile-member-since {
    font-size: 1rem;
    color: #777;
    margin: 0;
}

.profile-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    margin-top: 0.5rem;
}
.profile-badge.owner {
    background-color: var(--color-accent);
    color: white;
}

/* --- Eier-visning (Tabs) --- */
.profile-tabs {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 2rem;
}
.tab-link {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    color: #777;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px; 
    transition: all 0.2s ease;
}
.tab-link:hover {
    color: var(--color-text);
}
.tab-link.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* --- Tab-innhold --- */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}
.tab-content.active {
    display: block; 
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- Gjestevisning --- */
.public-profile-info {
    padding: 2rem;
    background: #fdfdfd;
    border: 1px solid #eee;
    border-radius: 8px;
}
.public-profile-info h2 {
    margin-top: 0;
}

/* * *** NYTT: BILDEGALLERI ***
 */
.avatar-gallery-section {
    margin-top: 2rem;
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.avatar-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.avatar-item {
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 0.5rem;
    text-align: center;
    background: #fff;
}

.avatar-preview-link img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
    margin-bottom: 0.5rem;
    border: 1px solid #ddd;
}

.avatar-select-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 0.8rem;
    cursor: pointer;
}