table.dataTable {
    width: 100%;
}

td[colspan] {
    padding: 1em 0.8em !important;
    cursor: default;
    background-color: #d5e59e !important;
    font-weight: 600;
}

tr.group2>td[colspan] {
    padding: 0.7em 0.8em !important;
    background-color: #fff6cc !important;
}

@media (min-width: 1280px) {

    #content {
        font-size: 125%;
    }

    h2 {
        font-size: 27px;
    }

    #lkz th:nth-child(4),
    #lkz td:nth-child(4) {
        min-width: 175px;
        hyphens: auto;
    }
}

#ebooks b,
#ebooks p {
    padding: 0 !important;
    margin: 0;
    font-size: inherit;
}

#direction b,
#direction p {
    font-size: 110%;
    margin: 0;
    padding: 0rem 2rem 1rem 2rem;
    max-width: 1280px;
}

#direction .direction-lkz,
#direction .direction-order {
    font-weight: 600;
}

#direction p.direction-location {
    font-weight: 600;
    font-size: x-large;
}

#ebooks td {
    min-width: 28vw;
    vertical-align: top;
    padding: 0.15em 0em;
    hyphens: auto;
    font-size: inherit
}

#sa_keyTexts thead,
tfoot {
    display: none;
}

.logo {
    text-decoration: none;
}

#sa_keyTexts tr,
#sa_keyTextBooks tbody td:not(:nth-child(3)):not(:nth-child(4)) {
    cursor: pointer;
}


/* Container styles */
#select_options_sa {
    padding-top: 0.5rem;
}

/* Reset list styles */
#nav_select,
#back-button-container {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: inherit;
}

/* Button-like links */
#nav_select .tb,
#back-to-list {
    display: inline-block;
    padding: 0.6rem 1rem;
    background-color: #d5e59e;
    color: black;
    text-decoration: none;
    border: none;
    border-radius: 0.45rem;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.3s ease;
    min-width: 170px;
}

#get-medium {
    display: inline-block;
    background-color: #d5e59e;
    color: black;
    border-radius: 0.45rem;
    text-align: center;
    min-width: 170px;
    margin: 0rem 2rem 1.5rem 2rem;
    padding: 2rem 2.5rem
}

/* #get-medium p {
    padding: 0rem 0rem 1rem 0rem;
} */

/* Active state */
#nav_select .tb.active {
    background-color: #97bF0D;
    /* box-shadow: 0 0 5px rgba(0, 128, 255, 0.6); */
}

/* Active button hover effect */
#nav_select .tb.active:hover {
    background-color: #97bF0D;
}

@media (hover: hover) and (pointer: fine) {

    #nav_select .tb:hover,
    #back-to-list:hover {
        background-color: #c1d86e;
    }

    #nav_select .tb.active.hover-enabled:hover {
        background-color: #E6444F;
        text-decoration: line-through
    }
}


.text-label,
.text-label-ebooks {
    display: none;
}

@media (min-width: 400px) {
    .text-label {
        display: inline;
    }
}

@media (min-width: 515px) {
    .text-label-ebooks {
        display: inline;
    }

    #ebooks td {
        min-width: 12vw;
    }
}

@font-face {
    font-family: "Belugino";
    src: url(../font/belugino.ttf) format("truetype");
}

@media (max-width: 670px) {

    /* LKZ */
    #lkz th:nth-child(1),
    #lkz td:nth-child(1) {
        min-width: 15px;
        max-width: 27px;
        padding: 8px 4px;
    }

    /* Title */
    #lkz th:nth-child(2),
    #lkz td:nth-child(2) {
        min-width: 80px;
        hyphens: auto;
        padding: 8px 4px;
    }

    /* OPAC */
    #lkz th:nth-child(3),
    #lkz td:nth-child(3) {
        min-width: 35px;
        padding: 8px 3px;
    }

    /* Univis-URL */
    #lkz th:nth-child(4),
    #lkz td:nth-child(4) {
        min-width: 35px;
        padding: 8px 0px 8px 3px;
        hyphens: auto;
    }

    #direction b,
    #direction p {
        font-size: 100%;
        padding: 0rem 1rem 1rem 1rem;
        hyphens: auto;
    }

    #get-medium {
        display: inline-block;
        background-color: #d5e59e;
        color: black;
        border-radius: 0.45rem;
        text-align: inherit;
        min-width: 170px;
        margin: 0rem 0.5rem 1.5rem 0.5rem;
        padding: 1rem 0.5rem 0.5rem 0.5rem
    }
}


/* Hide ISBN column on smaller screens */
@media (max-width: 768px) {
    #nav_select li {
        min-width: 48%;
    }

    .sorting_1.sorting_2 {
        box-shadow: inset 0 0 0 9999px #f9f9f9 !important;
    }

    #sa_keyTextBooks td:not([colspan]) {
        box-shadow: inset 0 0 0 9999px #f9f9f9 !important;
    }


    /* Hide the ISBN header and all ISBN cells */
    #sa_keyTextBooks th:nth-child(3),
    #sa_keyTextBooks td:nth-child(3) {
        display: none;
    }

    /* Convert table to vertical layout */
    #sa_keyTextBooks,
    #sa_keyTextBooks thead,
    #sa_keyTextBooks tbody,
    #sa_keyTextBooks th,
    #sa_keyTextBooks td,
    #sa_keyTextBooks tr {
        display: block;
        max-width: 100%;
    }

    /* Hide table header */
    #sa_keyTextBooks thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    /* Style each row as a card */
    #sa_keyTextBooks tr {
        border: 1px solid #ccc;
        margin-bottom: 0.7rem;
        padding: 0.5rem;
        border-radius: 0.45rem;
        background: #f9f9f9 !important;
    }

    /* Style each cell with labels */
    #sa_keyTextBooks td {
        border: none !important;
        position: relative;
        padding-left: 28% !important;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }

    /* Hide empty Hinweis cells */
    #sa_keyTextBooks td:nth-child(4):empty {
        display: none;
    }

    /* Add labels before each cell */
    #sa_keyTextBooks td:nth-child(1):before {
        content: "Verf.: ";
        position: absolute;
        left: 6px;
        width: 20%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: bold;
    }

    #sa_keyTextBooks td:nth-child(2):before {
        content: "Titel: ";
        position: absolute;
        left: 6px;
        width: 20%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: bold;
    }

    #sa_keyTextBooks td:nth-child(4):before {
        content: "Hinweis: ";
        position: absolute;
        left: 6px;
        width: 20%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: bold;
    }

    /* Remove alternating row colors since we're using cards */
    #sa_keyTextBooks tr.odd,
    #sa_keyTextBooks tr.even {
        background: #f9f9f9 !important;
    }
}

/* Optional: Adjust breakpoint for tablets */
@media (max-width: 992px) and (min-width: 769px) {

    #sa_keyTextBooks th:nth-child(3),
    #sa_keyTextBooks td:nth-child(3) {
        display: none;
    }
}