/* Responsive Design for Mobile & Desktop */

/* Sidebar-Button-Größen in mobilen Breakpoints sind in win95-theme.css (#sidebar .sidebar-btn) */

/* Mobile Error & Loading Styles */
@media (max-width: 768px) {
    #errorMessage {
        top: 80px;
        left: 10px;
        right: 10px;
        max-width: none;
        font-size: 14px;
    }

    #loadingIndicator {
        font-size: 14px;
        width: 90vw;
        max-width: 280px;
    }
}

@media (max-width: 480px) {
    #errorMessage {
        top: 90px;
        left: 5px;
        right: 5px;
        font-size: 16px;
    }

    #loadingIndicator {
        font-size: 16px;
        width: 95vw;
        max-width: 320px;
    }
}

/* Tablet Styles (1024px and down) */
@media (max-width: 1024px) {
    #tooltip {
        width: 85vw !important;
        height: auto !important;
        max-height: 85vh !important;
        min-width: unset !important;
        max-width: none !important;
        min-height: unset !important;
        font-size: 26px;
    }

        #tooltip .tooltip-header {
            height: 36px;
            padding: 8px 16px;
            font-size: 18px;
        }

        #tooltip .tooltip-content {
            padding: 24px;
            font-size: 26px;
            line-height: 1.6;
            height: auto;
            max-height: calc(85vh - 46px);
        }
}

/* Mobile Styles (768px and down) */
@media (max-width: 768px) {
    #tooltip {
        width: 95vw !important;
        height: auto !important;
        max-height: 85vh !important;
        font-size: 28px;
    }

        #tooltip .tooltip-header {
            height: 44px;
            padding: 10px 20px;
            font-size: 20px;
        }
}

/* Small Mobile (480px and down) */
@media (max-width: 480px) {
    #tooltip {
        width: 98vw !important;
        height: auto !important;
        max-height: 90vh !important;
        font-size: 30px;
    }

        #tooltip .tooltip-header {
            height: 48px;
            padding: 12px 24px;
            font-size: 22px;
        }
}

/* Mobile Close Button Sizes */
@media (max-width: 1024px) {
    #tooltip .close {
        width: 32px;
        height: 28px;
        font-size: 16px;
        margin-left: 16px;
    }
}

@media (max-width: 768px) {
    #tooltip .close {
        width: 40px;
        height: 36px;
        font-size: 20px;
        margin-left: 20px;
    }
}

@media (max-width: 480px) {
    #tooltip .close {
        width: 44px;
        height: 40px;
        font-size: 22px;
        margin-left: 24px;
    }
}

/* Content scaling for different screen sizes */
@media (max-width: 1024px) {
    #tooltip h1, #tooltip h2, #tooltip h3, #tooltip h4 {
        font-size: 30px;
        margin-top: 18px;
        margin-bottom: 14px;
    }

    #tooltip th, #tooltip td {
        padding: 14px 18px;
        font-size: 24px;
    }

    #tooltip a {
        font-size: 26px;
        padding: 4px 0;
        display: inline-block;
    }

    #tooltip p, #tooltip em, #tooltip strong {
        font-size: 26px;
    }
}

@media (max-width: 768px) {
    #tooltip h1, #tooltip h2, #tooltip h3, #tooltip h4 {
        font-size: 32px;
        margin-top: 20px;
        margin-bottom: 16px;
    }

    #tooltip th, #tooltip td {
        padding: 16px 20px;
        font-size: 26px;
    }

    #tooltip a {
        font-size: 28px;
        padding: 6px 0;
    }

    #tooltip p, #tooltip em, #tooltip strong {
        font-size: 28px;
    }

    #tooltip .tooltip-content {
        padding: 28px;
        font-size: 28px;
        line-height: 1.7;
        height: calc(100% - 54px);
    }
}

@media (max-width: 480px) {
    #tooltip h1, #tooltip h2, #tooltip h3, #tooltip h4 {
        font-size: 34px;
        margin-top: 22px;
        margin-bottom: 18px;
    }

    #tooltip th, #tooltip td {
        padding: 18px 22px;
        font-size: 28px;
    }

    #tooltip a {
        font-size: 30px;
        padding: 8px 0;
    }

    #tooltip p, #tooltip em, #tooltip strong {
        font-size: 30px;
    }

    #tooltip .tooltip-content {
        padding: 32px;
        font-size: 30px;
        line-height: 1.8;
        height: calc(100% - 58px);
    }
}

/* ----------- MEDIA TOOLTIP: Video füllt das ganze Fenster ----------- */
@media (max-width: 1024px) {
    #tooltip.transparent-bg {
        width: 90vw !important;
        height: 70vh !important;
        max-height: 70vh !important;
        min-height: unset !important;
    }

        #tooltip.transparent-bg .tooltip-content {
            height: 100% !important;
            min-height: 0 !important;
            max-height: 100% !important;
        }
}

@media (max-width: 768px) {
    #tooltip.transparent-bg {
        width: 95vw !important;
        height: 60vh !important;
        max-height: 60vh !important;
        min-height: unset !important;
    }

        #tooltip.transparent-bg .tooltip-content {
            height: 100% !important;
            min-height: 0 !important;
            max-height: 100% !important;
        }
}

@media (max-width: 480px) {
    #tooltip.transparent-bg {
        width: 98vw !important;
        height: 55vh !important;
        max-height: 55vh !important;
        min-height: unset !important;
    }

        #tooltip.transparent-bg .tooltip-content {
            height: 100% !important;
            min-height: 0 !important;
            max-height: 100% !important;
        }
}

@media (max-width: 700px) {
    #connected-nodes-bar {
        padding: 3px 2vw !important;
        gap: 4px !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        align-items: center !important;
        min-height: unset !important;
        height: auto !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        background: transparent !important;
    }

        #connected-nodes-bar button {
            font-size: 13px !important;
            padding: 4px 12px !important;
            margin: 0 2px !important;
            min-width: 0 !important;
            max-width: none !important;
            white-space: nowrap !important;
            overflow: visible !important;
            text-overflow: clip !important;
            box-sizing: border-box !important;
            text-align: center !important;
            line-height: 1.2 !important;
            flex: 0 0 auto !important;
        }
}

@media (max-width: 430px) {
    #connected-nodes-bar button {
        font-size: 12px !important;
        padding: 4px 10px !important;
    }
}

#connected-nodes-bar {
    justify-content: center !important;
}