/**
 * PF_topnav.css – Top-Navigation für PFWS 1.4.1.2
 * Pfad: css/PF_topnav.css
 * Autor: Franz
 * Beschreibung: Styling für die obere Navigationsleiste mit Benutzer-Menü
 * Erstellungsdatum: 15.09.2025 - 23:55 Uhr
 * Letzte Änderung: 15.09.2025 - 23:55 Uhr
 */

/* 🔝 Fixierter Topnav */
.pf-topnav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #1c1c1c;
    color: #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    z-index: 1100; /* Über Overlay-Systemen */
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* 🍔 Burger Menu für Left-Navigation Toggle */
.pf-burger-menu {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    margin-right: 15px;
    border-radius: 6px;
    transition: all 0.3s ease;
    padding: 8px;
}

.pf-burger-menu:hover {
    background: rgba(255, 255, 255, 0.1);
}

.pf-burger-line {
    width: 22px;
    height: 2px;
    background: var(--pf-topnav-text);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Burger Animation - Aktiver Zustand */
.pf-burger-menu.active .pf-burger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.pf-burger-menu.active .pf-burger-line:nth-child(2) {
    opacity: 0;
}

.pf-burger-menu.active .pf-burger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* 🔖 Seitentitel links */
.pf-brand {
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 0.5px;
    color: #e0e0e0;
    flex-grow: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pf-brand a {
    color: var(--pf-topnav-text);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 4px;
    position: relative;
}

.pf-brand a:hover {
    color: var(--pf-accent);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

/* Suchfeld entfernt – Styles bereinigt */

/* Such-Dropdown entfernt – Styles bereinigt */

/* Brand positioning for search */
.pf-brand {
    position: relative;
}

#pf-save-title-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#pf-save-title-btn:hover {
    background: rgba(255,255,255,0.2);
}

/* ⚙️ Benutzer-Menü rechts */
.pf-user-menu {
    position: relative;
    margin-left: auto;
}

.pf-user-button {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #f0f0f0;
    cursor: pointer;
    padding: 2px;
    margin-left: 10px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    overflow: hidden;
}

.pf-user-button:hover {
    background: rgba(255,255,255,0.1);
    transform: scale(1.05);
}

.pf-dots {
    font-size: 2rem;
    line-height: 1;
}

/* 📋 Dropdown-Menü */
.pf-dropdown {
    display: none;
    position: fixed;
    top: 60px;
    right: 20px;
    background: #232323;
    color: #f0f0f0;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    padding: 20px;
    width: 320px;
    z-index: 1200; /* Über Topnav (1100) */
    font-family: "Segoe UI", sans-serif;
    backdrop-filter: blur(6px);
    border: 1px solid #2e2e2e;
}

.pf-dropdown.show {
    display: block !important;
}

/* 👤 User-Box oben im Menü */
.pf-user-box {
    background: #3a3a3a;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: #e0e0e0;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: inset 0 0 4px rgba(0,0,0,0.2);
}

.pf-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #444;
}

/* 🖼️ Avatar Button in Topnav */
.pf-user-avatar-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #666;
    transition: border-color 0.2s, transform 0.2s;
    cursor: pointer;
}

.pf-user-button:hover .pf-user-avatar-btn {
    border-color: #3498db;
    transform: scale(1.05);
}

.pf-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pf-user-info strong {
    font-size: 1rem;
    color: #fff;
}

.pf-user-info span {
    font-size: 0.8rem;
    color: #aaa;
}

/* 🔗 Menü-Links */
.pf-menu-links a {
    display: block;
    padding: 8px 0;
    color: #e0e0e0;
    text-decoration: none;
    transition: color 0.2s;
}

.pf-menu-links a:hover {
    color: #3498db;
}

/* 🧩 Checkbox-Einstellungen */
.pf-menu-settings {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pf-menu-settings label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    color: #e0e0e0;
}

.pf-menu-settings input[type="checkbox"] {
    accent-color: #3498db;
    width: 18px;
    height: 18px;
}

/* 🧱 Trennlinie */
.pf-divider {
    border-top: 1px solid #555;
    margin: 12px 0;
}

/* 🔄 Benutzereinstellungen zurücksetzen */
.pf-menu-reset {
    padding: 8px 16px;
}

.pf-menu-reset label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    color: #e74c3c;
}

.pf-menu-reset label:hover {
    background: rgba(231, 76, 60, 0.1);
}

/* 🎨 Theme-Switcher */
.pf-theme-switcher {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}

.pf-theme-switcher label {
    font-size: 0.9rem;
    color: #ccc;
}

.pf-theme-switcher select {
    background: #444;
    color: #fff;
    border: 1px solid #666;
    padding: 6px 10px;
    border-radius: 6px;
}

/* ▼ Subnav unmittelbar unter Topnav */
.pf-subnav {
    position: fixed;
    top: 60px; /* direkt unter .pf-topnav (60px) */
    left: 0;
    right: 0;
    height: 40px;
    background: #243447; /* neue Farbe – harmoniert mit Menü */
    color: #f0f6fc;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 1rem;
    z-index: 999; /* unter Topnav (1000), über Inhalt */
    border-bottom: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.pf-subnav-left,
.pf-subnav-right { display: flex; align-items: center; gap: 10px; font-size: 0.95rem; }
.pf-subnav-center { text-align: center; font-weight: 500; color: #c9d1d9; }

/* Make right section align to the far right */
.pf-subnav-right { justify-self: end; }

.pf-subnav .pf-subnav-link {
    color: #f0f6fc;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}
.pf-subnav .pf-subnav-link:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}

/* Avatar in Subnav */
.pf-subnav-avatar-link { display: inline-flex; align-items: center; }
.pf-subnav-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.25);
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

/* Responsive: Stapeln auf schmalen Viewports */
@media (max-width: 720px) {
  .pf-subnav {
      height: auto;
      padding: 6px 10px;
            grid-template-columns: 1fr 1fr;
            row-gap: 6px;
  }
    .pf-subnav-left { order: 1; }
    .pf-subnav-right { order: 2; justify-self: end; }
    .pf-subnav-center { order: 3; grid-column: 1 / -1; text-align: left; padding-top: 4px; }
}