.image-preview-for-acf-field-help {
    display: inline-block;
    align-items: center;
    margin-left: 8px;
    cursor: pointer;
    font-size: 15px;
    line-height: 17px;
    vertical-align: middle;
    border-radius: 50%;
    transition: all 0.2s ease;
    width: 17px;
    height: 17px;
    color: #2271b1;
    border: 1px solid #2271b1;
    background: #f6f7f7;
    text-align: center;
}

.image-preview-for-acf-field-help:hover {
    color: #FFFFFF;
    background-color: #2271b1;
}

/* Style for the field label and instructions container */
.acf-field .acf-label {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    flex-wrap: wrap;
}

.acf-field .acf-label label {
    display: inline-block;
    margin: 0;
    padding: 0;
    margin-right: 5px;
}

.acf-field .acf-label .acf-instructions {
    flex-basis: 100%;
    margin-left: 0;
}

.image-preview-for-acf-field-modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    overflow-y: auto;
    /* display: flex is applied by JavaScript when shown */
    justify-content: center;
    align-items: center;
}

.image-preview-for-acf-field-modal.is-visible {
    display: flex; /* Show as flex when active */
}

.image-preview-for-acf-field-modal-content {
    position: relative;
    background-color: #fff;
    margin: 0;
    padding: 20px;
    width: 90%;
    max-width: 90vw;
    height: auto;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.image-preview-for-acf-field-modal-close {
    position: absolute;
    right: -10px;
    top: -10px;
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    z-index: 10;
    background-color: #e74c3c;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s ease;
}

.image-preview-for-acf-field-modal-close:hover {
    background-color: #c0392b;
}

.image-preview-for-acf-field-modal-image {
    max-width: 100%;
    max-height: calc(90vh - 40px);
    display: block;
    margin: 0 auto;
}

/* CSS to hide body overflow when modal is open */
body.image-preview-for-acf-field-modal-open {
    overflow: hidden;
}