@charset "UTF-8";

/*
|--------------------------------------------------------------------------
| Mar del Plata TV CMS
|--------------------------------------------------------------------------
| Bloque de Facebook
|--------------------------------------------------------------------------
| Estilos para:
| - Editor de la noticia.
| - Vista previa lateral.
| - Vista previa general.
|--------------------------------------------------------------------------
*/

/*
|--------------------------------------------------------------------------
| Editor del bloque
|--------------------------------------------------------------------------
*/

.facebook-block-editor {
    display: grid;
    gap: 16px;
}

.facebook-url-input {
    width: 100%;
}

.facebook-validation-message {
    margin: -4px 0 0;
    padding: 10px 13px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
}

.facebook-validation-message.is-error {
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.facebook-validation-message.is-success {
    border: 1px solid #bbf7d0;
    background: #ecfdf5;
    color: #166534;
}

/*
|--------------------------------------------------------------------------
| Vista del contenido incrustado
|--------------------------------------------------------------------------
*/

.facebook-editor-preview,
.preview-facebook-block,
.full-preview-facebook-block {
    width: 100%;
    margin: 0;
}

.facebook-editor-preview {
    min-height: 180px;
    padding: 18px;
    border: 1px solid #dce6ef;
    border-radius: 12px;
    background: #f5f8fb;
}

.facebook-editor-preview.is-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #b8c7d6;
    background: #f8fafc;
}

.facebook-preview-placeholder {
    max-width: 480px;
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
}

/*
|--------------------------------------------------------------------------
| Contenedor adaptable
|--------------------------------------------------------------------------
*/

.facebook-embed-container,
.preview-facebook-embed,
.full-preview-facebook-embed {
    width: 100%;
    max-width: 560px;
    min-height: 260px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 12px;
    background: #ffffff;
    box-shadow:
        0 8px 24px rgba(15, 23, 42, 0.08);
}

/*
|--------------------------------------------------------------------------
| Iframe de Facebook
|--------------------------------------------------------------------------
*/

.facebook-embed-iframe,
.facebook-editor-iframe,
.preview-facebook-iframe,
.full-preview-facebook-iframe {
    display: block;
    width: 100%;
    min-height: 620px;
    margin: 0 auto;
    border: 0;
    background: #ffffff;
}

.facebook-editor-iframe {
    max-width: 500px;
}

/*
|--------------------------------------------------------------------------
| Vista previa lateral
|--------------------------------------------------------------------------
*/

.preview-facebook-block {
    margin: 22px 0;
}

.preview-facebook-embed {
    max-width: 500px;
}

.preview-facebook-iframe {
    min-height: 560px;
}

/*
|--------------------------------------------------------------------------
| Vista previa general
|--------------------------------------------------------------------------
*/

.full-preview-facebook-block {
    max-width: 760px;
    margin: 34px auto;
}

.full-preview-facebook-embed {
    max-width: 560px;
}

.full-preview-facebook-iframe {
    min-height: 650px;
}

/*
|--------------------------------------------------------------------------
| Enlace alternativo
|--------------------------------------------------------------------------
*/

.facebook-fallback,
.preview-facebook-fallback,
.full-preview-facebook-fallback {
    margin: 14px 0 0;
    text-align: center;
}

.facebook-fallback-link,
.preview-facebook-fallback-link,
.full-preview-facebook-fallback-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid #0866ff;
    border-radius: 9px;
    background: #0866ff;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.facebook-fallback-link:hover,
.preview-facebook-fallback-link:hover,
.full-preview-facebook-fallback-link:hover {
    border-color: #0056d6;
    background: #0056d6;
    color: #ffffff;
    transform: translateY(-1px);
}

/*
|--------------------------------------------------------------------------
| Pie de la publicación
|--------------------------------------------------------------------------
*/

.facebook-caption,
.preview-facebook-caption,
.full-preview-facebook-caption,
.facebook-block-editor .full-preview-media-caption {
    width: 100%;
    max-width: 560px;
    margin: 12px auto 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.55;
    text-align: center;
    overflow-wrap: anywhere;
}

/*
|--------------------------------------------------------------------------
| Tablet
|--------------------------------------------------------------------------
*/

@media (max-width: 900px) {

    .full-preview-facebook-block {
        max-width: 100%;
    }

    .facebook-embed-container,
    .preview-facebook-embed,
    .full-preview-facebook-embed {
        max-width: 100%;
    }
}

/*
|--------------------------------------------------------------------------
| Celular
|--------------------------------------------------------------------------
*/

@media (max-width: 600px) {

    .facebook-editor-preview {
        min-height: 150px;
        padding: 10px;
        border-radius: 9px;
    }

    .facebook-embed-container,
    .preview-facebook-embed,
    .full-preview-facebook-embed {
        border-radius: 9px;
    }

    .facebook-embed-iframe,
    .facebook-editor-iframe,
    .preview-facebook-iframe,
    .full-preview-facebook-iframe {
        min-height: 520px;
    }

    .preview-facebook-block,
    .full-preview-facebook-block {
        margin-top: 24px;
        margin-bottom: 24px;
    }

    .facebook-fallback-link,
    .preview-facebook-fallback-link,
    .full-preview-facebook-fallback-link {
        width: 100%;
    }

    .facebook-caption,
    .preview-facebook-caption,
    .full-preview-facebook-caption {
        padding: 0 4px;
        font-size: 13px;
    }
}