/*
* Filename: profile.css
* Directory: /www/css/
* Description: DARK MODE design for profilsiden.
*/

/* Hovedbeholder */
.profile-container {
    max-width: 1000px;
    margin: 0 auto;
    padding-bottom: 4rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #e0e0e0; /* Lys tekst for mørk bakgrunn */
}

/* --- 1. HEADER KORTET (Toppen) --- */
.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2.5rem;
    background-color: #1e1e1e; /* MØRK BAKGRUNN */
    border: 1px solid #333;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

/* Profilbilde */
.profile-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #333;
    background-color: #2c2c2c;
}

.profile-header-info h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
    color: #fff; /* Hvit overskrift */
}

.profile-title {
    font-size: 1.1rem;
    color: #aaa; /* Grå undertittel */
    margin: 0 0 10px 0;
}

/* Roller / Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}
.role-administrator { background-color: #e74c3c; color: white; }
.role-moderator { background-color: #2ecc71; color: white; }

/* --- 2. FANER / TABS --- */
.profile-tabs {
    margin-bottom: 20px;
    border-bottom: 1px solid #333; /* Mørk linje */
}

.profile-tabs ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 10px;
}

.tab-link {
    display: block;
    padding: 12px 25px;
    color: #888; /* Mørkere tekst passiv */
    text-decoration: none;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
}

.tab-link:hover {
    color: #fff;
    background-color: rgba(255,255,255,0.05);
}

.tab-link.active {
    color: #3498db; /* Blå aktiv */
    border-bottom-color: #3498db;
}

/* --- 3. INNHOLDET --- */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

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

/* Kortene inni fanene */
.profile-container .card {
    background-color: #1e1e1e; /* MØRK BAKGRUNN */
    color: #ccc;
    padding: 2.5rem;
    border-radius: 8px;
    border: 1px solid #333;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.profile-container h3 {
    margin-top: 0;
    color: #fff;
    border-bottom: 1px solid #333;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

/* --- 4. SKJEMAER (Input felter) --- */
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { margin-bottom: 1.5rem; }

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #ddd;
}

input[type="text"], 
input[type="password"], 
input[type="email"], 
select {
    width: 100%;
    padding: 12px;
    background-color: #252526; /* Mørk input */
    border: 1px solid #444;
    border-radius: 4px;
    color: #fff; /* Hvit tekst når du skriver */
    box-sizing: border-box;
}

input:focus, select:focus {
    border-color: #3498db;
    outline: none;
    background-color: #2d2d2d;
}

.btn-primary {
    background-color: #e67e22;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.btn-primary:hover {
    background-color: #e67e22;
}

@media (max-width: 600px) {
    .profile-header { flex-direction: column; text-align: center; }
    .form-grid-2 { grid-template-columns: 1fr; }
    .profile-tabs ul { justify-content: center; }
}