/* ==========================================================================
   WIE.MAI.KAI PWA MASTER STYLESHEET
   Enthält alle App-spezifischen Anpassungen und Pop-up Designs
   ========================================================================== */
   
   
/* Globale Browser-Einstellungen */
:root {
    color-scheme: light; /* Signalisiert dem Browser: Nur Light-Mode unterstützt */
}

/* ========================================== */
/* 1. APP-ONLY OVERRIDES (BeTheme Anpassungen)*/
/* Nur aktiv, wenn als PWA installiert        */
/* ========================================== */

/* Befindet sich in Theme Options - Custom CSS & JS */


/* Elemente im App-Modus (PWA) komplett verstecken */
/* Bei Bebuilder in "Extra Class" einfach hide-in-app eintragen */
html.pwa-active .hide-in-app {
    display: none !important;
}

/* ========================================== */
/* 2. LOKALES TICKET-WALLET WIDGET            */
/* ========================================== */
#wmk-ticket-app-container { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
}

/* Den Abstand direkt den Elementen geben (die nur existieren, wenn die App aktiv ist) */
.wmk-ticket-empty-state,
.wmk-ticket-button {
    margin-top: 20px;
    margin-bottom: 20px;
}

.wmk-ticket-empty-state {
    position: relative; display: flex; align-items: center; justify-content: space-between;
    border: 2px dashed #f76b15; border-radius: 12px; padding: 24px 25px; cursor: pointer;
    transition: box-shadow 0.3s ease, border-color 0.3s ease; z-index: 1;
}
.wmk-ticket-empty-state::before {
    content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; right: 4px;
    background-color: #C1DDF8; border-radius: 8px; z-index: -1;
}
.wmk-ticket-empty-state:hover { box-shadow: 0 4px 15px rgba(247, 107, 21, 0.3); border-color: #03235a; }
.wmk-ticket-empty-state-left { display: flex; align-items: center; gap: 15px; color: #333; }
.wmk-ticket-empty-state-left svg { color: #f76b15; }
.wmk-ticket-empty-state-left span { font-size: 16px; color: #03235a; font-weight: 500; }

.wmk-ticket-import-btn {
    background-color: #f76b15; color: #fff; border: none; padding: 14px 18px;
    border-radius: 8px; font-size: 14px; cursor: pointer; transition: background-color 0.3s ease;
}
.wmk-ticket-import-btn:hover { background-color: #03235a; color: #fff !important; text-decoration: none !important;}

/* ========================================== */
/* FINALER WIDGET-LOOK: TICKET-BUTTON         */
/* ========================================== */

/* Passt den Ticket-Button an das Widget-Design an */
.wmk-ticket-button {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    background-color: #03235a !important;
    color: #fff !important;
    padding: 16px 20px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15) !important;
    border: none !important;
    width: 100%;
    box-sizing: border-box !important;
}

/* Sorgt dafür, dass Icon und Text links stehen */
.wmk-ticket-button .wmk-fav-widget-left {
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: none; /* Klick geht durch auf den Haupt-Button */
}

/* Das orangefarbene "Anzeigen" Label rechts */
.wmk-ticket-button .wmk-fav-widget-btn {
    pointer-events: none; /* Klick geht durch auf den Haupt-Button */
}

/* Icon-Farbe im Ticket-Widget auf Orange korrigieren */
.wmk-ticket-button svg {
    color: #f76b15 !important;
}

/* ========================================== */
/* 3. TICKET-WALLET OVERLAY (Vollbild)        */
/* ========================================== */
.wmk-ticket-overlay { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: #000; z-index: 9999999; display: flex; flex-direction: column; 
}
.wmk-ticket-overlay-header { 
    padding: 15px; background: #03235a; display: flex; 
    justify-content: space-between; align-items: center; 
}
.wmk-ticket-overlay-close { 
    background: #f76b15; color: #fff; border: none; padding: 10px 15px; 
    border-radius: 5px; cursor: pointer; font-weight: bold; font-size: 14px; 
}
.wmk-ticket-overlay-delete { 
    background: #d32f2f; color: #fff; border: none; padding: 10px 15px; 
    border-radius: 5px; cursor: pointer; font-weight: bold; font-size: 14px; 
}

/* Zoom-Logik für das Bild */
.wmk-ticket-overlay-img { 
    display: inline-block; /* Geändert von block, damit Zentrierung greift */
    vertical-align: middle;
    max-width: 100%; 
    max-height: 100%; 
    transition: transform 0.3s ease-in-out; 
    cursor: zoom-in;
}
/* Zustand: Vergrößert */
.wmk-ticket-overlay-img.is-zoomed { 
    max-width: none !important; 
    max-height: none !important; 
    width: 250% !important; /* Physische Vergrößerung für Panning */
    transform: none !important; 
    cursor: zoom-out;
}

/* Container für das Panning (Wischen) */
.wmk-ticket-overlay-content { 
    flex: 1; 
    overflow: auto !important; 
    display: block !important; 
    background: #fff; 
    position: relative;
    -webkit-overflow-scrolling: touch; 
    touch-action: manipulation; 
    /* NEU: Erlaubt Zentrierung von inline-block Bildern */
    text-align: center; 
    padding: 20px; 
}

/* PDF Styling - Wiederherstellung mit korrekten Abständen */
.wmk-ticket-pdf-wrapper { 
    text-align: center; 
    color: #333; 
    padding: 20px; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 400px; /* Erhöht für bessere vertikale Verteilung */
}

.wmk-ticket-pdf-icon { 
    font-size: 80px; 
    margin-bottom: 30px; /* Erhöhter Abstand zum Titel, um Überlappung zu vermeiden */
    display: block;
    line-height: 1; /* Verhindert Zeilenhöhen-Konflikte */
}

.wmk-ticket-pdf-text { 
    font-weight: bold; 
    margin-bottom: 15px; 
    font-family: sans-serif;
    font-size: 18px;
    line-height: 1.4; /* Sorgt für sauberen Abstand zwischen den Zeilen */
}

.wmk-ticket-pdf-hint { 
    margin-bottom: 30px; 
    font-size: 14px; 
    color: #666; 
    line-height: 1.6;
    max-width: 280px;
}

.wmk-ticket-pdf-link { 
    display: inline-block; 
    background: #03235a; 
    color: #fff !important; 
    padding: 16px 32px; 
    border-radius: 5px; 
    text-decoration: none !important; /* Entfernt Unterstreichung standardmäßig */
    font-weight: bold; 
    font-family: sans-serif;
    font-size: 16px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
}

/* Hover-Effekt ohne Unterstreichung */
.wmk-ticket-pdf-link:hover {
    background: #f76b15; /* Wechselt auf Orange beim Hover */
    text-decoration: none !important; /* Garantiert: KEINE UNTERSTREICHUNG beim Hover */
    transform: translateY(-2px); /* Kleiner visueller Effekt beim Drüberfahren */
}

/* Ladeanzeige unter dem PDF-Button */
.wmk-pdf-loader-text {
    margin-top: 20px;
    font-size: 13px;
    color: #f76b15; /* Dein Orange für Aufmerksamkeit */
    font-weight: bold;
    font-family: sans-serif;
    transition: opacity 0.3s ease;
}

.wmk-pdf-dot-animation::after {
    content: '...';
    display: inline-block;
    width: 15px;
    text-align: left;
    animation: wmkDots 1.5s steps(4, end) infinite;
}

@keyframes wmkDots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* BeTheme Layout-Schutz: Verhindert das Verschwinden des Containers */
#wmk-ticket-app-container { 
    min-height: 1px; 
    display: block !important; 
    clear: both; 
}

/* ==========================================================================
   4. PWA Ticket Wallet: PDF Canvas Rendering
   ========================================================================== */

.wmk-ticket-pdf-render-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 10px;
    width: 100%;
    height: 100%;
}

.wmk-ticket-pdf-canvas {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.wmk-ticket-pdf-fallback {
    display: none; /* Wird bei Fehler via JS auf block gesetzt */
    text-align: center;
    margin-top: 15px;
}

.wmk-ticket-pdf-fallback-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 20px;
    background: #f76b15;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
}

.wmk-ticket-pdf-fallback-btn:hover {
    background: #e55a00;
}

/* ========================================== */
/* 5. MEIN PROGRAMM WIDGET (Favoriten)        */
/* ========================================== */
#wmk-favoriten-counter { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
}
/* Den Abstand der blauen Box direkt geben */
.wmk-fav-widget { 
    margin-top: 10px; 
    margin-bottom: 10px; 
    display: flex; justify-content: space-between; align-items: center; background-color: #03235a; color: #fff; padding: 16px 20px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.15); 
}
.wmk-fav-widget { display: flex; justify-content: space-between; align-items: center; background-color: #03235a; color: #fff; padding: 16px 20px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.15); }
.wmk-fav-widget-left { font-size: 16px; display: flex; align-items: center; gap: 10px; }
.wmk-fav-widget-left svg { color: #f76b15; }
.wmk-fav-highlight { color: #f76b15; }
.wmk-fav-widget-btn { background-color: #f76b15; color: #fff; padding: 10px 18px; border-radius: 5px; text-decoration: none; font-size: 14px; box-shadow: 0 2px 5px rgba(0,0,0,0.2); transition: background-color 0.3s ease; }
.wmk-fav-widget-btn:hover { background-color: #d85a0f; color: #fff !important; text-decoration: none !important; }


/* ========================================== */
/* 6. APP INSTALLATIONS-BUTTON (Injected)     */
/* ========================================== */

/* Sicherheitshalber: Dem leeren BeBuilder-Container alle Abstände nehmen */
#wmk-install-app-container {
    margin: 0 !important;
    padding: 0 !important;
}

/* Die Abstände nur dem Button selbst geben */
.wmk-auto-install-btn { 
    margin-top: 10px; 
    margin-bottom: 10px; 
    width: 100%; 
    background: #f76b15; 
    color: #fff; 
    padding: 16px 20px; 
    border: none; 
    border-radius: 5px; 
    font-weight: normal; 
    cursor: pointer; 
    font-size: 18px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.2); 
    transition: transform 0.2s, background-color 0.3s; 
}

.wmk-auto-install-btn:hover { 
    background: #d85a0f; 
    color: #fff !important; 
}


/* ========================================== */
/* 7. APP INSTALLATIONS-BANNER (Unten)        */
/* ========================================== */
.wmk-install-banner { position: fixed; bottom: 85px; left: 50%; transform: translateX(-50%); width: 95%; max-width: 400px; background: rgba(30,30,30,0.98); backdrop-filter: blur(10px); color: #fff !important; padding: 30px 20px 20px 20px; text-align: center; z-index: 9999999; border-radius: 15px; font-family: sans-serif; box-sizing: border-box; box-shadow: 0 10px 40px rgba(0,0,0,0.8); border: 1px solid rgba(255,255,255,0.1); }
.wmk-install-banner-close { position: absolute; top: 8px; right: 12px; color: #fff; font-size: 32px; cursor: pointer; line-height: 1; opacity: 0.6; padding: 5px; }
.wmk-install-banner-title { margin: 0 0 10px 0; font-size: 22px; color: #ff9900 !important; font-weight: bold; display: block; line-height: 1.2; }
.wmk-install-banner-text { margin: 0 0 18px 0; font-size: 14px; opacity: 0.9; color: #fff !important; }
.wmk-install-banner-btn { background: #ff9900; color: #fff !important; border: none; padding: 15px 20px; font-size: 16px; font-weight: bold; border-radius: 10px; width: 100%; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.3); }


/* ========================================== */
/* 8. PDF OFFLINE SPEICHERN POPUP             */
/* ========================================== */
.wmk-pdf-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 999998; backdrop-filter: blur(3px); }
.wmk-pdf-dialog { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: #ffffff; padding: 25px; border-radius: 12px; width: 85%; max-width: 340px; z-index: 999999; box-shadow: 0 10px 30px rgba(0,0,0,0.5); text-align: center; font-family: sans-serif; }
.wmk-pdf-title { margin: 0 0 15px 0; color: #03235a; font-size: 18px; }
.wmk-pdf-text { font-size: 14px; color: #444; line-height: 1.5; margin-bottom: 25px; }
.wmk-pdf-btn-group { display: flex; gap: 10px; justify-content: center; }
.wmk-pdf-btn-nein { flex: 1; padding: 12px; border: none; border-radius: 6px; background: #e0e0e0; color: #333; font-weight: bold; cursor: pointer; }
.wmk-pdf-btn-ja { flex: 1; padding: 12px; border: none; border-radius: 6px; background: #f76b15; color: #fff; font-weight: bold; cursor: pointer; }
.wmk-pdf-success { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #4caf50; color: white; padding: 12px 24px; border-radius: 25px; z-index: 999999; box-shadow: 0 4px 15px rgba(0,0,0,0.3); font-weight: bold; font-family: sans-serif; transition: opacity 0.4s; }


/* ========================================== */
/* 9. OFFLINE / ONLINE BANNER (Bounce)        */
/* ========================================== */
.wmk-connection-banner { position: fixed; top: -100px; left: 0; width: 100%; color: #fff; padding: 15px 20px; box-sizing: border-box; z-index: 9999999; display: flex; align-items: center; gap: 15px; font-family: sans-serif; font-weight: bold; font-size: 16px; box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.wmk-connection-banner.offline { background-color: #962317; }
.wmk-connection-banner.online { background-color: #4caf50; }
.wmk-connection-banner.show { animation: slideDownBounce 0.6s cubic-bezier(0.25, 1, 0.5, 1.2) forwards; }
.wmk-connection-banner.hide { animation: slideUpFade 0.5s ease forwards; }

@keyframes slideDownBounce { 0% { top: -100px; } 70% { top: 10px; } 100% { top: 0px; } }
@keyframes slideUpFade { 0% { top: 0px; opacity: 1; } 100% { top: -100px; opacity: 0; } }


/* ========================================== */
/* 10. FAVORITEN ERINNERUNGS-WECKER           */
/* ========================================== */
.wmk-reminder-popup { 
    position: fixed; top: -120px; left: 5%; width: 90%; 
    background: #03235a; color: #ffffff; padding: 18px 15px; 
    border-radius: 15px; 
    border-left: 6px solid #ff8800; /* Neues, reineres Orange */
    z-index: 1000000; 
    /* NEU: Der intensive 3-Schichten Neon-Glow für das Orange */
    box-shadow: 0 10px 25px rgba(0,0,0,0.6), 0 0 12px 2px rgba(255, 136, 0, 0.9), 0 0 35px 8px rgba(255, 136, 0, 0.4); 
    font-family: sans-serif; box-sizing: border-box; 
    transition: top 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}
.wmk-reminder-popup.show { top: 20px !important; }
.wmk-reminder-inner { position: relative; padding-right: 25px; }
.wmk-reminder-close { position: absolute; top: -8px; right: -5px; font-size: 28px; cursor: pointer; opacity: 0.6; line-height: 1; }

/* Textfarben ebenfalls auf das leuchtende Orange (#ff8800) angepasst */
.wmk-reminder-title { color: #ff8800; font-weight: bold; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.wmk-reminder-event { font-size: 16px; font-weight: bold; line-height: 1.3; }
.wmk-reminder-time { font-size: 14px; margin-top: 6px; }
.wmk-reminder-time span { color: #ff8800; font-weight: bold; }
.wmk-reminder-venue { font-size: 13px; opacity: 0.8; margin-top: 4px; }


/* ========================================== */
/* 11. SYSTEM STATUS POPUPS (Info & Sync)     */
/* ========================================== */
.wmk-info-popup { position: fixed; top: 20px; left: 5%; width: 90%; background: #03235a; color: #fff; padding: 15px; border-radius: 12px; z-index: 100000; text-align: center; box-shadow: 0 5px 20px rgba(0,0,0,0.5); font-family: sans-serif; box-sizing: border-box; }
.wmk-info-popup-title { display: block; margin-bottom: 5px; font-size: 16px; }
.wmk-info-popup-text { font-size: 14px; opacity: 0.9; }

.wmk-sync-status { position: fixed; top: 0; left: 0; width: 100%; background: #ff9900; color: #fff; text-align: center; padding: 10px; font-size: 14px; z-index: 999999; font-weight: bold; transition: background 0.3s; }
.wmk-sync-status-ready { background: #4caf50 !important; }

/* ========================================== */
/* 12. WIDGETS, PDF-GALERIE & POP-UPS         */
/* ========================================== */

/* Modul 18: Push-Benachrichtigungs-Widget */
.wmk-push-box { display: flex; justify-content: space-between; align-items: center; background: #f3f6f9; border: 1px solid #e2e8f0; border-radius: 8px; padding: 16px 20px; margin: 20px 0; }
.wmk-push-left { flex: 1; padding-right: 20px; }
.wmk-push-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; color: #1e293b; margin-bottom: 4px; }
.wmk-push-desc { font-size: 15px; color: #64748b; line-height: 1.4; }
.wmk-push-right { flex-shrink: 0; }
.wmk-push-switch { position: relative; display: inline-block; width: 48px; height: 26px; margin: 0; }
.wmk-push-switch input { opacity: 0; width: 0; height: 0; }
.wmk-push-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #cbd5e1; transition: .4s; border-radius: 26px; }
.wmk-push-slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; box-shadow: 0 1px 2px rgba(0,0,0,0.2); }
.wmk-push-switch input:checked + .wmk-push-slider { background-color: #f76b15; } /* Im Wie.MAI.KAI Orange */
.wmk-push-switch input:checked + .wmk-push-slider:before { transform: translateX(22px); }
.wmk-push-help-text { color: #ff3333; font-size: 12px; margin-top: 10px; font-weight: bold; }

@media (max-width: 480px) { 
    .wmk-push-box { flex-direction: column; align-items: flex-start; gap: 15px; } 
    .wmk-push-right { align-self: flex-end; } 
}

/* Modul 11: PDF-Bilder-Galerie Rendering */
.wmk-pdf-main-wrapper { text-align: center; padding-top: 60px; padding-bottom: 50px; background: #ffffff; min-height: 100vh; }
.wmk-pdf-pre-loader { color: #333333; padding: 20px; font-weight: bold; }
.wmk-pdf-page-container { margin-bottom: 40px; }
.wmk-pdf-page-image { display: block; margin: 0 auto; max-width: 100%; height: auto; transition: transform 0.3s ease; }
.wmk-pdf-page-divider { border: none; border-bottom: 1px solid #f0f0f0; margin: 40px auto; width: 60%; }

/* Module 9, 10, 19: Pop-up Helfer-Klassen */
.wmk-push-pop-loader { color: #f76b15; font-weight: bold; margin: 15px 0; }
.wmk-reminder-link { text-decoration: none !important; color: inherit !important; display: block; -webkit-tap-highlight-color: transparent; outline: none; cursor: pointer; }
.wmk-announcement-msg { margin-top: 8px; font-weight: normal; font-size: 14px; line-height: 1.4; }