:root {
    --lime: #CADA00;
    --lime-hover: #e3f70a;
    --lime-ink: #0D0D0D;
    --gray: #232323;
    --radius-pill: 10px;
    --radius-card: 8px;
    --shadow-soft: 0 8px 18px rgba(0, 0, 0, .28);
    --shadow-lift: 0 14px 26px rgba(0, 0, 0, .35);
}

/* ===== Contenedor flotante ===== */
.contact-widget {
    position: fixed;
    left: 50%;
    bottom: clamp(12px, 3vh, 28px);
    transform: translateX(-50%);
    z-index: 9999;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    font-family: "Inter", sans-serif;
}

/* ===== MOBILE (por defecto) ===== */
.cw-mobile {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--lime);
    color: var(--lime-ink);
    border-radius: 14px;
    padding: 12px 15px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 0, 0, .06);
}

.cw-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    padding: 6px 8px;
    border-radius: var(--radius-pill);
}

.cw-ico {
    display: inline-flex;
}

.cw-ico svg {
    width: 22px;
    height: 22px;
    fill: var(--lime-ink);
    transition: fill .18s ease, transform .18s ease;
}

.cw-text {
    font-weight: 600;
    font-size: 16px;
    letter-spacing: .2px;
    transition: color .18s ease;
}

.cw-divider {
    width: 2px;
    height: 25px;
    background: rgba(0, 0, 0, .35);
    display: inline-block;
}

.cw-actions {
    display: inline-flex;
    gap: 10px;
    width: 45%;
}

.cw-btn {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    text-decoration: none;
}

.cw-btn svg {
    width: 22px;
    height: 22px;
    fill: #0A0A0A;
    transition: fill .18s ease, transform .18s ease;
}

/* ===== DESKTOP/TABLET (estructura) ===== */
.cw-desktop {
    display: none;
    align-items: center;
    gap: 12px;
}

.cw-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
    transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.cw-card--wa {
    background: var(--lime);
    color: #000;
    border: 1px solid rgba(0, 0, 0, .07);
    text-decoration: none;
    transition: color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.cw-card--wa .cw-ico.lg svg {
    width: 32px;
    height: 32px;
    fill: #000;
    transition: fill .18s ease, transform .18s ease;
}

.cw-title {
    font-size: 20px;
    font-weight: 700;
    transition: color .18s ease;
}

.cw-card--actions {
    background: var(--lime);
    border: 1px solid rgba(0, 0, 0, .06);
    padding: 8px 12px;
    gap: 18px;
}

.cw-card--actions .cw-btn {
    width: 34px;
    height: 34px;
}

.cw-card--actions .cw-btn svg {
    width: 25px;
    height: 25px;
    fill: #0A0A0A;
    transition: fill .18s ease, transform .18s ease;
}

/* ===== Transiciones base ===== */
.cw-chip,
.cw-btn,
.cw-card {
    transition: background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

/* ===== Estados de foco (accesible en todos los tamaños) ===== */
.cw-chip:focus-visible,
.cw-btn:focus-visible,
.cw-card:focus-visible {
    outline: 2px solid #000;
    outline-offset: 2px;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lift);
}

/* ===== Breakpoints ===== */
/* Mostrar desktop también en TABLET */
@media (min-width: 768px) {
    .cw-mobile {
        display: none;
    }

    .cw-desktop {
        display: flex;
    }

    /* --- HOVER & ACTIVE SOLO EN DESKTOP/TABLET --- */
    /* Hover general (acciones y chip si existe en markup) */
    .cw-chip:hover,
    .cw-btn:hover,
    .cw-card--actions:hover {
        background-color: var(--lime-hover);
        box-shadow: var(--shadow-lift);
        transform: translateY(-2px);
    }

    .cw-chip:hover .cw-ico svg,
    .cw-btn:hover svg,
    .cw-card:hover svg {
        transform: scale(1.06);
    }

    /* WhatsApp desktop/tablet: solo color de texto e ícono (fondo gris se mantiene) */
    .cw-card--wa:hover {
        background-color: var(--gray) !important;
        color: var(--lime-hover) !important;
        transform: translateY(-2px);
        box-shadow: var(--shadow-lift);
    }

    .cw-card--wa:hover .cw-title {
        color: var(--lime-hover) !important;
    }

    .cw-card--wa:hover .cw-ico.lg svg {
        fill: var(--lime-hover) !important;
        transform: scale(1.06);
    }

    /* Activo (click) */
    .cw-chip:active,
    .cw-btn:active,
    .cw-card:active {
        transform: translateY(0) scale(.98);
        box-shadow: var(--shadow-soft);
    }
}

/* Móvil puro (<768px) */
@media (max-width: 767.98px) {
    .contact-widget {
        width: 86%;
    }

    .contact-widget a {
        color: #000;
        width: 49%;
    }

    .cw-text {
        font-size: 14px;
    }
}

/* Accesibilidad: reduce motion */
@media (prefers-reduced-motion: reduce) {

    .cw-chip,
    .cw-btn,
    .cw-card {
        transition: background-color .18s ease, box-shadow .18s ease;
    }

    @media (min-width: 768px) {

        .cw-chip:hover,
        .cw-btn:hover,
        .cw-card:hover {
            transform: none;
        }

        .cw-chip:hover .cw-ico svg,
        .cw-btn:hover svg,
        .cw-card:hover svg {
            transform: none;
        }
    }
}