/* ==============================================
   NEO-BRUTALISM PROFILE STYLES (Kiez-Pop)
   REWRITE: Sauberes Layout ohne Utility-Klassen-Konflikte
   ============================================== */

:root {
    /* Mapped to Global Variables for auto-dark-mode support */
    --brutal-bg: var(--bg-body);
    --brutal-ink: var(--color-ink);
    --brutal-coral: var(--color-coral);
    --brutal-teal: var(--color-teal);
    --brutal-yellow: var(--color-yellow);
    --brutal-blue: var(--color-blue);
    --brutal-border: 2px solid var(--color-ink);
    --brutal-shadow: 4px 4px 0px 0px var(--color-ink);
    --brutal-shadow-hover: 2px 2px 0px 0px var(--color-ink);
    --brutal-radius: 12px;
    --brutal-pill: 999px;
    --brutal-card-bg: var(--bg-card);
    --brutal-text-muted: var(--text-muted);
}



/* ===== MAIN LAYOUT GRID ===== */

.profile-dashboard-grid {
    display: grid;

    grid-template-columns: 280px 1fr;
    gap: 2.5rem;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    background-color: var(--brutal-bg);
    min-height: 80vh;
}

.public-profile-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: start;
}

@media (max-width: 900px) {

    .profile-dashboard-grid,
    .public-profile-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ===== MAIN CONTENT AREA - OVERFLOW FIX ===== */

.profile-main-content {
    min-width: 0;
    /* KRITISCH: Verhindert Grid-Overflow */
    overflow: visible;
    /* FIX: Schatten bei Hover nicht abschneiden */
    padding: 8px;
    /* Platz für Schatten-Overflow */
    margin: -8px;
    /* Kompensiert Padding im Layout */
}

/* ===== SECTIONS ===== */

.profile-section {
    margin-bottom: 3rem;
    scroll-margin-top: 6rem;
    /* Offset für Fixed Header beim Anker-Scroll */
}

.profile-section:last-child {
    margin-bottom: 0;
}

/* Header mit Button (z.B. "Beiträge" + "Neu erstellen") */
.profile-section-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.profile-section-header .section-title {
    margin: 0;
}

/* Tab-Gruppe neben Überschriften */
.profile-tab-group {
    display: flex;
    gap: 0.75rem;
}

/* Subsection Titel (Projekte, Tipps, etc.) */
.profile-subsection-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--brutal-text-muted);
    text-transform: uppercase;
    margin: 2rem 0 1rem 0;
    padding-left: 0.75rem;
    border-left: 4px solid var(--brutal-teal);
}

.profile-subsection-title:first-of-type {
    margin-top: 0;
}

/* ===== CARDS - BASE ===== */

.brutal-card,
.profile-card {
    background: var(--brutal-card-bg);
    border: var(--brutal-border);
    box-shadow: var(--brutal-shadow);
    border-radius: var(--brutal-radius);
    padding: 1.75rem;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: visible;
    display: flex;
    flex-direction: column;
}

/* ===== KOMPAKTE KARTEN-GRID ===== */

.profile-cards-grid {
    display: grid;
    /* REWRITE: Festes 3-Spalten-Grid mit minmax(0, 1fr) */
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    /* FIX: Platz für Box-Shadow am rechten Rand */
    padding-right: 6px;
}

@media (max-width: 1100px) {
    .profile-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .profile-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== MINI-KARTEN (für Beiträge/Favoriten) ===== */

.profile-mini-card {
    background: var(--brutal-card-bg);
    border: var(--brutal-border);
    border-radius: var(--brutal-radius);
    padding: 1.25rem;
    box-shadow: var(--brutal-shadow);
    display: flex;
    flex-direction: column;
    /* Dynamische Höhe – Card wächst mit dem Inhalt, Grid gleicht Reihen-Höhen aus */
    position: relative;
    transition: all 0.15s ease;
    max-width: 100%;
}

.profile-mini-card:hover {
    transform: translate(2px, 2px);
    box-shadow: var(--brutal-shadow-hover);
}

.profile-mini-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.profile-mini-card-actions {
    display: flex;
    gap: 0.25rem;
}

.profile-mini-card-actions button {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: var(--text-main);
    opacity: 0.5;
    transition: opacity 0.15s;
}

.profile-mini-card-actions button:hover {
    color: var(--text-main);
    opacity: 1;
}

.profile-mini-card h4 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
    color: var(--brutal-ink);
}

.profile-mini-card p {
    font-size: 0.85rem;
    color: var(--brutal-text-muted);
    margin: 0 0 0.75rem 0;
    /* Abstand zur Footer-Linie */
    flex: 1;
    line-height: 1.5;
}

/* Datums-Zeile bei Terminen (kompakt, auffällig) */
.profile-mini-card-date {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--brutal-coral);
    margin: 0 0 0.35rem 0;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.profile-mini-card .card-footer {
    margin-top: auto;
    padding-top: 1rem;
}

/* ===== UTILITIES (Refactored from Inline-Styles) ===== */

.section-title--blue {
    color: var(--profile-blue);
    margin-top: 3rem;
}

.profile-type-badge--blue {
    background-color: var(--profile-blue);
    color: var(--text-light);
}

.icon-blue {
    color: var(--profile-blue);
}

.link-reset,
.link-reset:hover,
.link-reset:focus,
.link-reset:active {
    text-decoration: none;
    color: inherit;
}

.btn-delete-confirm {
    background: var(--btn-danger-bg);
    color: var(--text-light);
}

.btn-delete-confirm:hover {
    background: var(--btn-danger-hover);
    color: var(--text-light);
}

/* ===== TYPE/CATEGORY BADGE IN CARDS ===== */

.profile-type-badge {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: var(--brutal-radius);
    background: var(--bg-muted);
    color: var(--text-muted-strong);
}



.profile-type-badge--pink {
    background: var(--profile-pink-bg);
    color: var(--profile-pink-text);
}

.profile-type-badge--red {
    background: var(--brutal-coral);
    color: var(--text-light);
}

/* ===== LIKE/HEART BUTTON ===== */

.profile-like-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-size: 1.25rem;
    color: var(--brutal-coral);
}

/* ===== NACHRICHTEN ===== */

/* ===== NACHRICHTEN (REWRITE) ===== */

.profile-message-list {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.profile-message-card {
    background: var(--brutal-card-bg);
    border: var(--brutal-border);
    border-radius: var(--brutal-radius);
    overflow: hidden;
    box-shadow: var(--brutal-shadow);
    transition: all 0.2s ease;
}

.profile-message-card.unread {
    /* Unread Status: Distinctive Border, Black in Dark Mode */
    border-left: 8px solid var(--brutal-coral);
    background: var(--bg-card);
    /* Light mode default */
}

/* Grid-Layout für Header: Icon/Status | Content | Meta/Arrow */
.profile-message-header {
    display: grid;
    grid-template-columns: 1fr auto;
    /* Content | Date/Arrow */
    gap: 1.25rem;
    padding: 1.25rem;
    cursor: pointer;
    align-items: center;
    background: transparent;
    max-width: 100%;
    /* Safety */
}

.profile-message-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    /* Enables flex child truncation */
    align-items: flex-start;
    overflow: hidden;
    /* Stops content from pushing out */
    word-break: break-word;
}

/* Ensure ALL text children truncate if too long */
.profile-message-info strong,
.profile-message-sender,
.profile-message-subject {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
    /* Ensure they behave like blocks for max-width */
}

/* NEU/An/SYSTEM-Badge: kompakt, einheitlich, kein großer Button */
.profile-message-card .profile-type-badge {
    display: inline-block;
    width: fit-content;
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    line-height: 1.2;
}

.profile-message-subject {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--brutal-ink);
}

.profile-message-sender {
    font-size: 0.85rem;
    color: var(--brutal-text-muted);
    font-weight: 600;
}

.profile-message-meta {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.profile-message-date {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--brutal-text-muted);
    white-space: nowrap;
    /* Prevent date wrapping */
}

.profile-message-chevron {
    transition: transform 0.2s ease;
    font-size: 1.2rem;
    color: var(--brutal-ink);
}

.profile-message-card.open .profile-message-chevron {
    transform: rotate(180deg);
}

.profile-message-body {
    padding: 1.5rem;
    border-top: 2px dashed var(--overlay-10);
    background: var(--brutal-bg);
    /* Slight offset */
    display: none;
}

.profile-message-body.open {
    display: block;
}

.profile-message-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px dashed var(--overlay-10);
}



/* ===== AVATAR ===== */

.profile-avatar-container,
.public-profile-avatar {
    width: 150px;
    height: 150px;
    border: var(--brutal-border);
    border-radius: 50%;
    background: var(--brutal-blue);
    overflow: hidden;
    margin: 0 auto 2rem auto;
    box-shadow: var(--brutal-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.profile-avatar-container img,
.public-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-icon-placeholder {
    font-size: 4.5rem;
    color: var(--color-ink);
}

.profile-avatar-change-overlay {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: var(--brutal-ink);
    color: var(--text-light);
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: bold;
    padding: 6px 0;
    text-align: center;
    opacity: 1;
    transition: opacity 0.2s;
    cursor: pointer;
}

.profile-avatar-container:hover .profile-avatar-change-overlay {
    opacity: 1;
}





/* ===== PROFILE NAME ===== */

.profile-name {
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.05em;
    color: var(--brutal-ink);
    margin-bottom: 0.75rem;
    font-size: 2rem;
}

/* ===== SECTION TITLES ===== */

.section-title {
    font-weight: 800;
    text-transform: uppercase;
    border-bottom: 4px solid var(--brutal-ink);
    display: inline-block;
    padding-bottom: 0.4rem;
    margin-bottom: 1.5rem;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
}

.section-title--pink {
    color: var(--brutal-coral);
}

/* ===== BADGES ===== */

.badge-admin,
.badge-user,
.profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    border: var(--brutal-border);
    border-radius: var(--brutal-radius);
    box-shadow: 2px 2px 0 0 var(--brutal-shadow);
}

.badge-admin {
    background-color: var(--brutal-yellow);
    color: var(--text-on-bright);
}

.badge-user {
    background-color: var(--brutal-card-bg);
    color: var(--brutal-ink);
}

.badge-white {
    background: var(--bg-card);
    color: var(--color-ink);
    padding: 0.2rem 0.5rem;
    border-radius: var(--brutal-radius);
    font-size: 0.75rem;
    font-weight: 700;
}

/* ===== FORMS ===== */

.form-control {
    border: var(--brutal-border);
    border-radius: 8px;
    padding: 1rem;
    font-weight: 600;
    box-shadow: 3px 3px 0 0 var(--overlay-10);
    transition: all 0.2s;
    width: 100%;
    font-size: 1rem;
    background-color: var(--brutal-card-bg);
}

.form-control:focus {
    outline: none;
    box-shadow: 4px 4px 0 0 var(--brutal-shadow);
    transform: translate(-1px, -1px);
    background-color: var(--brutal-card-bg);
}

.form-label {
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.85rem;
    margin-bottom: 0.6rem;
    display: block;
    letter-spacing: 0.05em;
}

.profile-form-group {
    margin-bottom: 1.25rem;
}

.profile-form-group--large {
    margin-bottom: 2rem;
}

/* Passwort-Toggle: auth.css wird nur auf Login-Seiten geladen,
   daher brauchen wir die Styles auch hier für die Profil-Bearbeitung */
.profile-edit-section .auth-input-wrapper {
    position: relative;
}

.profile-edit-section .auth-password-toggle {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.75rem;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    touch-action: manipulation;
}

.profile-edit-section .auth-password-toggle:hover {
    color: var(--brutal-ink);
}

.profile-edit-section .auth-input-password {
    padding-right: 2.5rem;
}

/* Profilbild-Vorschau im Edit-Modus */
.profile-image-edit-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: var(--brutal-border);
    overflow: hidden;
    margin-bottom: 0.75rem;
    box-shadow: 3px 3px 0 0 var(--overlay-15);
}

.profile-image-edit-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Buttons nebeneinander: "Bild ändern" + "Bild löschen" */
.profile-image-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}



/* PLZ-Eingabe (Berlin-Ausbau Phase 1) */
.profile-plz-card {
    background: var(--brutal-yellow);
    color: var(--text-on-bright);
    border: var(--brutal-border);
    border-radius: var(--brutal-radius);
    box-shadow: var(--brutal-shadow);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

/* Alle Kinder auf gelber Fläche: Immer Schwarz (auch im Dark Mode) */
.profile-plz-card h3,
.profile-plz-card h4,
.profile-plz-card p,
.profile-plz-card label,
.profile-plz-card .form-label,
.profile-plz-card .profile-edit-section-title {
    color: var(--text-on-bright);
}

.profile-plz-card h4 {
    font-size: 1.1rem;
    font-weight: 800;
    margin: 0 0 0.5rem 0;
}

.profile-plz-card p {
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0 0 1rem 0;
    opacity: 0.85;
}

.profile-plz-card .form-control {
    max-width: 200px;
    font-size: 1.1rem;
    letter-spacing: 0.15em;
    font-weight: 700;
    color: var(--text-on-bright);
    background: var(--surface-on-yellow);
    border-color: var(--text-on-bright);
}



/* PLZ-Anzeige in der kompakten Sidebar */
.profile-plz-display {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--brutal-text-muted);
    margin: 0.25rem 0 0.75rem 0;
    letter-spacing: 0.1em;
}

/* ===== EDIT PANEL (Content-Bereich) ===== */
.profile-edit-section {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: var(--brutal-radius);
}

.profile-edit-section.brutal-card {
    border: var(--brutal-border);
    box-shadow: var(--brutal-shadow);
    background: var(--brutal-card-bg);
}

.profile-edit-section-title {
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0 0 1.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* PLZ-Card als Edit-Section: Gelb mit Titel-Override */
.profile-edit-section.profile-plz-card h3 {
    color: var(--text-on-bright);
    margin: 0 0 1rem 0;
}

.profile-edit-section.profile-plz-card p {
    font-size: 0.9rem;
}

.profile-edit-section .btn {
    margin-top: 0.5rem;
}

/* Öffentliches Profil Checkbox */
.profile-public-toggle {
    padding: 1rem;
    border: var(--brutal-border);
    background: var(--brutal-yellow);
    color: var(--color-text-on-yellow);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}



.profile-public-toggle label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    margin: 0;
}

.profile-public-toggle input[type="checkbox"] {
    transform: scale(1.5);
}

/* ===== BUTTONS ===== */

.profile-dashboard-grid .btn,
.profile-public-container .btn {
    border: var(--brutal-border);
    font-weight: 800;
    text-transform: uppercase;
    padding: 0.9rem 1.8rem;
    border-radius: var(--brutal-radius);
    box-shadow: var(--brutal-shadow);
    transition: all 0.15s;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.profile-dashboard-grid .btn:hover,
.profile-public-container .btn:hover {
    box-shadow: var(--brutal-shadow-hover);
    transform: translate(2px, 2px);
    background-color: var(--color-yellow);
    color: var(--color-text-on-yellow);
    border-color: var(--color-text-on-yellow);
}

/* Aktiver Zustand: Gelb bleibt */
.profile-dashboard-grid .btn:active,
.profile-public-container .btn:active,
.profile-dashboard-grid .btn.active,
.profile-public-container .btn.active {
    background-color: var(--color-yellow);
    color: var(--color-text-on-yellow);
    border-color: var(--color-text-on-yellow);
}

.profile-dashboard-grid .btn-primary,
.profile-public-container .btn-primary {
    background-color: var(--brutal-coral);
    color: var(--color-text-on-yellow);
}

.profile-dashboard-grid .btn-outline,
.profile-public-container .btn-outline {
    background-color: var(--brutal-card-bg);
    color: var(--brutal-ink);
}

.profile-dashboard-grid .btn-secondary,
.profile-public-container .btn-secondary {
    background-color: var(--brutal-blue);
    color: var(--color-text-on-yellow);
}

.profile-dashboard-grid .btn-sm,
.profile-public-container .btn-sm {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
}

/* ===== SIDEBAR ===== */

.profile-sidebar .brutal-card {
    position: sticky;
    top: 2rem;
}

.profile-role-badge {
    margin-bottom: 1.5rem;
}

/* Steckbrief Separator */
.sidebar-steckbrief-title {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 2px dashed var(--overlay-10);
    text-align: center;
    margin-bottom: 1.5rem;
}

.sidebar-steckbrief-title h3 {
    font-size: 1.5rem;
    margin: 0;
    border: none;
}

/* Admin Badge Button */
.btn-brutal-admin {
    background: var(--btn-solid-bg);
    color: var(--btn-solid-text);
    border: 2px solid var(--border-color);
    border-color: var(--btn-solid-border);
    box-shadow: 3px 3px 0 var(--brutal-shadow);
    transition: all 0.1s ease;
}

.btn-brutal-admin:hover,
.btn-brutal-admin:focus-visible {
    background: var(--btn-solid-hover-bg);
    color: var(--btn-solid-hover-text);
    border-color: var(--btn-solid-hover-border);
}

.btn-brutal-admin:active {
    box-shadow: 0 0 0 var(--brutal-shadow);
    transform: translate(3px, 3px);
}

/* Logout Button */
.profile-logout-btn {
    margin-top: 2rem;
    padding: 0.5rem;
    width: 100%;
}



/* ===== SEPARATORS ===== */

hr.separator {
    border: 0;
    border-bottom: 2px dashed var(--border-color);
    margin: 2rem 0;
    opacity: 0.2;
}

/* ===== EMPTY STATE ===== */

.profile-empty-state {
    padding: 2rem;
    text-align: center;
    color: var(--brutal-text-muted);
}

/* ===== STICKY SIDEBAR ===== */

.icon-3xl {
    font-size: 3rem;
}

.sticky-sidebar {
    position: sticky;
    top: 2rem;
}

/* ===== FOOTER (Profile Page) ===== */

/* Footer-Styles entfernt -> siehe utilities.css */

/* ===== AKKORDEON (Mehr/Weniger anzeigen) ===== */

.profile-accordion-container[data-collapsed="true"] .profile-accordion-hidden {
    display: none;
}

.profile-accordion-toggle {
    display: block;
    width: 100%;
    margin-top: 2rem;
    clear: both;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 2px dashed var(--text-disabled);
    border-radius: var(--brutal-radius);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--brutal-ink);
    cursor: pointer;
    transition: all 0.15s ease;
}

.profile-accordion-toggle:hover {
    border-color: var(--color-text-on-yellow);
    color: var(--color-text-on-yellow);
    background: var(--color-yellow);
}



/* Standard: Zeige "Mehr", Verstecke "Weniger" */
.profile-accordion-more {
    display: inline;
}

.profile-accordion-less {
    display: none;
}

/* Wenn ausgeklappt (collapsed="false"): Zeige "Weniger", Verstecke "Mehr" */
.profile-accordion-container[data-collapsed="false"]+.profile-accordion-toggle .profile-accordion-more {
    display: none;
}

.profile-accordion-container[data-collapsed="false"]+.profile-accordion-toggle .profile-accordion-less {
    display: inline;
}

/* ===== HINWEIS-TEXTE ===== */

.profile-hint {
    font-size: 0.85rem;
    color: var(--brutal-text-muted);
    margin-bottom: 1.5rem;
    font-style: italic;
}

/* ===== ÖFFENTLICHES PROFIL - CONTAINER ===== */

.profile-public-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    background-color: var(--brutal-bg);
    min-height: 80vh;
}

/* Header-Card */
.profile-public-header {
    background: var(--brutal-card-bg);
    border: var(--brutal-border);
    box-shadow: var(--brutal-shadow);
    border-radius: var(--brutal-radius);
    padding: 2.5rem;
    text-align: center;
    margin-bottom: 2.5rem;
}

.profile-public-badges {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.profile-expertise-badges {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.profile-expertise-badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: var(--brutal-radius);
    background: var(--profile-blue-bg);
    color: var(--profile-blue-text);
}

.profile-public-actions {
    margin-top: 1.5rem;
}

/* Content Grid */
.profile-public-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2.5rem;
    align-items: start;
}

@media (max-width: 900px) {
    .profile-public-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Info Column */
.profile-public-info .brutal-card {
    padding: 1.75rem;
}

.profile-public-info .section-title {
    margin-bottom: 1.5rem;
}

.profile-info-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.profile-info-item {
    padding-bottom: 1rem;
    border-bottom: 1px dashed var(--overlay-10);
}

.profile-info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.profile-info-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-disabled);
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.profile-info-value {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--brutal-ink);
}

/* Posts Column */
.profile-public-posts {
    min-width: 0;
    overflow: hidden;
}

.profile-public-posts .profile-section {
    margin-bottom: 2.5rem;
}

.profile-public-posts .profile-subsection-title {
    margin-top: 0;
}

/* Empty State (groß) */
.profile-empty-state--large {
    padding: 3rem 2rem;
}

.profile-empty-state--large i {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.profile-empty-state--large h3 {
    margin-bottom: 0.5rem;
}

/* Privat-Hinweis */
.profile-private-notice {
    max-width: 500px;
    margin: 4rem auto;
    padding: 3rem 2rem;
    text-align: center;
}

.profile-private-notice i {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
    color: var(--text-disabled);
}

.profile-private-notice h2 {
    margin-bottom: 1rem;
}

.profile-private-notice p {
    margin-bottom: 1.5rem;
    color: var(--text-muted-strong);
}

/* ===== COLLAPSIBLE MAILBOX TABS ===== */

.profile-mailbox-tabs {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
    min-width: 0;
}

.profile-mailbox-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1 1 0;
    min-width: 0;
    max-width: 100%;
    padding: 0.85rem 1rem;
    background: var(--bg-card);
    border: var(--brutal-border);
    border-radius: var(--brutal-radius);
    box-shadow: var(--brutal-shadow);
    cursor: pointer;
    text-align: left;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.15s ease;
    overflow: hidden;
}

.profile-mailbox-tab:hover {
    transform: translate(2px, 2px);
    box-shadow: var(--brutal-shadow-hover);
}

.profile-mailbox-tab.active {
    background: var(--brutal-yellow);
    color: var(--color-text-on-yellow);
}

.profile-mailbox-tab.active i,
.profile-mailbox-tab.active .profile-mailbox-count {
    color: var(--color-text-on-yellow);
}

.profile-mailbox-tab.active .profile-mailbox-count strong {
    color: var(--color-text-on-yellow);
}

.profile-mailbox-tab.active .profile-mailbox-arrow {
    transform: rotate(180deg);
}

.profile-mailbox-tab i:first-child {
    font-size: 1.25rem;
}

.profile-mailbox-tab span:first-of-type {
    flex-shrink: 0;
    font-weight: 800;
    text-transform: uppercase;
}

.profile-mailbox-count {
    flex: 1;
    min-width: 0;
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-muted-strong);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-mailbox-count strong {
    color: var(--brutal-coral);
}

.profile-mailbox-arrow {
    display: none;
}

/* Auf kleinen Screens: Count und Pfeil ausblenden, damit Tabs sauber sitzen */
@media (max-width: 600px) {
    .profile-mailbox-tab {
        justify-content: center;
        padding: 0.75rem 0.5rem;
        gap: 0.4rem;
    }

    .profile-mailbox-count,
    .profile-mailbox-arrow {
        display: none;
    }

    .profile-mailbox-tab span:first-of-type {
        font-size: 0.8rem;
    }

    .profile-mailbox-tab i:first-child {
        font-size: 1.1rem;
    }
}

/* Schneller Tooltip (ca. 0,2 s Verzögerung statt Browser-Standard ~1 s) */
.profile-mailbox-tab[data-tooltip] {
    position: relative;
}

.profile-mailbox-tab[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 0.5rem);
    transform: translateX(-50%) translateY(2px);
    padding: 0.4rem 0.65rem;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--brutal-ink);
    background: var(--brutal-yellow);
    border: 2px solid var(--brutal-ink);
    border-radius: var(--brutal-radius);
    box-shadow: var(--brutal-shadow);
    max-width: 220px;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.12s ease, visibility 0s linear 0.25s, transform 0.12s ease;
    z-index: 20;
}

.profile-mailbox-tab[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    transition-delay: 0.2s, 0s, 0.2s;
}



/* Roter Text für neue Nachrichten */
.text-red {
    color: var(--brutal-coral);
}

/* Honeypot für Passwort-Manager (LastPass, 1Password etc.) */
.pw-manager-trap {
    opacity: 0;
    position: absolute;
    z-index: -1;
    pointer-events: none;
}
