/**
 * PLUXDOM Blog CPT Styles
 * Diseño basado en screenshot
 */

/* ==================== META BOXES ==================== */
#plx_blog_details,
#plx_blog_html_espanol,
#plx_blog_html_ingles,
#plx_blog_extra_html,
#plx_blog_featured_image {
    border: 1px solid #ddd;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
    margin-bottom: 12px;
}

/* Headers colapsables */
.hndle {
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
    padding: 12px 16px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #2c3e50;
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hndle:hover {
    background: #e9ecef;
}

/* Flechas de colapsar */
.hndle .toggle-indicator {
    color: #666;
    font-size: 18px;
    transition: transform 0.2s;
}

.postbox.closed .hndle .toggle-indicator {
    transform: rotate(-90deg);
}

/* Contenido de las secciones */
.inside {
    padding: 16px;
    margin: 0;
}

/* ==================== CAMPOS DE FORMULARIO ==================== */
.plx-meta-field {
    margin-bottom: 20px;
}

.plx-meta-field:last-child {
    margin-bottom: 0;
}

.plx-meta-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #23282d;
    font-size: 13px;
}

.plx-meta-field input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.plx-meta-field input[type="text"]:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 1px #0073aa;
}

/* ==================== PERMALINKS ==================== */
.plx-permalink-info {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 4px;
    margin-top: 15px;
}

.plx-permalink-info p {
    margin: 8px 0;
    font-size: 13px;
}

.plx-permalink-info code {
    display: inline-block;
    padding: 6px 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #0073aa;
    word-break: break-all;
}

/* ==================== IMAGEN DESTACADA ==================== */
.plx-featured-image-container {
    margin: 10px 0;
}

.plx-featured-image-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.plx-featured-image-preview {
    display: inline-block;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    background: #f8f9fa;
    max-width: 300px;
}

.plx-featured-image-preview img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 300px;
}

.plx-featured-image-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Botón remover imagen - ROJO como en el screenshot */
.plx-btn-remove-image {
    background: #dc3232;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
}

.plx-btn-remove-image:hover {
    background: #a00;
    color: #fff;
}

.plx-btn-upload-image {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
}

.plx-btn-upload-image:hover {
    background: #005a87;
    color: #fff;
}

/* ==================== EDITORES HTML ==================== */
.plx-html-editor-container {
    margin-top: 10px;
}

.plx-html-editor-container .description {
    margin-bottom: 12px;
    padding: 10px 12px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 0 4px 4px 0;
    color: #856404;
    font-size: 13px;
}

.plx-html-editor-container .description strong {
    font-weight: 600;
}

.plx-html-editor {
    width: 100%;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.6;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 12px;
    background: #fff;
    resize: vertical;
    transition: border-color 0.2s;
}

.plx-html-editor:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 1px #0073aa;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 782px) {
    .inside {
        padding: 12px;
    }
    
    .plx-meta-field input[type="text"] {
        max-width: 100%;
    }
    
    .plx-featured-image-preview img {
        max-width: 100%;
    }
    
    .plx-permalink-info code {
        font-size: 11px;
    }
    
    .plx-html-editor {
        font-size: 11px;
    }
}

/* ==================== UTILIDADES ==================== */
.plx-hidden {
    display: none !important;
}

.plx-mt-0 {
    margin-top: 0 !important;
}

.plx-mb-0 {
    margin-bottom: 0 !important;
}


#postimagediv { display: none; }


.wp-editor-wrap {
    display: none;
    position: relative;
}


.wp-editor-expand #post-status-info {
    display: none;
    border-top: 1px solid #c3c4c7;
}


/* ============================================================
   PLUXDOM BLOG CPT
   IMÁGENES DE PLAYA - GRID 7 IMÁGENES
   ============================================================ */


/* ============================================================
   CONTENEDOR PRINCIPAL
   ============================================================ */

.plx-beach-images-container {
    width: 100%;
    box-sizing: border-box;
}


/* ============================================================
   GRID
   ============================================================ */

.plx-beach-images-container {
    display: grid;

    /*
     * 4 columnas:
     *
     * Fila 1:
     * 1 | 2 | 3 | 4
     *
     * Fila 2:
     * 5 | 6 | 7
     */

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 18px;

    align-items: stretch;
}


/* ============================================================
   DESCRIPCIÓN SUPERIOR
   ============================================================ */

.plx-beach-images-container > .description {
    grid-column: 1 / -1;

    margin: 0 0 4px 0;

    line-height: 1.6;
}


/* ============================================================
   CADA IMAGEN
   ============================================================ */

.plx-beach-image-field {
    box-sizing: border-box;

    width: 100%;

    margin: 0 !important;

    padding: 15px !important;

    border: 1px solid #dcdcde;

    border-radius: 8px;

    background: #f6f7f7;

    min-width: 0;
}


/* ============================================================
   TÍTULO "IMAGEN 1", "IMAGEN 2", ETC.
   ============================================================ */

.plx-beach-image-field > label {
    display: block;

    margin: 0 0 10px 0;

    font-size: 14px;

    font-weight: 600;

    color: #1d2327;
}


/* ============================================================
   PREVIEW
   ============================================================ */

.plx-beach-image-field .plx-image-preview {
    width: 100%;

    min-height: 150px;

    margin-bottom: 12px;

    display: flex;

    align-items: center;

    justify-content: center;

    overflow: hidden;

    background: #ffffff;

    border: 1px solid #dcdcde;

    border-radius: 6px;

    box-sizing: border-box;
}


/* ============================================================
   IMAGEN
   ============================================================ */

.plx-beach-image-field .plx-image-preview img {
    display: block;

    width: 100% !important;

    max-width: 100% !important;

    height: 180px !important;

    object-fit: cover;

    margin: 0 !important;

    border-radius: 5px;
}


/* ============================================================
   CUANDO NO HAY IMAGEN
   ============================================================ */

.plx-beach-image-field .plx-image-preview:empty {
    min-height: 180px;

    position: relative;
}


/* Indicador visual cuando está vacío */

.plx-beach-image-field .plx-image-preview:empty::before {
    content: "Sin imagen";

    position: absolute;

    top: 50%;

    left: 50%;

    transform: translate(
        -50%,
        -50%
    );

    color: #8c8f94;

    font-size: 13px;

    white-space: nowrap;
}


/* ============================================================
   BOTONES
   ============================================================ */

.plx-beach-image-field .plx-upload-beach-image,
.plx-beach-image-field .plx-remove-beach-image {
    box-sizing: border-box;

    min-height: 38px;

    margin: 0 5px 0 0;

    padding: 7px 12px;

    cursor: pointer;

    border-radius: 5px;

    font-size: 13px;
}


/* ============================================================
   BOTÓN SUBIR
   ============================================================ */

.plx-beach-image-field .plx-upload-beach-image {
    background: #ffffff;

    border: 1px solid #2271b1;

    color: #2271b1;
}


.plx-beach-image-field .plx-upload-beach-image:hover {
    background: #f0f6fc;
}


/* ============================================================
   BOTÓN REMOVER
   ============================================================ */

.plx-beach-image-field .plx-remove-beach-image {
    background: #ffffff;

    border: 1px solid #b32d2e;

    color: #b32d2e;
}


.plx-beach-image-field .plx-remove-beach-image:hover {
    background: #fcf0f0;
}


/* ============================================================
   INPUT OCULTO
   ============================================================ */

.plx-beach-image-field input[type="hidden"] {
    display: none;
}


/* ============================================================
   TABLET
   ============================================================ */

@media (max-width: 1100px) {

    .plx-beach-images-container {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));

        gap: 15px;
    }

}


/* ============================================================
   TABLET PEQUEÑO
   ============================================================ */

@media (max-width: 782px) {

    .plx-beach-images-container {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 14px;
    }


    .plx-beach-image-field {
        padding: 12px !important;
    }


    .plx-beach-image-field
    .plx-image-preview img {
        height: 160px !important;
    }


    .plx-beach-image-field
    .plx-image-preview:empty {
        min-height: 160px;
    }

}


/* ============================================================
   MÓVIL
   ============================================================ */

@media (max-width: 480px) {

    .plx-beach-images-container {
        grid-template-columns: 1fr;

        gap: 12px;
    }


    .plx-beach-image-field
    .plx-image-preview img {
        height: auto !important;

        max-height: 240px;

        object-fit: cover;
    }


    .plx-beach-image-field
    .plx-image-preview:empty {
        min-height: 150px;
    }


    .plx-beach-image-field
    .plx-upload-beach-image,
    .plx-beach-image-field
    .plx-remove-beach-image {

        margin-bottom: 5px;
    }

}





