*
{
    margin: 0;
    padding: 0;
    outline: none !important;
    box-sizing: border-box;
    -ms-overflow-style: none;  /* Internet Explorer 10+ */
    scrollbar-width: none;  /* Firefox */
}

*::-webkit-scrollbar {
    display: none;  /* Safari and Chrome */
}

body
{

}

#btnBack, #btnHome
{
    height: 100%;
    margin-right: 0.375rem;
}

.btn {
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-disabled {
    background-color: aliceblue;
    color: gray;
    border-color: gray;
    cursor: not-allowed !important;
}

#navbar
{
    height: 3rem;
    width: 100%;
    position: fixed;
    padding: 0.5rem 1rem;
    display: inline-flex;
    background-color: white;
    z-index: 9999;
}

#navbar form
{
    display: flex;
    flex-direction: row;
}

#navbar input[name="search"]
{
    border: 1px solid cornflowerblue;
    border-radius: 0.25rem;
    padding-left: 0.25rem;
    min-width: 30rem;
    margin-right: 0.5rem;
}

#navbar input[data-name="search"]
{
    border: 1px solid cornflowerblue;;
    border-radius: 0.25rem;
    background-color: #70a6fd;
    color: white;
    width: 2rem;
    padding: 0;
}

#btnUser, #btnLogin
{
    margin: 0;
    padding: 0 0.5rem;
    height: 100%;
    min-width: 5rem;
}


#content
{
    padding-top: 3rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

#modelList
{
    margin: 0 auto;
}

.model-preview
{
    width: 11rem;
    height: 14rem;
    text-decoration: none;
    margin: 0.375rem;
    cursor: pointer !important;
}

.model-preview * {
    cursor: pointer !important;
    color: cornflowerblue;
}

.model-preview:hover .noimage
{
    text-decoration: none !important;
}

.model-preview img {

    width: 10rem;
    height: 10rem;
    object-fit: contain; /* ? key: keeps aspect ratio */
    background-color: #f8f9fa; /* optional: gives a subtle background */
    border-radius: 0.375rem;
    display: block;
    margin: 0.375rem auto;
}

.card-body
{
    display: flex;
    flex-direction: column;
}

.card-title {
    flex: 1;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    text-align: center;
    justify-content: center;
    margin: 0 1.25rem;
}

#modelInfo p
{
    margin: 0;
    display: flex;
}

#modelInfo p > .modelinfoname
{
    font-weight: bold;
    width: 7.5rem;
    min-width: 7.5rem;
    display: inline-block;
}

#modelInfo p > .modelinfovalue
 {
     display: inline-block;
 }

#modal-main-image
{
    width: auto;
    height: 100%;
}

#modelactions {
    display: flex;
    column-gap: 0.5rem;
}

.img-thumbnail
{
    cursor: pointer;
}

/* Grund-Container */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    margin-bottom: 0;
}

/* Versteckt das eigentliche Checkbox-Element */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* Der sichtbare Schieberegler */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 28px;
}

/* Der runde Knopf */
.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

/* Wenn aktiviert */
.switch input:checked + .slider {
    background-color: #4CAF50;
}

.switch input:checked + .slider:before {
    transform: translateX(22px);
}


#nsfw-overlay button
{
    width: 100px;
}

#nsfw-overlay button.btn-danger
{
    float: left;
}

#nsfw-overlay button.btn-success
{
    float: right;
}

.onlyMobile
{
    display: none !important;
}

.tag
{
    background-color: #ff9d9d;
    color: white;
    border-radius: 5px;
    padding: 5px;
    cursor: pointer;
}

/* Standard (unchecked) */
.model_tag::after {
    content: ", ";  /* roter Kreis mit Strich */
    margin-right: 3px;
}

.model_tag:last-child::after {
    content: "";  /* Kein Komma nach dem letzten Tag */
}


/* Standard (unchecked) */
.tag::before {
    content: "\1F6AB"; /* 🚫 */
    margin-right: 6px;
}

.tag input[type="checkbox"] {
    position:       absolute;
    opacity:        0; /* Unsichtbar */
    pointer-events: none; /* Nimmt keinen Platz ein */
}

.tag:has(input[type="checkbox"]:checked)::before {
    content: "\2705";  /* ✅ */
}

.tag:has(input[type="checkbox"]:checked) {
    background-color: #d1e7dd;
    color: #0f5132;
}


/* Container/Dropdown */
.tagSearch {
    display: inline-block;
    position: relative;
    width: 100px;
    margin-right: 0.5rem;
}

.tagSearch[open] .tagSearch__button {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.tagSearch__button {
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    border: 1px solid cornflowerblue;
    line-height: 30px;
    cursor: pointer;
    user-select: none;
    list-style: none;
    padding: 0 .5rem;
    width: 100%;
    border-radius: 0.25rem;
}

.tagSearch__button span
{
    flex: 1; /* Nimmt den verf?gbaren Platz ein */
    text-align: center; /* Zentriert den Text */
    font-weight: bold;
    color: cornflowerblue;
}

.tagSearch__button::after
{
    content: "\25BC"; /* Pfeil nach unten */
    padding-left: .5rem;
    margin-left: .5rem;
    border-left: 1px solid #ccc;
    font-weight: bold;
    color: cornflowerblue;
}

.tagSearch[open] .tagSearch__button::after
{
    content: "\25B2"; /* Pfeil nach oben */
}

.tagSearch__button::-webkit-details-marker { display: none; }

.tagSearch__list {
    position: absolute;
    z-index: 10;
    min-width: 150px;
    width: fit-content;
    overflow: auto;
    background: #fff;
    border: 1px solid #ccc;
    border-top: none;
    border-bottom-left-radius: .5rem;
    border-bottom-right-radius: .5rem;
    padding: .5rem;
    box-shadow: 0 8px 24px rgba(0,0,0,.08);

    display: flex;
    flex-direction: column;
}

/* Checkbox-Eintr?ge */
.tagSearchEntry {
    display: flex;
    align-items: center;
    padding: .4rem .6rem;
    border-radius: .5rem;
    background-color: #ff9d9d;
    color: #fff;
    cursor: pointer;
    user-select: none;
    position: relative;
}

/* Checkbox unsichtbar */
.tagSearchEntry input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Icon vor Text (unchecked default) */
.tagSearchEntry::before {
    content: "\1F6AB"; /* 🚫 */
    margin-right: .25rem;
}

/* Aktiv-Styles via :has() */
.tagSearchEntry:has(input[type="checkbox"]:checked) {
    background-color: #d1e7dd;
    color: #0f5132;
}
.tagSearchEntry:has(input[type="checkbox"]:checked)::before {
    content: "\2705";  /* ✅ */
}


#imgContainer .img-fluid {
    max-width: 100%;
    height: auto;
    max-height: 500px;
    width: auto;
}


.noError {
    display: none;
}

@media only screen and (max-width: 600px) {

    #content
    {
        width: 100% !important;
    }

    #navbar, #navbar form
    {
        width: 100% !important;
    }
    .model-preview > div
    {
        margin-bottom: 2rem;
    }
    .model-preview img, .model-preview
    {
        width: 100%;
        height: auto;
    }

    #navbar input[name="search"] {
        width:     100%;
        min-width: auto;
    }

    .card-title
    {
        font-size: 1.25rem;
    }

    .mobileGone
    {
        display: none !important;
    }

    .onlyMobile
    {
        display: block !important;
    }

    #modelbox
    {
        flex-direction: column-reverse;
    }

    #modelInfo
    {
        width: 100%;
        margin-bottom: 1rem;
    }
    #modelInfo p
    {
        margin-top: 0.5rem !important;
    }

    #imagebox, #imagebox > div, #imagebox #main-image
    {
        height: auto !important;
    }

    #imagebox #main-image, #imagebox #main-image-wrapper , #imagebox
    {
        width: 100% !important;
    }

    #imagebox
    {
        flex-direction: column;
    }

    #imagebox > div:first-child
    {
        width: 100% !important;
        height: auto !important;
        margin: 0 auto !important;
    }

    #imagebox > div:first-child img
    {
        width: 60px !important;
        height: auto !important;
    }

    #modal-main-image
    {
        height: auto !important;
        width: 100% !important;
    }

}