images-cms-view {
    display: block;
    padding: 1.5rem;
    background: #fafafa;
    min-height: 100vh;
}

images-cms-view .header {
    margin-bottom: 20px;
}

images-cms-view .header h1 {
    margin-bottom: 16px;
    font-size: 24px;
    color: #333;
}

images-cms-view .header p {
    margin: 0;
    color: #666;
}

images-cms-view .images-container {
    width: 100%;
}

/* Upload Zone */
images-cms-view .upload-zone {
    border: 2px dashed #4CAF50;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    background-color: #f0f8f0;
    margin-bottom: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
    width: 100%;
}

images-cms-view .upload-zone:hover {
    background-color: #e0f5e0;
    border-color: #45a049;
}

images-cms-view .upload-zone.drag-over {
    background-color: #c8e6c9;
    border-color: #2e7d32;
}

images-cms-view .upload-zone p {
    margin: 0;
    font-size: 16px;
    color: #333;
}

images-cms-view .upload-zone a {
    color: #4CAF50;
    text-decoration: underline;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    font-size: inherit;
}

images-cms-view .upload-zone a:hover {
    color: #45a049;
}

images-cms-view .search-bar {
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
    height: 36px;
}

images-cms-view .search-bar input {
    display: block;
    width: 100%;
    padding: 0px 8px;
}

images-cms-view .search-bar select {
    display: block;
    width: 200px;
    padding: 0px 8px;
    background: white;
    border: 1px solid rgb(143, 143, 157);
    text-align: right;
}

images-cms-view .images-grid {
    display: flex;
    flex-wrap: wrap;
}

images-cms-view .image-item {
    display: inline-flex;
    background: white;
    border: 1px solid #ddd;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    box-sizing: border-box;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    position: relative;
}

images-cms-view .image-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

images-cms-view .image-item.drag-over {
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.4);
    border-color: #4CAF50;
    background-color: #f0f8f0;
}

images-cms-view .image-item img {
    width: auto;
    max-height: 150px;
    object-fit: cover;
}

images-cms-view .image-item .image-name {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #702A2A;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    max-width: calc(100% - 32px);
    margin: 0;
    font-weight: 700;
    z-index: 1;
}

images-cms-view .image-item .image-layout {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(76, 175, 80, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    max-width: calc(100% - 16px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

images-cms-view .image-item:hover .image-name,
images-cms-view .image-item:hover .image-layout {
    opacity: 0;
    transition: opacity 0.3s ease;
}

images-cms-view .image-item::after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    content: "";
    background-color: black;
    opacity: 0;
    transition: opacity 0.3s ease;
}

images-cms-view .image-item:hover~.image-item::after,
images-cms-view .images-grid:has(.image-item:hover) .image-item:not(:hover)::after {
    opacity: 0.8;
}






body:has(.modal-image-container) {
    overflow: hidden;
}

.modal-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: #000000de;
    z-index: 1000;
}

.modal-image-container .modal-content {
    display: flex;
    align-items: center;
    flex-direction: column;
    background: white;
    border: 1px solid;
    border-radius: 12px;
    overflow-y: scroll;
    max-height: calc(100vh - 80px);
}

.modal-image-container .modal-content>div {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.modal-image-container .modal-content h2 {
    display: block;
    padding: 0px 16px;
    box-sizing: border-box;
    margin: 0;
}

.modal-image-container .modal-content .modal-content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
    height: 50px;
}

.modal-image-container .modal-content .close-button {
    font-size: 40px;
    box-sizing: border-box;
    height: 50px;
    padding: 0 8px;
}

.modal-image-container .modal-content>img {
    max-width: 100%;
    height: auto;
    max-height: 500px;
}

.modal-image-container .modal-content ul {
    display: flex;
    flex-direction: column;
    list-style: none;
    padding: 16px;
    margin: 0;
    overflow-y: scroll;
    max-height: calc(100vh - 576px);
}

.modal-image-container .modal-content .modal-content-header .create-button {
    background: rgba(76, 175, 80, 0.8);
    color: var(--color-background-input);
    padding: 4px 8px;
    margin-right: 16px;
    font-size: 16px;
    font-weight: bold;
    border: 1px solid;
    border-radius: 9px;
    border-color: unset;
    cursor: pointer;
}

.modal-image-container .modal-content>div ul+p,
.modal-image-container .modal-content>div ul:empty {
    padding: 24px;
    font-weight: 500;
    margin: 0;
    display: none;
}

.modal-image-container .modal-content>div ul:empty+p {
    display: flex
}

.modal-image-container .modal-content ul li {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 12px;
}

.modal-image-container .modal-content ul li img {
    height: 144px;
    width: 100%;
    object-fit: contain;
    object-position: left;
    display: block;
}

.modal-image-container .modal-content ul li span {
    display: block;
    width: 259px;
}