/* =========================
   FRONT-END GALLERY
   ========================= */

.custom-logo-gallery {
    width: 100%;

    display: grid;

    grid-template-columns: repeat(6, minmax(0, 1fr));

    gap: 50px;

    align-items: center;

    background: #fff;

    padding: 15px;
}


/* =========================
   LOGO CONTAINER
   ========================= */

.custom-logo-gallery-link,
.custom-logo-gallery-logo {
    position: relative;

    width: 100%;
    min-height: 120px;

    display: flex;

    align-items: center;
    justify-content: center;

    text-decoration: none;

    box-sizing: border-box;
}


/* =========================
   LOGO IMAGE
   ========================= */

.custom-logo-gallery-logo img {
    display: block;

    width: 180px;
    height: auto;

    max-width: 100%;
    max-height: 100px;

    object-fit: contain;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}


/* =========================
   LOGO HOVER
   ========================= */

.custom-logo-gallery-link:hover img,
.custom-logo-gallery-logo:hover img {
    opacity: 0.7;

    transform: scale(1.04);
}


/* =========================
   REMOVE FOCUS / BORDERS
   ========================= */

.custom-logo-gallery-link,
.custom-logo-gallery-link:focus,
.custom-logo-gallery-link:focus-visible,
.custom-logo-gallery-link:active {
    outline: none !important;

    box-shadow: none !important;

    border: none !important;
}

.custom-logo-gallery-logo,
.custom-logo-gallery-logo:focus,
.custom-logo-gallery-logo:focus-visible {
    outline: none !important;

    box-shadow: none !important;
}

.custom-logo-gallery-link img {
    outline: none !important;

    border: none !important;
}


/* =========================
   TABLET
   ========================= */

@media (max-width: 1024px) {

    .custom-logo-gallery {
        grid-template-columns: repeat(3, minmax(0, 1fr));

        gap: 30px;
    }

}


/* =========================
   MOBILE
   ========================= */

@media (max-width: 767px) {

    .custom-logo-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 25px;
    }

    .custom-logo-gallery-link,
    .custom-logo-gallery-logo {
        min-height: 100px;
    }

    .custom-logo-gallery-logo img {
        width: 140px;

        max-width: 100%;

        max-height: 80px;
    }

}


/* =========================
   GUTENBERG EDITOR
   ========================= */

.custom-logo-gallery-editor {
    padding: 20px;

    border: 2px solid #ddd;

    background: #fff;
}

.custom-logo-gallery-editor h3 {
    margin-top: 0;

    margin-bottom: 8px;
}

.custom-logo-gallery-editor > p {
    margin-bottom: 20px;
}

.custom-logo-gallery-field {
    padding: 18px;

    margin-bottom: 15px;

    border: 1px solid #ddd;

    background: #f7f7f7;
}

.custom-logo-gallery-field-header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 15px;
}

.custom-logo-gallery-field-header h4 {
    margin: 0;
}

.custom-logo-gallery-order {
    display: flex;

    align-items: center;

    gap: 10px;
}

.custom-logo-gallery-drag {
    font-size: 20px;

    color: #777;
}

.custom-logo-gallery-editor label {
    display: block;

    margin-top: 12px;

    margin-bottom: 6px;

    font-weight: 600;
}

.custom-logo-gallery-editor input {
    width: 100%;

    box-sizing: border-box;

    padding: 10px;

    border: 1px solid #aaa;

    background: #fff;
}

.custom-logo-gallery-editor-preview {
    display: block;

    max-width: 200px;

    max-height: 100px;

    margin: 15px 0;

    object-fit: contain;
}


/* =========================
   ADD BUTTON
   ========================= */

.custom-logo-gallery-add {
    display: inline-block;

    padding: 12px 20px;

    border: 0;

    background: #2271b1;

    color: #fff;

    font-size: 15px;

    font-weight: 600;

    cursor: pointer;

    border-radius: 3px;
}

.custom-logo-gallery-add:hover {
    background: #135e96;
}


/* =========================
   REMOVE BUTTON
   ========================= */

.custom-logo-gallery-remove {
    padding: 6px 10px;

    border: 1px solid #cc1818;

    background: #fff;

    color: #cc1818;

    cursor: pointer;

    border-radius: 3px;
}

.custom-logo-gallery-remove:hover {
    background: #cc1818;

    color: #fff;
}


/* =========================
   EMPTY MESSAGE
   ========================= */

.custom-logo-gallery-empty {
    color: #666;

    font-style: italic;
}


/* =========================
   ORDER CONTROLS
   ========================= */

.custom-logo-gallery-order-buttons {
    display: flex;

    align-items: center;

    gap: 5px;
}

.custom-logo-gallery-order-buttons button {
    padding: 5px 9px;

    border: 1px solid #bbb;

    background: #fff;

    cursor: pointer;

    border-radius: 3px;
}

.custom-logo-gallery-order-buttons button:hover:not(:disabled) {
    background: #eee;
}

.custom-logo-gallery-order-buttons button:disabled {
    opacity: 0.35;

    cursor: default;
}


/* =========================
   EDITOR RESPONSIVE
   ========================= */


@media (max-width: 767px) {

    .custom-logo-gallery {
        grid-template-columns: repeat(3, minmax(0, 1fr));

        gap: 15px;
    }

    .custom-logo-gallery-link,
    .custom-logo-gallery-logo {
        min-height: 80px;
    }

    .custom-logo-gallery-logo img {
        width: 85px;

        max-width: 100%;

        max-height: 55px;
    }

}

