/* ==========================================================================
   Galería: organización de miniaturas y pies individuales
   ========================================================================== */

.gallery-block-editor {
    width: 100%;
}

/*
|--------------------------------------------------------------------------
| Cuadrícula
|--------------------------------------------------------------------------
*/

.gallery-editor-grid {
    width: 100%;

    display: grid;

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

    gap: 18px;

    margin: 18px 0 24px;

    align-items: start;
}

/*
|--------------------------------------------------------------------------
| Tarjeta individual
|--------------------------------------------------------------------------
*/

.gallery-editor-item {
    position: relative;

    width: 100%;

    min-width: 0;

    display: flex;

    flex-direction: column;

    overflow: hidden;

    border: 1px solid #dbe4ee;

    border-radius: 12px;

    background: #ffffff;

    box-shadow:
        0 4px 14px
        rgba(0, 59, 122, .07);
}

/*
|--------------------------------------------------------------------------
| Contenedor de la imagen
|--------------------------------------------------------------------------
*/

.gallery-editor-image-wrapper {
    position: relative;

    width: 100%;

    aspect-ratio: 4 / 3;

    overflow: hidden;

    background: #eef3f8;
}

.gallery-editor-image {
    width: 100%;

    height: 100%;

    display: block;

    object-fit: cover;
}

/*
|--------------------------------------------------------------------------
| Botón para eliminar
|--------------------------------------------------------------------------
*/

.gallery-remove-button {
    position: absolute;

    top: 10px;

    right: 10px;

    z-index: 3;

    width: 36px;

    height: 36px;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 0;

    border: 0;

    border-radius: 50%;

    background: rgba(164, 27, 27, .92);

    color: #ffffff;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 24px;

    font-weight: 400;

    line-height: 1;

    cursor: pointer;

    box-shadow:
        0 3px 10px
        rgba(0, 0, 0, .20);
}

.gallery-remove-button:hover {
    background: #c52222;
}

/*
|--------------------------------------------------------------------------
| Campo del pie de foto
|--------------------------------------------------------------------------
*/

.gallery-image-caption-field {
    width: 100%;

    padding: 14px;
}

.gallery-image-caption-label {
    width: 100%;

    display: flex;

    flex-direction: column;

    gap: 8px;

    color: #20242a;

    font-size: .88rem;

    font-weight: 700;

    line-height: 1.4;
}

.gallery-image-caption-input {
    width: 100%;

    min-width: 0;

    min-height: 76px;

    display: block;

    padding: 10px 12px;

    border: 1px solid #cbd8e6;

    border-radius: 8px;

    background: #ffffff;

    color: #20242a;

    font-family:
        "Montserrat",
        Arial,
        Helvetica,
        sans-serif;

    font-size: .9rem;

    font-weight: 400;

    line-height: 1.45;

    resize: vertical;
}

.gallery-image-caption-input::placeholder {
    color: #8f9aa8;
}

.gallery-image-caption-input:focus {
    border-color: #006fd6;

    outline: 3px solid
        rgba(0, 111, 214, .14);
}

/*
|--------------------------------------------------------------------------
| Zona para agregar más imágenes
|--------------------------------------------------------------------------
*/

.gallery-add-more-content {
    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 5px;

    padding: 18px;

    text-align: center;
}

.gallery-add-more-icon {
    color: #006fd6;

    font-size: 28px;

    font-weight: 700;

    line-height: 1;
}

.gallery-add-more {
    margin: 0;

    color: #526477;

    font-size: .9rem;
}

/*
|--------------------------------------------------------------------------
| Adaptación para pantallas más angostas
|--------------------------------------------------------------------------
*/

@media (max-width: 1100px) {
    .gallery-editor-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }
}

@media (max-width: 700px) {
    .gallery-editor-grid {
        grid-template-columns: 1fr;
    }

    .gallery-editor-image-wrapper {
        aspect-ratio: 16 / 10;
    }
}