/*
Theme Name: MeiitZ Live
Theme URI: https://meiitz.online
Author: Miche (MeiitZ)
Author URI: https://meiitz.online
Description: Schlankes Theme für MeiitZ Live - Truck Livestream mit Verkehrsinfo
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: meiitz-theme
*/

/* ============================================
   RESET & BASIS
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overscroll-behavior: none;
}

body {
    font-family: "Saira", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #0b1015;
    color: #fff;
    min-height: 100vh;
    min-height: 100dvh;
    overscroll-behavior-y: contain;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
    background: linear-gradient(180deg, rgba(11,16,21,0.95) 0%, rgba(11,16,21,0.8) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 12px 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: #00e5ff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-logo:hover {
    color: #4df0ff;
}

.logo-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 6px;
    border-radius: 4px;
}

.site-nav {
    display: flex;
    gap: 10px;
}

.site-nav a {
    color: #fff;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.site-nav a:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
}

.site-nav a.highlight {
    background: linear-gradient(135deg, #00e5ff, #00b4d8);
    color: #0b1015;
    border: none;
}

.site-nav a.highlight:hover {
    background: linear-gradient(135deg, #4df0ff, #00c8e0);
    transform: translateY(-1px);
}

.nav-icon {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    margin-right: 2px;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.site-main {
    padding-top: 60px;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* ============================================
   LIVE CONTAINER (Startseite)
   ============================================ */
.live-container {
    --sidebar-width: 380px;
    --footer-height: 44px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.live-wrapper {
    flex: 1;
    display: flex;
    min-height: 0;
}

.live-stream {
    flex: 1;
    position: relative;
    background: #000;
    min-width: 0;
}

.live-stream iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.live-sidebar {
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    background: #0d131a;
    border-left: 1px solid rgba(255,255,255,0.1);
}

.sidebar-tabs {
    display: flex;
    background: rgba(0,0,0,0.4);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: relative;
}

.sidebar-tab {
    flex: 1;
    padding: 14px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #888;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

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

.sidebar-tab.active {
    color: #00e5ff;
    border-bottom-color: #00e5ff;
}

/* Sidebar Fullscreen Button */
.sidebar-fullscreen-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    background: rgba(0, 229, 255, 0.15);
    border: none;
    border-left: 1px solid rgba(255,255,255,0.1);
    border-bottom: 2px solid #00e5ff;
    color: #00e5ff;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.sidebar-fullscreen-btn:hover {
    background: rgba(0, 229, 255, 0.25);
}

.sidebar-fullscreen-btn svg {
    width: 20px;
    height: 20px;
}

/* Sidebar Fullscreen Mode */
.live-sidebar.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    min-height: 100vh;
    min-height: 100dvh;
    border: none;
    border-radius: 0;
}

.live-sidebar.fullscreen .sidebar-tabs {
    padding-top: env(safe-area-inset-top, 0px);
}

.live-sidebar.fullscreen .sidebar-fullscreen-btn {
    background: rgba(255, 82, 82, 0.3);
    border-bottom-color: #ff5252;
    color: #ff5252;
}

.live-sidebar.fullscreen .sidebar-fullscreen-btn:hover {
    background: rgba(255, 82, 82, 0.5);
}

.sidebar-content {
    flex: 1;
    position: relative;
    background: #18181b;
    min-height: 0;
}

.sidebar-pane {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
}

.sidebar-pane.active {
    display: block;
}

.sidebar-pane iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ============================================
   FOOTER
   ============================================ */
.live-footer {
    height: var(--footer-height);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: rgba(0,0,0,0.6);
    border-top: 1px solid rgba(255,255,255,0.1);
    flex-wrap: wrap;
    padding: 8px 15px;
}

.live-footer a {
    color: #00e5ff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    opacity: 0.9;
    transition: all 0.2s;
}

.live-footer a:hover {
    opacity: 1;
}

.footer-divider {
    color: rgba(255,255,255,0.3);
    font-size: 13px;
}

/* ============================================
   SEITEN (Impressum, Datenschutz)
   ============================================ */
.page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.page-content h1 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: #00e5ff;
}

.page-content h2 {
    font-size: 1.4rem;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #fff;
}

.page-content h3 {
    font-size: 1.1rem;
    margin-top: 20px;
    margin-bottom: 10px;
    color: #ccc;
}

.page-content p {
    line-height: 1.7;
    margin-bottom: 15px;
    color: #bbb;
}

.page-content ul, .page-content ol {
    margin-left: 25px;
    margin-bottom: 15px;
    color: #bbb;
}

.page-content li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.page-content a {
    color: #00e5ff;
}

.page-content a:hover {
    text-decoration: underline;
}

.page-footer-links {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.page-footer-links a {
    color: #00e5ff;
}

.page-footer-links .footer-divider {
    color: rgba(255,255,255,0.3);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .live-container {
        --sidebar-width: 320px;
    }
}

@media (max-width: 900px) {
    .site-header {
        padding: 10px 15px;
    }
    
    .site-logo {
        font-size: 1.2rem;
    }
    
    .logo-icon {
        width: 30px;
        height: 30px;
    }
    
    .site-nav a {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .live-container {
        --sidebar-width: 100%;
    }
    
    .live-wrapper {
        flex-direction: column;
    }
    
    .live-stream {
        flex: none;
        height: 0;
        padding-bottom: 56.25%;
    }
    
    .live-sidebar {
        width: 100%;
        flex: 1;
        min-height: 450px;
        border-left: none;
        border-top: 1px solid rgba(255,255,255,0.1);
    }
    
    /* Vollbild Button für Mobile anzeigen */
    .sidebar-fullscreen-btn {
        display: flex;
    }
}

@media (max-width: 500px) {
    .site-nav {
        gap: 5px;
    }
    
    .site-nav a {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .site-nav a .nav-text {
        display: none;
    }
    
    .logo-icon {
        width: 26px;
        height: 26px;
        margin-right: 4px;
    }
    
    .nav-icon {
        width: 16px;
        height: 16px;
        margin-right: 0;
    }
    
    .live-footer {
        gap: 10px;
    }
    
    .live-footer a {
        font-size: 11px;
    }
    
    .page-content {
        padding: 30px 15px;
    }
    
    .page-content h1 {
        font-size: 1.6rem;
    }
}

/* ============================================
   VERKEHR PAGE (für Plugin)
   ============================================ */
.verkehr-page .site-main {
    padding-top: 0;
}

.verkehr-page .site-header {
    display: none;
}

/* WordPress Admin Bar Fix */
body.admin-bar .site-header {
    top: 32px;
}

body.admin-bar .site-main {
    padding-top: 92px;
}

@media (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
    
    body.admin-bar .site-main {
        padding-top: 106px;
    }
}
