/* ===================================================================
   POPOVER DE GUÍA DE AUDIOS - RESPIRACCIÓN
   Tooltip educativo contextual que aparece junto al reproductor
   =================================================================== */

/* ===== VARIABLES DE MARCA ===== */
:root {
    --respiraccion-primary: #25c2f2;
    --respiraccion-secondary: #79afd2;
    --respiraccion-accent: #295a99;
    --respiraccion-bg: #f0f8ff;
    --respiraccion-surface: #ffffff;
    --respiraccion-border: #b0cce1;
    --respiraccion-text: #011f3a;
    --respiraccion-text-muted: #295a99;
    --respiraccion-shadow: 0 8px 24px rgba(37, 194, 242, 0.3), 0 2px 8px rgba(0,0,0,0.1);
    --respiraccion-radius: 12px;
}

/* ===== CONTENEDOR DEL POPOVER ===== */
.respiraccion-audio-guide-modal {
    position: absolute;
    z-index: 999999;
    display: none;
    animation: slideDown 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Sin overlay, solo el popover contextual */
.respiraccion-audio-guide-overlay {
    display: none;
}

/* ===== CONTENIDO DEL POPOVER ===== */
.respiraccion-audio-guide-content {
    position: relative;
    background: linear-gradient(135deg, var(--respiraccion-bg) 0%, #ffffff 100%);
    border-radius: var(--respiraccion-radius);
    box-shadow: var(--respiraccion-shadow);
    max-width: 340px;
    width: max-content;
    min-width: 260px;
    border: 3px solid var(--respiraccion-primary);
}

/* ===== FLECHA APUNTANDO AL BOTÓN ===== */
.respiraccion-audio-guide-content {
    --arrow-position: 50%; /* Default centrado, se sobrescribe con JS */
}

.respiraccion-audio-guide-content::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: var(--arrow-position, 50%);
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 15px solid var(--respiraccion-primary);
    filter: drop-shadow(0 3px 4px rgba(0,0,0,0.1));
}

.respiraccion-audio-guide-content::before {
    content: '';
    position: absolute;
    bottom: -11px;
    left: var(--arrow-position, 50%);
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 13px solid transparent;
    border-right: 13px solid transparent;
    border-top: 13px solid var(--respiraccion-bg);
    z-index: 1;
}

/* ===== BOTÓN CERRAR (ESTILO BOTÓN-PERFECTO MARRÓN) ===== */
.respiraccion-audio-guide-close {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: var(--color-beige-claro-boton, #E1C9A6) !important;
    border: 2px solid var(--color-beige-oscuro-borde-boton, #C8A87E) !important;
    color: var(--color-azul-grisaceo-texto-boton, #2A3D4F) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease-in-out !important;
    z-index: 10 !important;
    box-shadow: 0 2px 8px rgba(200, 168, 126, 0.3) !important;
}

.respiraccion-audio-guide-close svg {
    width: 16px !important;
    height: 16px !important;
}

.respiraccion-audio-guide-close:hover {
    background: var(--color-beige-oscuro-borde-boton, #C8A87E) !important;
    border-color: var(--color-primario-principal-calma, #79afd2) !important;
    color: var(--color-blanco-puro, #ffffff) !important;
    transform: rotate(90deg) translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(121, 175, 210, 0.4) !important;
}

.respiraccion-audio-guide-close:active {
    transform: rotate(90deg) scale(0.95) !important;
    box-shadow: 0 2px 6px rgba(200, 168, 126, 0.3) !important;
}

/* ===== HEADER COMPACTO ===== */
.respiraccion-audio-guide-header {
    text-align: left;
    padding: 20px 20px 16px;
    background: linear-gradient(135deg, var(--respiraccion-primary) 0%, var(--respiraccion-secondary) 100%);
    color: white;
    border-radius: var(--respiraccion-radius) var(--respiraccion-radius) 0 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.respiraccion-audio-guide-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: gentlePulse 2s ease-in-out infinite;
}

.respiraccion-audio-guide-icon svg {
    width: 28px;
    height: 28px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.respiraccion-audio-guide-header-text {
    flex: 1;
}

.respiraccion-audio-guide-header h2 {
    margin: 0 0 4px 0;
    font-size: 1.2rem;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.respiraccion-audio-guide-subtitle {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.95;
    font-weight: 400;
}

/* ===== BODY COMPACTO ===== */
.respiraccion-audio-guide-body {
    padding: 20px;
}

/* ===== TEXTO PRINCIPAL ===== */
.respiraccion-audio-guide-main-text {
    color: var(--respiraccion-text);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 0 16px 0;
}

.respiraccion-audio-guide-main-text strong {
    color: var(--respiraccion-accent);
    font-weight: 600;
}

/* ===== STEPS COMPACTOS ===== */
.respiraccion-audio-guide-step {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    align-items: flex-start;
}

.respiraccion-audio-guide-step:last-child {
    margin-bottom: 0;
}

.respiraccion-audio-guide-step-icon {
    flex-shrink: 0;
    font-size: 1.3rem;
    line-height: 1;
}

.respiraccion-audio-guide-step-content {
    flex: 1;
}

.respiraccion-audio-guide-step-content strong {
    display: block;
    color: var(--respiraccion-accent);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.respiraccion-audio-guide-step-content p {
    margin: 0;
    color: var(--respiraccion-text);
    line-height: 1.4;
    font-size: 0.85rem;
}

/* ===== FOOTER COMPACTO ===== */
.respiraccion-audio-guide-footer {
    padding: 12px 16px;
    text-align: center;
    border-top: 1px solid var(--respiraccion-border);
    background: rgba(255, 255, 255, 0.5);
}

/* BOTÓN CTA - ESTILO BOTÓN PERFECTO 2 */
.respiraccion-audio-guide-cta {
    background: linear-gradient(135deg, #25c2f2 0%, #79afd2 100%) !important;
    border: 2px solid #25c2f2 !important;
    color: white !important;
    font-weight: 700 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
    box-shadow: 0 4px 15px rgba(37, 194, 242, 0.3) !important;
    border-radius: 30px !important;
    padding: 14px 28px !important;
    font-size: 16px !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    display: block !important;
    margin: 0 auto !important;
    width: fit-content !important;
    position: relative !important;
    animation: perfectButtonGlow 3s ease-in-out infinite !important;
}

.respiraccion-audio-guide-cta::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%) !important;
    border-radius: 30px !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
    pointer-events: none !important;
}

.respiraccion-audio-guide-cta:hover {
    background: linear-gradient(135deg, #79afd2 0%, #295a99 100%) !important;
    border-color: #79afd2 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(37, 194, 242, 0.4) !important;
}

.respiraccion-audio-guide-cta:hover::before {
    opacity: 1 !important;
}

.respiraccion-audio-guide-cta:active {
    transform: translateY(0) scale(0.98) !important;
    box-shadow: 0 4px 15px rgba(37, 194, 242, 0.3) !important;
}

@keyframes perfectButtonGlow {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(37, 194, 242, 0.3) !important;
    }
    50% {
        box-shadow: 0 4px 20px rgba(37, 194, 242, 0.5) !important;
    }
}

/* ===== ANIMACIONES ===== */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gentlePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 6px rgba(255, 255, 255, 0);
    }
}

/* ===== RESPONSIVE DESIGN ===== */

/* Mobile */
@media screen and (max-width: 480px) {
    .respiraccion-audio-guide-content {
        max-width: 220px;
        min-width: 200px;
    }
    
    .respiraccion-audio-guide-header {
        padding: 8px;
        gap: 6px;
    }
    
    .respiraccion-audio-guide-icon {
        width: 28px;
        height: 28px;
    }
    
    .respiraccion-audio-guide-icon svg {
        width: 16px;
        height: 16px;
    }
    
    .respiraccion-audio-guide-header h2 {
        font-size: 0.8rem;
        margin: 0;
    }
    
    .respiraccion-audio-guide-subtitle {
        font-size: 0.65rem;
    }
    
    .respiraccion-audio-guide-body {
        padding: 8px;
    }
    
    .respiraccion-audio-guide-main-text {
        font-size: 0.7rem;
        margin-bottom: 8px;
    }
    
    .respiraccion-audio-guide-step {
        gap: 6px;
        margin-bottom: 6px;
    }
    
    .respiraccion-audio-guide-step-icon {
        font-size: 0.9rem;
    }
    
    .respiraccion-audio-guide-step-content strong {
        font-size: 0.7rem;
    }
    
    .respiraccion-audio-guide-step-content p {
        font-size: 0.6rem;
    }
    
    .respiraccion-audio-guide-footer {
        padding: 8px;
    }
    
    .respiraccion-audio-guide-cta {
        padding: 8px 16px;
        font-size: 11px;
    }
    
    .respiraccion-audio-guide-close {
        width: 26px;
        height: 26px;
        top: 6px;
        right: 6px;
    }
    
    .respiraccion-audio-guide-close svg {
        width: 13px;
        height: 13px;
    }
    
    /* Flecha más pequeña en móvil */
    .respiraccion-audio-guide-content::after {
        border-left: 10px solid transparent;
        border-right: 10px solid transparent;
        border-top: 10px solid var(--respiraccion-primary);
        bottom: -10px;
    }
    
    .respiraccion-audio-guide-content::before {
        border-left: 8px solid transparent;
        border-right: 8px solid transparent;
        border-top: 8px solid var(--respiraccion-bg);
        bottom: -7px;
    }
}

