html, body {
    height: 100%;
    overflow: hidden;
}

body {
    background-color: #edecec !important;
}

h4 {
    min-width: 250px;
    margin: 0px !important;
}

#userListLabel {
    color: white;
}

#userList {
    max-width: 100px;
}

.mobile-title {
    padding-left: 45px !important;
}

.settings-title { padding-left: 10px !important;}

.nav {
    padding-bottom: 0px !important;
    
}

.topbar {
    height: 8%;
}

#placeholder {
    display: hidden;
}

#preset-placeholder {
    justify-content: center;
    align-items: center;
    height: 100%;
}

.mobile-login {
    display: none;
}
  
.dropdown a:hover {background-color: #ddd;}

.show {display: block;}

.main-title, .login-col, .col-mobile-nav-toggler {
    height: 100%;
}

#offcanvasDarkNavbar {
    width: 60px !important;
    backdrop-filter: none;
}

#offcanvasDarkNavbarBody {
    padding: 2px;
    height: 95%;
}

.mobile-nav {
    padding-left: 3px !important;
    padding-right: 3px !important;
    padding-bottom: 10px !important;
    min-width: 118px !important;
}

.btn-nav {
    padding-left: 10px !important;
    padding-right: 0px !important;
    border-radius: 6px !important;
}


.btn-main {
    padding-top: 2px;
    padding-bottom: 3px;
}

.video-text {
    width: 150px;
    height: auto;
    padding: 2px;
    margin-bottom: 0;
    font-size: 0.8em;
    display: -webkit-box; /* WebKit-basierte Box */
    -webkit-box-orient: vertical; /* Textfluss vertikal */
    -webkit-line-clamp: 2; /* Begrenze auf 3 Zeilen */
    line-clamp: 2;
    margin: 0; /* Entferne Standard-Margen */
    font-size: 14px; /* Textgröße */
    line-height: 1.2; /* Zeilenhöhe */
    overflow: hidden; /* Überlauf verstecken */
    text-overflow: ellipsis; /* Ellipsen bei abgeschnittenem Text */
    word-break: normal;
    hyphens: auto;
}

.grid-video-text {
    font-size: 0.8em;
    display: -webkit-box; /* WebKit-basierte Box */
    -webkit-box-orient: vertical; /* Textfluss vertikal */
    -webkit-line-clamp: 3; /* Begrenze auf 3 Zeilen */
    line-clamp: 3;
    margin: 0; /* Entferne Standard-Margen */
    font-size: 14px; /* Textgröße */
    line-height: 1.2; /* Zeilenhöhe */
    overflow: hidden; /* Überlauf verstecken */
    text-overflow: ellipsis; /* Ellipsen bei abgeschnittenem Text */
    word-break: break-word;
    hyphens: auto;
}

.video-item{
    min-height: 35px;
}

#containerVideowallMain .video-item, #containerVideowallMyPreset .video-item {
    &.isZoomed {
        transform: scale(1.1);
        z-index: 2;
        border-width: 2px !important;
        border-color: #007bff !important;
    }
}

#containerVideowallMain button:hover, #containerVideowallMyPreset button:hover {
    background-color: rgb(80, 80, 80) !important;
}

.mobile-row-videowall {
    height: 25vh;
    
}

.mobile-row-presetlist {
    height: 35vh;
}

.mobile-col-presetlist {
    height: 100%;
    background-color: #7192c3;
}

.row-upload-btn {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.preset-settings-btn {
    height: 30px;
    width: 30px;
    border-radius: 30px;
}

.scrollable {
    height: 98%;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    border-style: solid;
    border-left-width: 0px;
    border-right-width: 0px;
    border-top-width: 1px;
    border-bottom-width: 1px;
    border-color: #88898a;
}

#scrollable-my-presetlist {
    border-color: #85a1cb !important;
}

.accordion {
    max-height: 100% !important;      /* Begrenzung auf die Höhe des Eltern-Containers */  
}

.accordion-button {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

.preset-settings-form {
    padding-left: 30px !important;
}

#main-content-settings {
    margin-left: 30px;
}

@media only screen and (max-width: 575px) {
    .main-container {border-radius: 0px !important; min-width: 360px !important;}
    .main-title, .login-col, .col-mobile-nav-toggler{padding-left: 6px !important; padding-right: 6px !important;}
    .body, .mobile-row-topbar{min-width: 360px !important;}
    .mobile-nav-mainsection{min-width: 300px !important;}
    /*.mobile-nav-mainsection {overflow-y: auto;}*/
    .modal-content {min-width: 330px;}
    .preset-settings-form { padding: 6px !important;}
    .login-col{padding-right: 4px;}
    .video-item{padding-right: 2px; padding-left: 2px}
    .video-text {font-size: 0.6em !important; -webkit-line-clamp: 3; line-clamp: 3;}
    #main-content-settings {margin-left: 0px;}
    .settings-title {padding-left: 0px !important;}
    .input-settings {padding-right: 0px !important; }
    .modal-footer {
        padding: 6px;
    }
    .modal-footer .btn {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
        white-space: nowrap; /* verhindert Zeilenumbruch im Text */
   }
}

@media only screen and (max-width: 768px) {
    .mobile-title { padding-left: 0 !important;}
    .mobile-row-topbar {min-width: 450px;}
    .mobile-nav-mainsection {min-width: 450px;}
    .mobile-row-videowall {margin: 0 !important;}
    .mobile-container-videowall {width: 100% !important;}
    .mobile-row-presetlist {margin: 0 !important; width: 100% !important; }
    .mobile-row-save-preset-btn{margin-left: 0px !important; margin-right: 0px !important; min-width: 140px;}
    .mobile-row-videowall-presetlist {margin: 0 !important;}
    .video-text {font-size: 0.8em;}
}

@media only screen and (min-width: 575px) {
    .settings-title { padding-left: 10px !important;}
}
   

@media only screen and (max-width: 992px) {
    .mobile-nav{display: none;}
    .main-container {width: 100vw !important; margin: 0 !important; border-radius: 0 !important;}
    
    .col-mobile-nav-toggler{
        display: flex;
        justify-content: start;
        align-items: center;
    }

    #grid {
        height: 35% !important;
    }

    #sidebar {
        width: 100%;
    }

    .grid-video-text {
       font-size: 0.6em !important; -webkit-line-clamp: 3; line-clamp: 3;
    }
}

@media only screen and (min-width: 992px) {
    .main-container{width: 70vw !important; min-width: 950px;}
    .navbar{display: none;}
    .col-mobile-nav-toggler{display: none;}
}



.mobile-row-videowall-presetlist {margin: 0px !important;}
.mobile-row-save-preset-btn-presetlist{margin-left: 0px !important;}

.row-upload-btn {
    margin-right: 0 !important;
}

.col-upload-btn {
    padding-left: 0;
    padding-right: 0;
}

.col-preset-settings-btn {
    padding-left: 0;
    padding-right: 0;
}
    


@media only screen and (min-width: 1200px) {
    .video-item {width: 90px !important;}
}

#scrollable {
    height: 85vh;
    overflow-y: scroll !important;
    overflow-x: hidden !important;
    border-width: 5px;
    border-color:  white;
    scrollbar-width: 5px;
}

.list-group-item {
    background-color: transparent;
    border-color: grey;
    margin: 1px;
    color: white;
    overflow: hidden;
    user-select: none;
}


#addVideoBtn {
    margin-bottom: 5px !important;
}

.grid-container {
    position: relative;
    border: 2px solid #ccc; /* Gitterrand des gesamten Containers */
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 Spalten */
    grid-template-rows: repeat(4, 1fr);    /* 4 Reihen */
    gap: 2px;  /* Abstand zwischen den Zellen im Grid */
    background-image: linear-gradient(to right, #ccc 1px, transparent 1px),
                      linear-gradient(to bottom, #ccc 1px, transparent 1px);
    background-size: 25% 25%; /* Gittergröße anpassen */
}

.grid-row {
    width: 120px;
    height: 80px;
    border: 1px solid gray;
    background-color: rgba(200, 200, 200, 0.2);
}

.grid-item {
    position: absolute; /* Um die Position per JavaScript zu ändern */
    width: 120px;  /* Anfangsgröße des Elements */
    height: 80px;
    border: 1px solid #007bff;
    background-color: rgba(0, 123, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none; 
    cursor: pointer;
    overflow: hidden; /* Überlauf verstecken */
    text-overflow: ellipsis; /* Ellipsen bei abgeschnittenem Text */
    word-break: break-all;
}

#editMenue{
    display: none;
}

.resize-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: rgba(0, 123, 255, 0.7);
    cursor: se-resize; /* Pfeil für Diagonalresize */
    right: 0;
    bottom: 0;
}

.delete-button {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: red;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 14px;
    cursor: pointer;
}

/* Button zum Hinzufügen von Elementen */
.add-item-button {
    margin: 10px;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.add-item-button:hover {
    background-color: #0056b3;
}

#videos-list-offcanvas-body {
    height: 85%;
    overflow-y: scroll;
}

#videosList button{
    cursor: grab;
}

#saveModal {
    display: none;
}

#spinner-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.6); /* halbtransparentes Weiß */
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

#spinner {
    border: 6px solid #eee;
    border-top: 6px solid #3498db;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}