/**
 * PF_core.css – Basis-Layout & Komponenten     css/PF_core.css
 * PFWS 1.4.1 – Franz Edition
 * Enthält globale Farbdefinitionen, Layout, Header, Footer & Menüverhalten
 */
/* 🎨 Farbpalette & Variablen */
:root {
    --pf-bg: #f5f7fa;
    --pf-text: #2c3e50;
    --pf-accent: #7db6c7;
    --pf-success: #2ecc71;
    --pf-error: #e74c3c;
    --pf-muted: #7f8c8d;
    --pf-topnav-bg: #333;
    --pf-topnav-text: #f0f0f0;
    --pf-radius: 8px;
    --pf-shadow: 0 2px 6px rgba(0,0,0,0.1);
    --pf-font: 'Segoe UI', sans-serif;
}

/* 🔄 Reset & Grundlayout */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: var(--pf-font);
    background: var(--pf-bg);
    color: var(--pf-text);
    font-size: 16px;
    line-height: 1.5;
    /* Platz für fixierte Topbars: Topnav (60px) + Subnav (40px)     padding-top: 100px;*/

    overflow-x: hidden;
    /* 🎯 Globales Smooth-Scrolling für alle Anchors */
    scroll-behavior: smooth;
}
a {
    color: var(--pf-accent);
    text-decoration: none;
}
button {
    font-family: inherit;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 1em;
    color: white;
}
button:hover {
    color: #ccc;
}

/* Inputs */
input, select, textarea {
    background: #ebe6e6;
    color: var(--pf-text);
    border: 1px solid #444;
}

/* 🎨 Theme-Switcher */
.pf-theme-switcher select {
    background-color: #f3efef;
    color: rgb(20, 20, 20);
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    width: 100%;
}

/* ⚙️ Schalter */
.switch {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0;
}
.switch input[type="checkbox"] {
    width: 20px;
    height: 20px;
}
.slider {
    display: inline-block;
    width: auto;
    color: #aaa;
}

/* 🔔 Alertbox */
.pfws-alert {
    display: none;
    background: #f39c12;
    color: white;
    padding: 10px;
    text-align: center;
}
.pfws-alert.visible {
    display: block;
}

/* 🎯 Smooth-Scroll-Ziel-Element - wird mittig zentriert */
.pf-smooth-center-target {
    scroll-margin-top: calc(50vh - 100px);
    animation: pf-target-focus 1.5s ease-out;
}

@keyframes pf-target-focus {
    0% { 
        outline: 0px solid transparent;
        transform: scale(1);
    }
    30% { 
        outline: 3px solid var(--pf-accent);
        transform: scale(1.02);
    }
    100% { 
        outline: 0px solid transparent;
        transform: scale(1);
    }
}

/* ═══════════════════════════════════════════════════════════════
   🕒 Session-Management Styles (PF_auth.js)
   ═══════════════════════════════════════════════════════════════ */

/* Session-Warnung Dialog */
.pf-auth-session-warning {
    position: fixed;
    bottom: 100px;
    right: 20px;
    background: linear-gradient(135deg, #2a2a2a, #1c1c1c);
    border: 2px solid rgba(255, 152, 0, 0.6);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    max-width: 380px;
    min-width: 320px;
    backdrop-filter: blur(15px);
    animation: pf-session-slide-in 0.4s ease-out;
    color: white;
}

.pf-auth-session-warning-content h3 {
    margin: 0 0 12px 0;
    color: #ff9800;
    font-size: 1.2em;
    font-weight: 600;
}

.pf-auth-session-warning-content p {
    margin: 12px 0;
    font-size: 1em;
    color: #e0e0e0;
}

.pf-auth-session-warning-content progress {
    width: 100%;
    height: 10px;
    margin: 16px 0;
    border-radius: 5px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
}

.pf-auth-session-warning-content progress::-webkit-progress-bar {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

.pf-auth-session-warning-content progress::-webkit-progress-value {
    background: linear-gradient(90deg, #ff9800, #e65100);
    border-radius: 5px;
}

.pf-auth-session-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.pf-auth-session-button {
    flex: 1;
    background: linear-gradient(135deg, #ff9800, #e65100);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.pf-auth-session-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 152, 0, 0.4);
}

.pf-auth-session-button.pf-auth-secondary {
    background: linear-gradient(135deg, #666, #444);
}

.pf-auth-session-button.pf-auth-secondary:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.pf-auth-session-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Session-Benachrichtigungen */
.pf-auth-session-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    font-size: 0.95em;
    z-index: 10001;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-width: 350px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.pf-auth-session-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.pf-auth-session-notification-success {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    border-left: 4px solid #1e8449;
}

.pf-auth-session-notification-error {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-left: 4px solid #a93226;
}

.pf-auth-session-notification-info {
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-left: 4px solid #1f618d;
}

/* Animationen */
@keyframes pf-session-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mobile Anpassungen */
@media (max-width: 768px) {
    .pf-auth-session-warning {
        bottom: 20px;
        right: 10px;
        left: 10px;
        max-width: none;
        min-width: none;
    }
    
    .pf-auth-session-actions {
        flex-direction: column;
    }
    
    .pf-auth-session-notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* ═══════════════════════════════════════════════════════════════
   🎯 DRAG HANDLE - Im DOM für JavaScript, aber visuell versteckt
   ═══════════════════════════════════════════════════════════════ */

/* Standardmäßig visuell versteckt (aber im DOM für querySelector) */
.pf-drag-handle {
    position: absolute !important;
    left: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    overflow: hidden !important;
}

/* Nur im Dashboard-Kontext sichtbar und positioniert */
.pfuisi_boxes .pf-drag-handle,
.pf-box-header .pf-drag-handle {
    position: static !important;
    left: auto !important;
    width: 32px !important;
    height: 32px !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    overflow: visible !important;
    display: flex !important;
}
