/*  Modal  */
.modal-window {
    transform: scale(0.8);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    background: linear-gradient(120deg, #22222f, var(--contrast-item-background));
    color: var(--text-color);
    border-radius: 20px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    width: calc(100% - 40px);
    max-width: 600px;
    overflow: hidden;
    flex-direction: column;
    align-items: center;
    height: calc(100% - 40px);
}
.modal-window.active {
    display: flex;
    opacity: 1;
    transform: scale(1);
}

.modal-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    overflow-y: auto;
    scrollbar-width: none;
    width: calc(100% - 40px);
    height: calc(100% - 50px);
    flex-shrink: 0;
}

.modal-main> :first-child {
    margin-top: 20px;
}

.modal-main> :last-child {
    margin-bottom: 20px
}

/* If there is a modal-footer within the modal add more margin to the bottom */
.modal-window:has(.modal-footer) .modal-main> :last-child {
    margin-bottom: 70px;
}

.modal-footer {
    position: fixed;
    height: 50px;
    width: 100%;
    bottom: 0;
    box-shadow: 0px 0px 5px 0px rgb(0 0 0 / 60%);
}


.modal-action-button {
    height: 35px;
    border: none;
    border-radius: 10px;
    background-color: #ed4e4e;
    font-family: 'Geologica Light';
    color: white;
    font-size: 17px;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.modal-footer .modal-action-button {
    font-size: 19px;
}

span.modal-window-title {
    width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    font-weight: bold;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(0 0 0 / 50%);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: opacity 0.2s;
    opacity: 0;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 9999;
    width: 100%;
    background-color: var(--contrast-item-background);
    box-shadow: 0px 0px 5px 0px rgb(0 0 0 / 60%);
}

.modal-header h2 {
    margin: 0;
}

.modal-nav-bar-left,
.modal-nav-bar-right {
    position: absolute;
    top: 13px;
    cursor: pointer;
    font-size: 22px;
}
.modal-nav-bar-left {
    left: 15px;
}
.modal-nav-bar-right {
    right: 15px;
}

.modal-body img {
    max-width: 100%;
    height: 280px;
    margin-bottom: 20px;
    cursor: pointer;
    object-fit: contain;
}

.horizontal {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 15px;
    width: 100%;
}


@keyframes fullRotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.modal-navigation-link {
    width: 100%;
    height: 50px;
    background-color: var(--contrast-item-background);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 25px;
    cursor: pointer;
    transition: filter 0.3s;
    flex-shrink: 0;
}

.modal-navigation-link:hover {
    filter: invert(1);
}

.modal-navigation-link i {
    width: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 25px;
}

.modal-navigation-link span {
    margin-right: auto;
}

.horizontal .modal-action-button {
    flex-shrink: unset;
}

/* ALL NEW MULTI PHOTO CSS IS BELOW */

.multi-photo-container {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    width: 100%;
    min-height: 150px;
}

.drop-zone {
    border: 2px dashed #ccc;
    border-radius: 10px;
    padding: 10px;
    position: relative;
    text-align: center;
    width: calc(100% - 25px);
    margin-bottom: 0;
}

.drop-zone.hover {
    background-color: #9efb9e;
    border-color: #515151;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    gap: 10px;
    height: 100%;
    max-height: calc(100% - 40px);
    width: 100%;
    justify-items: center;
    overflow-y: auto;
    margin-bottom: 40px;
    margin-top: 8px;
}

.image-gallery img {
    width: 110px;
    height: 110px;
    object-fit: contain;
    border: 1px solid;
    border-radius: 8px;
    margin-bottom: 0;
    cursor: default;
    max-width: unset;
    /* Temp for override of old global class */
}

.image-gallery button {
    position: absolute;
    top: 0px;
    right: 0px;
    background: rgb(255 0 0);
    color: white;
    border: none;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 0 7px 0 8px;
    font-size: 22px;
}

.upload-button {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 32px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 8px;
    border: none;
    background: #3ec93e;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    color: white;
}


.cl-photo-upload-container {
	width: 100%;
	display: flex;
	flex-direction: column;
}
.cl-photo-upload-container input {	
    margin: 0;
	padding: 0;
}
.cl-photo-upload-image-item-container {
    position: relative;
    width: 100%;
}
.image-gallery img {
	background-color: #888888;
    border: none;
    width: 100%;
}
.image-gallery {
	margin-top: 0;
}
/*  End of Image list  */



@media (max-width: 600px) {
    span.modal-window-title {
        font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
        font-weight: lighter;
        font-size: 18px;
    }

    .modal {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .modal-main {
        width: calc(100% - 20px);
    }

    .modal-window {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
}