/* DSEO Premium Suite — botón flotante de WhatsApp. Todo prefijado .dseo-wa- (sin selectores globales). */

.dseo-wa {
    position: fixed;
    z-index: var(--dseo-wa-z, 99999);
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0;
    border: 0;
    text-decoration: none;
    cursor: pointer;
    background: var(--dseo-wa-bg, #25D366);
    color: var(--dseo-wa-icon, #ffffff);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
}

.dseo-wa * { box-sizing: border-box; }

.dseo-wa__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: var(--dseo-wa-icon, #ffffff);
}

.dseo-wa__icon svg { width: 100%; height: 100%; display: block; fill: currentColor; }

.dseo-wa__text {
    color: var(--dseo-wa-text, #ffffff);
    font-weight: 600;
    white-space: nowrap;
}

.dseo-wa--circle {
    width: var(--dseo-wa-size, 56px);
    height: var(--dseo-wa-size, 56px);
    border-radius: 50%;
    padding: 0;
}
.dseo-wa--circle .dseo-wa__icon { width: 56%; height: 56%; }

.dseo-wa--rect {
    height: var(--dseo-wa-size, 56px);
    border-radius: 9999px;
    padding: 0 22px 0 18px;
}
.dseo-wa--rect .dseo-wa__icon {
    width: calc(var(--dseo-wa-size, 56px) * 0.5);
    height: calc(var(--dseo-wa-size, 56px) * 0.5);
}

/* El icono (logo con su propio fondo) llena el botón: sin fondo ni recorte propios; la forma la da el SVG. */
.dseo-wa--fill {
    background: transparent;
    padding: 0;
    border-radius: 0;
    width: var(--dseo-wa-size, 56px);
    height: var(--dseo-wa-size, 56px);
}
.dseo-wa--fill .dseo-wa__icon { width: 100%; height: 100%; }

/* Variante inline (shortcode [dseo_whatsapp]). */
.dseo-wa--inline { position: static; vertical-align: middle; }
/* Envoltorio del shortcode CON consentimiento: da la referencia para anclar el panel al botón. */
.dseo-wa-inline-wrap { position: relative; display: inline-block; }

.dseo-wa--shadow { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28); }
.dseo-wa--fill.dseo-wa--shadow { box-shadow: none; }
.dseo-wa--fill.dseo-wa--shadow .dseo-wa__icon { filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.28)); }

.dseo-wa__badge {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: #ef4444;
    color: #ffffff;
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    padding: 3px 7px;
    border-radius: 9999px;
    white-space: nowrap;
}

/* Animaciones (ligeras). */
.dseo-wa--anim-hover { transition: transform 0.18s ease, box-shadow 0.18s ease; }
.dseo-wa--anim-hover:hover { transform: scale(1.07); }

.dseo-wa--anim-bounce { animation: dseo-wa-bounce 2.6s ease-in-out infinite; }
.dseo-wa--anim-pulse { animation: dseo-wa-pulse 2.2s ease-out infinite; }

@keyframes dseo-wa-bounce {
    0%, 55%, 100% { transform: translateY(0); }
    30% { transform: translateY(-7px); }
    42% { transform: translateY(-3px); }
}
@keyframes dseo-wa-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.45); }
    70%  { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .dseo-wa { animation: none !important; transition: none !important; }
}

/* Burbuja de saludo. */
.dseo-wa-bubble {
    position: fixed;
    display: none;
    max-width: 230px;
    box-sizing: border-box;
    background: #ffffff;
    color: #111827;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    padding: 12px 30px 12px 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
}
.dseo-wa-bubble.is-visible { display: block; animation: dseo-wa-bubble-in 0.25s ease; }
.dseo-wa-bubble__msg { color: #111827; text-decoration: none; display: block; }
.dseo-wa-bubble__msg:hover { text-decoration: underline; }
.dseo-wa-bubble__close {
    position: absolute;
    top: 5px;
    right: 8px;
    border: 0;
    background: none;
    font-size: 17px;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
    padding: 2px 4px;
}
.dseo-wa-bubble__close:hover { color: #374151; }
@keyframes dseo-wa-bubble-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .dseo-wa-bubble.is-visible { animation: none; }
}

/* Panel de consentimiento de privacidad. Sale oculto del servidor (hidden): sin JavaScript no
   aparece y el botón conserva su enlace directo a wa.me. Toma los colores y el z-index del botón. */
.dseo-wa-consent {
    position: fixed;
    display: none;
    box-sizing: border-box;
    width: 320px;
    max-width: calc(100vw - 24px);
    background: #ffffff;
    color: #111827;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
    padding: 16px 16px 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.45;
    text-align: left;
}
.dseo-wa-consent.is-open { display: block; animation: dseo-wa-bubble-in 0.22s ease; }
.dseo-wa-consent * { box-sizing: border-box; }

/* Variante del shortcode: anclado al propio botón, no a una esquina de la pantalla. */
.dseo-wa-consent--inline {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 0;
    right: auto;
}

.dseo-wa-consent__title {
    margin: 0 22px 10px 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    color: inherit;
}
.dseo-wa-consent__check {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 0 0 14px;
    cursor: pointer;
}
.dseo-wa-consent__input {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    margin: 1px 0 0;
    accent-color: var(--dseo-wa-bg, #25D366);
}
.dseo-wa-consent__label { flex: 1 1 auto; min-width: 0; }
.dseo-wa-consent__link { color: inherit; font-weight: 600; text-decoration: underline; }
.dseo-wa-consent__go {
    display: block;
    width: 100%;
    border: 0;
    border-radius: 9999px;
    padding: 11px 14px;
    background: var(--dseo-wa-bg, #25D366);
    color: var(--dseo-wa-text, #ffffff);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
}
.dseo-wa-consent__go[disabled] { opacity: 0.5; cursor: not-allowed; }
.dseo-wa-consent__close {
    position: absolute;
    top: 5px;
    right: 8px;
    border: 0;
    background: none;
    font-size: 19px;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
    padding: 2px 5px;
}
.dseo-wa-consent__close:hover { color: #374151; }

@media (prefers-reduced-motion: reduce) {
    .dseo-wa-consent.is-open { animation: none; }
}
