/*
 * Cuerpo de la nota: citas y botones con el estilo del sitio.
 *
 * Mismas reglas para la nota publicada (.sn-single__content) y para el editor
 * de entradas y casos de éxito (.editor-styles-wrapper), así quien carga la nota
 * ve lo mismo que se publica. En el sitio lo carga single-nota.php; en el editor,
 * proglobal_single_nota_content_editor_styles() en inc/enqueue.php, solo para esos
 * tipos de contenido (las páginas no usan este diseño).
 */

/* ---- Cita (core/quote): barra y texto rojos, titular del sitio ---- */
:is(.sn-single__content, .editor-styles-wrapper) .wp-block-quote {
    margin: 36px 0;
    padding: 0.2em 0 0.2em 0.75em; /* en em: la separación sigue al tamaño de letra */
    border: 0;
    border-left: 3px solid var(--wp--preset--color--custom-rojo-principal);
    color: var(--wp--preset--color--custom-rojo-principal);
    font-family: var(--wp--preset--font-family--soho-gothic-pro);
    font-size: 20px;
    font-style: normal;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.5px;
}

/* ---- Cita destacada (core/pullquote): centrada, entre filetes ---- */
:is(.sn-single__content, .editor-styles-wrapper) .wp-block-pullquote {
    margin: 44px 0;
    padding: 40px 0;
    border: 0;
    border-top: 1px solid #ececec;
    border-bottom: 1px solid #ececec;
    color: var(--wp--preset--color--custom-negro);
    text-align: center;
}

:is(.sn-single__content, .editor-styles-wrapper) .wp-block-pullquote blockquote {
    margin: 0;
    padding: 0;
    border: 0;
}

:is(.sn-single__content, .editor-styles-wrapper) .wp-block-pullquote blockquote::before {
    content: "";
    display: block;
    width: 40px;
    height: 3px;
    margin: 0 auto 24px;
    background: var(--wp--preset--color--custom-rojo-principal);
}

:is(.sn-single__content, .editor-styles-wrapper) .wp-block-pullquote p {
    font-family: var(--wp--preset--font-family--soho-gothic-pro);
    font-size: 30px;
    font-style: normal;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.5px;
}

/* Autor de la cita: etiqueta mono, como la fecha de la nota. */
:is(.sn-single__content, .editor-styles-wrapper) .wp-block-quote cite,
:is(.sn-single__content, .editor-styles-wrapper) .wp-block-pullquote cite {
    display: block;
    margin-top: 16px;
    color: var(--wp--preset--color--custom-gris);
    font-family: var(--wp--preset--font-family--jetbrains-mono);
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
    letter-spacing: -0.12px;
    text-transform: uppercase;
    opacity: 0.7;
}

/* ---- Enlaces del texto: rojo del sitio, subrayados; negro al pasar, como los botones ---- */
:is(.sn-single__content, .editor-styles-wrapper) a:not(.wp-block-button__link) {
    color: var(--wp--preset--color--custom-rojo-principal);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.3s ease;
}

:is(.sn-single__content, .editor-styles-wrapper) a:not(.wp-block-button__link):hover {
    color: var(--wp--preset--color--custom-negro);
}

/* ---- Botones (core/buttons): los del sitio ----
 * Relleno: rojo, y negro al pasar. Estilo "Contorno": borde negro, se rellena
 * al pasar. Misma tipografía, padding y flecha que los botones de los bloques
 * (ver .hec-seccion__btn y .hun-header__btn). */
:is(.sn-single__content, .editor-styles-wrapper) .wp-block-buttons {
    margin: 28px 0;
}

:is(.sn-single__content, .editor-styles-wrapper) .wp-block-button__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 23px;
    border: 1px solid var(--wp--preset--color--custom-rojo-principal);
    border-radius: 0;
    background: var(--wp--preset--color--custom-rojo-principal);
    color: var(--wp--preset--color--custom-blanco);
    font-family: var(--wp--preset--font-family--jetbrains-mono);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0.5px;
    text-decoration: none;
    text-transform: uppercase;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

:is(.sn-single__content, .editor-styles-wrapper) .wp-block-button__link::after {
    content: "";
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 8h9M9 4.5L12.5 8 9 11.5' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 8h9M9 4.5L12.5 8 9 11.5' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: transform 0.3s ease;
}

:is(.sn-single__content, .editor-styles-wrapper) .wp-block-button__link:hover,
:is(.sn-single__content, .editor-styles-wrapper) .wp-block-button__link:focus-visible {
    border-color: var(--wp--preset--color--custom-negro);
    background: var(--wp--preset--color--custom-negro);
    color: var(--wp--preset--color--custom-blanco);
}

:is(.sn-single__content, .editor-styles-wrapper) .wp-block-button__link:hover::after,
:is(.sn-single__content, .editor-styles-wrapper) .wp-block-button__link:focus-visible::after {
    transform: translateX(4px);
}

:is(.sn-single__content, .editor-styles-wrapper) .wp-block-button__link:focus-visible {
    outline: 2px solid var(--wp--preset--color--custom-rojo-principal);
    outline-offset: 3px;
}

/* WordPress estiliza el contorno con selectores de hasta 4 clases
 * (.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color)):
 * estos llevan una más para ganarles sin !important. */
:is(.sn-single__content, .editor-styles-wrapper) .wp-block-buttons .wp-block-button.is-style-outline > .wp-block-button__link {
    padding: 16px 23px;
    border: 1px solid var(--wp--preset--color--custom-negro);
    background: transparent;
    color: var(--wp--preset--color--custom-negro);
}

:is(.sn-single__content, .editor-styles-wrapper) .wp-block-buttons .wp-block-button.is-style-outline > .wp-block-button__link:hover,
:is(.sn-single__content, .editor-styles-wrapper) .wp-block-buttons .wp-block-button.is-style-outline > .wp-block-button__link:focus-visible {
    background: var(--wp--preset--color--custom-negro);
    color: var(--wp--preset--color--custom-blanco);
}

@media (max-width: 1023px) {
    :is(.sn-single__content, .editor-styles-wrapper) .wp-block-quote {
        margin: 28px 0;
        font-size: 18px;
    }

    :is(.sn-single__content, .editor-styles-wrapper) .wp-block-pullquote {
        margin: 32px 0;
        padding: 28px 0;
    }

    :is(.sn-single__content, .editor-styles-wrapper) .wp-block-pullquote p {
        font-size: 22px;
    }

    /* Botones a todo el ancho; le gana también a los anchos fijos de WP (.wp-block-button__width-*). */
    :is(.sn-single__content, .editor-styles-wrapper) .wp-block-buttons > .wp-block-button.wp-block-button {
        flex-basis: 100%;
        width: 100%;
    }

    :is(.sn-single__content, .editor-styles-wrapper) .wp-block-button__link {
        width: 100%;
    }
}
