@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600&display=swap');

#product-image-description-wrapper {
    padding: 15px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
}

#image-list {
    /* display: flex;
    flex-wrap: wrap;
    gap: 15px; */
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

#add-new-image {
    display: inline-block;
    color: white;
    padding: 6px 12px;
    font-size: 14px;
    line-height: 1;
    border-radius: 3px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    border: 1px solid transparent;
    box-sizing: border-box;
}

.product-image-list.center-align {
    justify-content: center; /* Center images when the toggle is active */
}

.uniform-size .frontend-image {
    width: 300px; /* Adjust as needed */
    height: 300px; /* Adjust as needed */
    object-fit: cover; /* Ensures the images fill the container without distortion */
}

.metabox-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 20px;
}

.toggles-wrapper {
    display: flex;
    align-items: center;
    gap: 20px; /* Adds spacing between toggles */
}


#add-new-image:hover {
    background: #f0f0f1;
    border-color: #0a4b78;
    color: #0a4b78;
}

#add-new-image:focus {
    background: #f6f7f7;
    border-color: #3582c4;
    color: #0a4b78;
    box-shadow: 0 0 0 1px #3582c4;
    outline: 2px solid transparent;
    outline-offset: 0;
}

#add-new-image:active {
    background: #f6f7f7;
    border-color: #8c8f94;
    box-shadow: none;
}

#add-new-image.wp-core-ui.button {
    color: #2271b1;
    border-color: #2271b1;
    background: #f6f7f7;
    vertical-align: top;
}

#add-new-image.wp-core-ui.button:hover {
    background: #f0f0f1;
    border-color: #0a4b78;
    color: #0a4b78;
}

#add-new-image.wp-core-ui.button:focus {
    background: #f6f7f7;
    border-color: #3582c4;
    color: #0a4b78;
    box-shadow: 0 0 0 1px #3582c4;
    outline: 2px solid transparent;
    outline-offset: 0;
}

.toggle-container {
    display: flex;
    align-items: center;
}

.toggle-label {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #1d2327;
    cursor: pointer;
}

.toggle-slider {
    width: 40px;
    height: 20px;
    background-color: #ddd;
    border-radius: 20px;
    position: relative;
    transition: background-color 0.2s;
    cursor: pointer;
}

.toggle-slider::before {
    content: '';
    width: 16px;
    height: 16px;
    background-color: #fff;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.2s;
}

.toggle-slider.active {
    background-color: #2271b1;
}

.toggle-slider.active::before {
    transform: translateX(20px);
}

.image-preview {
    width: 100%;
    position: relative;
}

.product-metabox-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 10px;
    padding: 10px;
    margin-bottom: 10px;
    box-sizing: border-box;
    text-align: start;
    max-width: 220px;
    box-sizing: content-box;
    /* max-height: 495px; */
    justify-self: center;
}

.product-image-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 10px;
    margin-bottom: 10px;
    box-sizing: border-box;
    text-align: start;
    min-width: 220px;
    box-sizing: content-box;
}

.uploaded-image {
    width: 100%;
    height: 150px;
    border-radius: 4px;
}

.remove-image-button {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.6);
    border: none;
    color: #fff;
    padding: 5px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s;
}


.remove-image-visible {
    opacity: 1;
    visibility: visible;
}

.remove-image-button:hover {
    background-color: #ff4757;;
}


textarea {
    width: 100%;
    min-height: 130px;
    margin-top: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    padding: 8px;
    resize: vertical;
    transition: border-color 0.2s;
}

textarea:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

.no-images-message {
    color: #666;
    font-style: italic;
    text-align: center;
    margin: 20px 0;
}

.product-image-list {
    display: grid;
    grid-template-columns: repeat(var(--grid-columns, 5), auto); /* Dynamic columns based on custom property */
    gap: 15px;
    justify-content: flex-start;
    grid-auto-rows: auto;
   
}

.product-metabox-item {
    box-sizing: border-box;
}

.image-container {
    width: 100%;
    height: auto;
}

.image-description {
    padding: 10px;
}

/* Responsive: 4 columns for medium screens */
@media (max-width: 1024px) {
    .product-image-list {
        grid-template-columns: repeat(var(--grid-columns-md, 4), auto);
    }
}

/* 3 columns for smaller tablets & large phones */
@media (max-width: 768px) {
    .product-image-list {
        grid-template-columns: repeat(var(--grid-columns-sm, 3), auto);
        gap: 0;
    }
}

/* 2 columns for extra small screens (Mobile phones) */
@media (max-width: 480px) {
    .product-image-list {
        grid-template-columns: repeat(var(--grid-columns-xs, 2), auto);
    }
}

/* 1 column for very small screens (Compact smartphones) */
@media (max-width: 380px) {
    .product-image-list {
        grid-template-columns: 1fr;
    }
}

.image-description{
    font-size: 12px;
    font-family: 'Montserrat', sans-serif;
    font-weight: lighter;
    color: #787878; 
    max-height: auto; /* Fixed height */
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    padding: 0px;
}

.short-text {
    display: inline;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5; 
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Style the "Read More" button */
.read-more-btn {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    background: none;
    border: none;
    color: #0073e6;
    cursor: pointer;
    padding: 0;
    margin-top: 5px;
}

.read-less-btn {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    background: none;
    border: none;
    color: #0073e6;
    cursor: pointer;
    padding: 0;
    margin-top: 5px;
    margin-left: 5px;
}

.read-more-btn:hover {
    text-decoration: underline;
}

.paralelos-title {
    font-weight: bold; 
    text-align: center; 
	color: #000; 
	font-size: inherit;
	font-family: 'NeueEinstellung';
	font-size: 13px;
}

.image-container {
    /* width: 200px; */
    /* max-height: 260px; */
    overflow: hidden;
}

.frontend-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
