/* Container styling */
.custom-customization {
    margin-bottom: 20px;
}

/* Label styling */
.custom-customization label {
    display: inline-block;
    margin-top: 10px;
    margin-right: 16px;
    font-weight: 600;
}

/* Input fields */
.custom-customization .input-text {
    display: block;
    width: 100%;
    max-width: 300px;
    padding: 6px;
    margin-top: 5px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 0;
    font-size: 14px;
}

/* Select fields */
.custom-customization .woocommerce-select {
    display: inline-block;
    width: 100%;
    max-width: 300px;
    margin-top: 5px;
    padding: 6px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 0;
    font-size: 14px;
    background: #fff;
    color: #333;
}

.customization-option-wrapper {
    border: 1px dotted #ccc;
    box-shadow: 0px 3px 15px -3px rgba(0,0,0,0.1);
    padding: 10px 20px 20px 20px;
    margin: 10px 0;
}


/* Customization option wrapper */
.customization-option {
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    /*border: 1px dotted #ccc;*/
    /*box-shadow: 0px 3px 15px -3px rgba(0,0,0,0.1);*/
    /*padding: 10px 20px 20px 20px;*/
    /*margin: 10px 0;*/
}

/* Make Select2 height adapt to content */
.customization-option .select2-container .select2-selection--single {
    height: auto;
}

#embroidery_custom_text_wrapper {
    display: contents;
}

/* Motif & Print lists - 4 per row */
.motif-list,
.print-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 0;
    margin: 10px 0;
    list-style: none;
}

/* Individual item boxes */
.motif-list li,
.print-list li {
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 4px;
    background: #fff;
    cursor: pointer;
    height: 120px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    transition: border-color 0.2s, box-shadow 0.2s;
}

/* Hide the radio button circle */
.motif-list input[type="radio"],
.print-list input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Image should fill the box */
.motif-list li img,
.print-list li img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    display: block;
    margin: 2px;
}

/* Hover + selected styles */
.motif-list li:hover,
.print-list li:hover {
    border-color: #007cba;
}

.motif-list li.selected,
.print-list li.selected {
    border: 2px solid #007cba;
    box-shadow: 0 0 0 2px #cce7f6;
    background-color: #f0f8ff;
}

/* Pagination controls */
.motif-pagination {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    gap: 10px;
}

.motif-pagination button {
    padding: 6px 14px;
    background: white;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s ease;
}

.motif-pagination button:hover:not(:disabled) {
    border-color: #007cba;
    color: #007cba;
}

.motif-pagination button:disabled {
    opacity: 0.5;
    cursor: default;
}

.custom-file-upload {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.upload-label {
    background-color: #0073aa;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.upload-label:hover {
    background-color: #005d8f;
}

input[type="file"] {
    display: none;
}

.file-name {
    font-size: 14px;
    color: #555;
    font-style: italic;
}