/* ==========================================================================
   XXIII MAGAZINE — MÓDULO DE CITAS BILINGÜES INTERACTIVAS (SUBPROPUESTA 4D)
   Estilo editorial exacto: sin caja de fondo, barra lateral 2.5px, cero vibración
   ========================================================================== */

.xxiii-blockquote-container {
    margin: 0 !important;
    padding: 0 !important;
    position: relative;
    overflow: visible !important;
    --cat-color: #751D2D;
}

/* 1. SUBPROPUESTA 4D: ACOTACIÓN TIPOGRÁFICA SUPERIOR (EQUILIBRIO EXACTO) */
.xxiii-quote-sub4d-bar,
.entry-content .xxiii-quote-sub4d-bar,
article .xxiii-quote-sub4d-bar {
    margin-top: 0 !important;
    margin-bottom: 8px !important;
    font-family: 'Wix Madefor Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    color: #6E6B62 !important;
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    user-select: none !important;
}

.xxiii-quote-sub4d-bar span,
.xxiii-quote-sub4d-bar a,
.xxiii-quote-sub4d-bar a.xxiii-quote-toggle,
.xxiii-quote-sub4d-bar .xxiii-quote-toggle-label,
.entry-content .xxiii-quote-sub4d-bar span,
.entry-content .xxiii-quote-sub4d-bar a,
article .xxiii-quote-sub4d-bar a {
    font-family: 'Wix Madefor Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    letter-spacing: 0.2px !important;
}

.xxiii-quote-sub4d-bar .xxiii-quote-bullet {
    color: #A39E8F !important;
    font-size: 11px !important;
}

.xxiii-quote-sub4d-bar a.xxiii-quote-toggle {
    color: var(--cat-color, #751D2D) !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    transition: opacity 0.15s ease !important;
    border: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

.xxiii-quote-sub4d-bar a.xxiii-quote-toggle:hover {
    text-decoration: underline !important;
    opacity: 0.88 !important;
}

.xxiii-quote-sub4d-bar .xxiii-quote-arrow {
    display: inline-block !important;
    font-size: 11px !important;
    transition: transform 0.2s ease !important;
}

/* 2. BLOQUE DE CITA PRINCIPAL (UNIFICADO AL 100% CON ESTILO NATIVO DE DIVI/WORDPRESS) */
.xxiii-quote-block {
    background: transparent !important;
    border-left: 2.5px solid var(--cat-color, #751D2D) !important;
    padding: 2px 0 6px 20px !important;
    margin-top: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    position: relative;
    overflow: visible !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Hereda el interlineado, familia tipográfica, tamaño y color configurados en Divi / WordPress */
.xxiii-quote-text {
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
    color: inherit !important;
    font-style: inherit !important;
    letter-spacing: inherit !important;
    margin: 0 !important;
}

/* Fuente / Autor: hereda el estilo nativo de cite de WordPress / Divi */
.xxiii-quote-cite {
    display: block !important;
    margin-top: 14px !important;
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
    color: inherit !important;
    font-style: inherit !important;
}

.xxiii-quote-cite a {
    color: inherit !important;
    text-decoration: underline !important;
    text-underline-offset: 2px !important;
    font-weight: bold !important;
}

/* 3. CAJÓN DESPLEGABLE: TEXTO ORIGINAL */
.xxiii-original-drawer {
    margin-top: 0;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, margin-top 0.25s ease;
}

.xxiii-original-drawer.is-open {
    max-height: 2000px;
    opacity: 1;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px dashed #D5CEBD;
    overflow: visible !important;
}

/* El texto original comparte exactamente el mismo interlineado, tamaño y color nativos */
.xxiii-original-text {
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
    color: inherit !important;
    font-style: inherit !important;
    letter-spacing: inherit !important;
}

/* 4. PALABRAS INTERACTIVAS (100% ESTÁTICAS, CERO MICROPUNTOS, OFFSET EDITORIAL) */
.xxiii-word {
    display: inline !important;
    position: relative;
    cursor: pointer;
    font-weight: inherit !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-bottom: none !important;
    background: transparent !important;
    text-decoration: underline !important;
    text-decoration-color: #C8C2B3 !important;
    text-decoration-thickness: 1px !important;
    text-underline-offset: 3.5px !important;
    text-decoration-skip-ink: auto !important;
    transition: color 0.12s ease, text-decoration-color 0.12s ease !important;
}

.xxiii-word:hover,
.xxiii-word.is-active {
    background: transparent !important;
    color: var(--cat-color, #751D2D) !important;
    text-decoration: underline !important;
    text-decoration-color: var(--cat-color, #751D2D) !important;
    text-decoration-thickness: 1.5px !important;
    text-underline-offset: 3.5px !important;
    border: none !important;
    border-bottom: none !important;
}

/* 5. MICRO-TOOLTIP FLOTANTE (BLANCO EDITORIAL #fbfaf5, CARBÓN #1c1c1c, SIN VIBRACIÓN) */
.xxiii-word-tooltip {
    position: absolute;
    bottom: calc(100% + 7px);
    left: 50%;
    transform: translateX(-50%) translateY(0);
    background: #fbfaf5 !important;
    color: #1c1c1c !important;
    border: 1px solid #D6D0BE !important;
    border-left: 3px solid var(--cat-color, #751D2D) !important;
    border-radius: 2px;
    padding: 6px 11px !important;
    font-family: 'Wix Madefor Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    line-height: 1.35 !important;
    white-space: nowrap !important;
    z-index: 999999 !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.06) !important;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.xxiii-word-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #fbfaf5 transparent transparent transparent;
}

.xxiii-word-tooltip::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: #D6D0BE transparent transparent transparent;
}

.xxiii-word:hover .xxiii-word-tooltip,
.xxiii-word:focus .xxiii-word-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-2px);
}

.xxiii-word-tooltip .tooltip-trans {
    font-weight: 700 !important;
    color: #1c1c1c !important;
    font-size: 12px !important;
}

.xxiii-word-tooltip .tooltip-meta {
    font-size: 11px !important;
    color: #7A7568 !important;
    margin-left: 6px !important;
    text-transform: lowercase !important;
    letter-spacing: 0 !important;
    font-weight: 500 !important;
    font-style: italic !important;
}

/* 6. PANEL DE SIGNIFICADO PARA MÓVIL (TAPPING - PERGAMINO OFICIAL #f2f0e2) */
.xxiii-mobile-gloss-sheet {
    display: none;
    margin-top: 12px;
    padding: 8px 12px;
    background: #f2f0e2 !important;
    border-left: 2.5px solid var(--cat-color, #751D2D) !important;
    font-family: 'Wix Madefor Text', sans-serif !important;
    font-size: 12px !important;
    color: #1c1c1c !important;
    line-height: 1.5 !important;
    animation: xxiiiFadeIn 0.2s ease;
}

.xxiii-mobile-gloss-sheet.is-visible {
    display: block;
}

@keyframes xxiiiFadeIn {
    from { opacity: 0; transform: translateY(3px); }
    to { opacity: 1; transform: translateY(0); }
}

/* En dispositivos táctiles pequeños ocultamos tooltips flotantes y mostramos la tarjeta táctil */
@media (max-width: 600px) {
    .xxiii-word-tooltip {
        display: none !important;
    }
}
