/* 
🧠 PFWS Footer-Stil – Version 1.4.1.3.13  css/PF_footer.css
Erstellt: 11.09.2025 – 22:13 Uhr (CEST)
Autor: Franz PFuisi
Geändert: 19.09.2025 – 11:30 Uhr – Mobile Layout-Optimierung für einzeilige Darstellung
*/

/* 🔲 Grundlayout des Footers */
#pf-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    background-size: 400% 400%;
    color: #fff;
    text-align: left;
    padding: 0px 15px;
    font-size: 0.9em;
    z-index: 100; /* UNTER Overlay (1000) - Module im Overlay verdecken Footer */
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.4);
    min-height: 40px;
    overflow: hidden;
}

/* Wave Animation - Dunkler Gradient bewegt sich */
#pf-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 20%, #0f3460 40%, #16213e 60%, #1a1a2e 80%, #0f3460 100%);
    background-size: 400% 400%;
    animation: pf-footer-gradient-wave 15s ease infinite;
    z-index: -1;
}

/* Shimmer Overlay - Subtiler Glaseffekt */
#pf-footer::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at 70% 50%,
        rgba(255, 255, 255, 0.06) 0%,
        transparent 50%
    );
    animation: pf-footer-shimmer 10s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes pf-footer-gradient-wave {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes pf-footer-shimmer {
    0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.4; }
    50% { transform: translate(-15px, -15px) rotate(180deg); opacity: 0.8; }
}

/* 📦 Inhalt zentriert und flexibel */
.pf-footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    max-width: 2000px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* 🔗 Footer-Links */
.pf-footer-links {
    display: flex;
    gap: 15px;
    position: relative;
    z-index: 1;
}

.pf-footer-link {
    display: flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 5px 10px;
    border-radius: 4px;
    gap: 5px;
}

.pf-footer-link:hover {
    color: #fff;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
}

.pf-footer-link-icon {
    font-size: 1.2em;
}

.pf-footer-link-text {
    font-size: 0.9em;
}

/* 📝 Versionstooltip Wrapper */
.pf-footer-tooltip-wrapper {
    position: relative;
    display: inline-block;
    cursor: pointer;
    font-weight: 500;
    color: #f0f0f0;
    font-size: 1.3em;
    padding: 5px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.pf-footer-tooltip-wrapper:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* 📝 Versionstoolip Box - Position korrigiert */
.pf-footer-tooltip {
    position: absolute;
    bottom: 100%;
    left: 100%;
    margin-left: 10px;
    background: radial-gradient(circle at top right, #2a2a2a, #1c1c1c);
    color: #eee;
    padding: 18px 22px;
    border-radius: 12px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
    font-size: 0.9em;
    line-height: 1.6;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
    z-index: 999;
    min-width: 340px;
    max-width: 520px;
    text-align: left;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 152, 0, 0.3);
}

/* 📝 Erweiterte Infobox (beim Klick) */
.pf-footer-infobox {
    position: fixed;
    bottom: -40px; /* Über dem Footer, aber Footer bleibt sichtbar */
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, #1a1a1a, #0d0d0d);
    color: #fff;
    padding: 20px;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.4);
    z-index: 110; /* Über Footer (100), UNTER Overlay (1000) */
    transform: translateY(100%);
    transition: transform 0.5s ease;
    border-top: 3px solid #ff9800;
    max-height: calc(100vh + 40px);
    overflow-y: auto;
}

.pf-footer-infobox.show {
    transform: translateY(0);
}

/* 📊 Tooltip Grid Layout */
.pf-footer-tooltip-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 10px;
}

.pf-footer-tooltip-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pf-footer-tooltip-row {
    display: flex;
    justify-content: space-between;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pf-footer-tooltip-footer {
    display: flex;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 152, 0, 0.3);
    font-size: 0.8em;
    color: #bbb;
}

/* 📊 Systemübersicht im Tooltip */
.pf-footer-tooltip-stats {
    margin-top: 14px;
    font-size: 0.9em;
}

.stats-title {
    font-weight: 500;
    color: #ff9800;
    margin-bottom: 6px;
}

.stats-row {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
    font-weight: 400;
}

.stats-row span {
    color: #fff;
    font-weight: 400;
}

/* 🎨 Erweiterte Infobox */
.pf-footer-version-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.pf-footer-version-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    border-left: 3px solid #ff9800;
}

.pf-footer-version-section h3 {
    margin-top: 0;
    color: #ff9800;
    font-size: 1.1em;
    border-bottom: 1px solid rgba(255, 152, 0, 0.3);
    padding-bottom: 8px;
}

.pf-footer-version-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.pf-footer-version-main {
    font-size: 1.5em;
    font-weight: bold;
    color: #ff9800;
    text-shadow: 0 0 10px rgba(255, 152, 0, 0.3);
}

.pf-footer-version-sub {
    font-size: 0.9em;
    color: #ccc;
    display: flex;
    gap: 15px;
}

.pf-footer-version-detail {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pf-footer-version-detail span {
    background: rgba(255, 152, 0, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
}

/* 📊 Systemübersicht Box */
.pf-footer-system-overview {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

.pf-footer-system-overview h3 {
    color: #ff9800;
    margin-top: 0;
    border-bottom: 1px solid rgba(255, 152, 0, 0.3);
    padding-bottom: 8px;
}

.pf-footer-system-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.pf-footer-system-item {
    display: flex;
    justify-content: space-between;
    padding: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

.pf-footer-system-item .label {
    color: #aaa;
}

.pf-footer-system-item .value {
    font-weight: bold;
    color: #fff;
}

/* 👤 Benutzerinfo Box */
.pf-footer-user-info {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

.pf-footer-user-info h3 {
    color: #ff9800;
    margin-top: 0;
    border-bottom: 1px solid rgba(255, 152, 0, 0.3);
    padding-bottom: 8px;
}

.pf-footer-user-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.pf-footer-user-item {
    display: flex;
    justify-content: space-between;
    padding: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

.pf-footer-user-item .label {
    color: #aaa;
}

.pf-footer-user-item .value {
    font-weight: bold;
    color: #fff;
}

/* 🔧 Module Box - Angepasst für nebeneinander */
.pf-footer-modules-info {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

.pf-footer-modules-info h3 {
    color: #ff9800;
    margin-top: 0;
    border-bottom: 1px solid rgba(255, 152, 0, 0.3);
    padding-bottom: 8px;
}

.pf-footer-modules-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: space-around;
}

.pf-footer-module-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    text-align: center;
    min-width: 100px;
    flex: 1;
    max-width: 150px;
}

.pf-footer-module-item .count {
    font-size: 1.8em;
    font-weight: bold;
    color: #ff9800;
    margin-bottom: 5px;
}

.pf-footer-module-item .label {
    color: #aaa;
    font-size: 0.9em;
}

/* 📜 PFWS Geschichte Box */
.pf-footer-history-info {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

.pf-footer-history-info h3 {
    color: #ff9800;
    margin-top: 0;
    border-bottom: 1px solid rgba(255, 152, 0, 0.3);
    padding-bottom: 8px;
}

.pf-footer-history-info p {
    color: #ccc;
    line-height: 1.6;
    margin: 0;
}

/* ⚠️ Session-Warnung */
.pf-footer-session-warning {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: linear-gradient(135deg, #2a2a2a, #1c1c1c);
    border: 1px solid rgba(255, 152, 0, 0.5);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    max-width: 350px;
    backdrop-filter: blur(10px);
}

.pf-footer-session-warning-content h3 {
    margin-top: 0;
    color: #ff9800;
    font-size: 1.1em;
}

.pf-footer-session-warning-content p {
    margin: 10px 0;
}

.pf-footer-session-warning-content progress {
    width: 100%;
    height: 8px;
    margin: 15px 0;
    border-radius: 4px;
}

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

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

.pf-footer-button {
    background: linear-gradient(135deg, #ff9800, #e65100);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    width: 100%;
}

.pf-footer-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* 🔔 Benachrichtigungen */
.pf-footer-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    max-width: 350px;
}

.pf-footer-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.pf-footer-notification-success {
    background: linear-gradient(135deg, #4caf50, #2e7d32);
    border-left: 4px solid #81c784;
}

.pf-footer-notification-error {
    background: linear-gradient(135deg, #f44336, #c62828);
    border-left: 4px solid #e57373;
}

.pf-footer-notification-info {
    background: linear-gradient(135deg, #2196f3, #1565c0);
    border-left: 4px solid #64b5f6;
}

/* Status-Indikatoren */
.pf-footer-status-ok {
    color: #4caf50;
    font-weight: bold;
}

/* 📱 Verhalten bei kleinen Bildschirmhöhen */
@media screen and (max-height: 500px) {
    #pf-footer {
        position: static;
    }
    
    .pf-footer-tooltip {
        bottom: 100%;
    }
}

/* Schließen-Button für die erweiterte Ansicht */
.pf-footer-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 152, 0, 0.2);
    border: none;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    transition: all 0.3s ease;
}

.pf-footer-close-btn:hover {
    background: rgba(255, 152, 0, 0.4);
    transform: rotate(90deg);
}

/* 📱 Responsive Anpassungen für mobile Ansichten */
@media screen and (max-width: 768px) {
    /* Footer-Inhalt in einer Zeile halten */
    .pf-footer-content {
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: center;
        padding: 5px 0;
    }
    
    /* Tiger-Icon verkleinern */
    .pf-footer-tooltip-wrapper {
        font-size: 1.1em;
        padding: 3px;
    }
    
    /* Links nur als Icons anzeigen */
    .pf-footer-link {
        padding: 3px 6px;
        gap: 3px;
    }
    
    .pf-footer-link-icon {
        font-size: 1.1em;
    }
    
    .pf-footer-link-text {
        display: none;
    }
    
    /* Tooltip-Optimierungen für mobile */
    .pf-footer-tooltip {
        font-size: 0.75em;
        padding: 10px 12px;
        min-width: 250px;
        max-width: 280px;
        margin-left: 5px;
    }
    
    .pf-footer-tooltip-grid {
        gap: 6px;
    }
    
    .pf-footer-tooltip-column {
        gap: 4px;
    }
    
    .pf-footer-tooltip-row {
        padding-bottom: 2px;
        font-size: 0.85em;
    }
    
    .pf-footer-tooltip-footer {
        font-size: 0.7em;
        padding-top: 4px;
    }
    
    .pf-footer-tooltip-stats {
        margin-top: 8px;
        font-size: 0.75em;
    }
    
    .stats-title {
        margin-bottom: 3px;
        font-size: 0.85em;
    }
    
    .stats-row {
        padding: 1px 0;
        font-size: 0.8em;
    }
    
    /* Infobox-Optimierungen für mobile */
    .pf-footer-infobox {
        padding: 15px;
        font-size: 0.85em;
    }
    
    .pf-footer-version-display {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .pf-footer-version-section,
    .pf-footer-system-overview,
    .pf-footer-user-info,
    .pf-footer-modules-info,
    .pf-footer-history-info {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .pf-footer-version-main {
        font-size: 1.3em;
    }
    
    .pf-footer-system-grid,
    .pf-footer-user-details {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .pf-footer-modules-grid {
        gap: 10px;
    }
    
    .pf-footer-module-item {
        padding: 10px;
        min-width: 80px;
    }
    
    .pf-footer-module-item .count {
        font-size: 1.5em;
    }
}