/**
 * Estilos públicos ACU Chat
 */

/* Contenedor del botón flotante */
.acu-chat-float-container {
    position: fixed;
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 10px;
}

.acu-chat-float-container.position-bottom-right {
    flex-direction: row;
}

.acu-chat-float-container.position-bottom-left {
    flex-direction: row-reverse;
}

/* Botón flotante */
.acu-chat-float-btn {
    position: relative;
    z-index: 2;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 0;
    flex-shrink: 0;
}

.acu-chat-float-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.acu-chat-float-btn svg {
    width: 60%;
    height: 60%;
}

/* Efecto de pulso con onda */
.acu-chat-float-btn::before,
.acu-chat-float-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: inherit;
    z-index: -1;
    opacity: 0;
}

.acu-chat-float-btn::before {
    animation: acu-chat-wave 2s ease-out infinite;
}

.acu-chat-float-btn::after {
    animation: acu-chat-wave 2s ease-out infinite 1s;
}

@keyframes acu-chat-wave {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

.acu-chat-float-btn:hover::before,
.acu-chat-float-btn:hover::after {
    animation: none;
    opacity: 0;
}

/* CTA Tooltip */
.acu-chat-cta {
    background: #fff;
    color: #333;
    padding: 10px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    position: relative;
    opacity: 0;
    transform: translateX(-20px);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    max-width: 200px;
    white-space: normal;
    text-align: center;
    display: none;
}

.acu-chat-cta.acu-chat-cta-visible {
    display: block;
    animation: acu-chat-cta-appear 0.4s ease forwards;
}

.acu-chat-cta.acu-chat-cta-hiding {
    animation: acu-chat-cta-disappear 0.4s ease forwards;
}

@keyframes acu-chat-cta-disappear {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-20px);
    }
}

.acu-chat-cta:hover {
    background: #f8f8f8;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Flecha del CTA */
.position-bottom-right .acu-chat-cta::after {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    border: 8px solid transparent;
    border-right-color: #fff;
}

.position-bottom-left .acu-chat-cta::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    border: 8px solid transparent;
    border-left-color: #fff;
}

.position-bottom-left .acu-chat-cta {
    transform: translateX(20px);
}

@keyframes acu-chat-cta-appear {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Botón cerrar CTA */
.acu-chat-cta-close {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    background: #555;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 50%;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.acu-chat-cta:hover .acu-chat-cta-close {
    opacity: 1;
}

.acu-chat-cta-close:hover {
    background: #333;
    transform: scale(1.1);
}

/* Botón cerrar flotante */
.acu-chat-close-btn {
    position: fixed;
    z-index: 99999;
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 50%;
    background-color: #25D366;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: transform 0.3s, box-shadow 0.3s;
    color: white;
}

.acu-chat-close-btn:hover {
    transform: scale(1.08) rotate(90deg);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.acu-chat-close-btn svg {
    width: 24px;
    height: 24px;
}

/* Popup */
.acu-chat-popup {
    position: fixed;
    z-index: 99998;
    width: 340px;
    max-width: calc(100vw - 40px);
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    animation: acu-chat-slide-up 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

@keyframes acu-chat-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Popup header */
.acu-chat-popup-header {
    padding: 24px 20px;
    color: white;
    position: relative;
    border-radius: 20px 20px 0 0;
}

.acu-chat-popup-header-content {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.acu-chat-popup-icon {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.acu-chat-popup-icon svg {
    width: 26px;
    height: 26px;
}

.acu-chat-popup-title {
    flex: 1;
    padding-right: 20px;
}

.acu-chat-popup-title h4 {
    margin: 0 0 6px 0;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
}

.acu-chat-popup-title p {
    margin: 0;
    font-size: 13px;
    opacity: 0.92;
    line-height: 1.5;
    font-weight: 400;
}

.acu-chat-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.acu-chat-popup-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.acu-chat-popup-close svg {
    width: 14px;
    height: 14px;
}

/* Popup body */
.acu-chat-popup-body {
    padding: 18px 16px 20px;
}

.acu-chat-popup-response-text {
    color: #8c8c8c;
    font-size: 13px;
    margin: 0 0 16px 0;
    text-align: center;
    font-weight: 400;
}

/* Números en popup */
.acu-chat-popup-numbers {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.acu-chat-popup-number-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #f7f7f7;
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
    border: 1px solid transparent;
}

.acu-chat-popup-number-item:hover {
    background: #f0f0f0;
    border-color: #e0e0e0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.acu-chat-popup-number-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.acu-chat-popup-number-avatar svg {
    width: 24px;
    height: 24px;
}

.acu-chat-popup-number-info {
    flex: 1;
}

.acu-chat-popup-number-name {
    font-weight: 600;
    font-size: 15px;
    color: #1a1a1a;
    display: block;
    line-height: 1.3;
}

.acu-chat-popup-number-icon {
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.acu-chat-popup-number-item:hover .acu-chat-popup-number-icon {
    opacity: 1;
}

.acu-chat-popup-number-icon svg {
    width: 22px;
    height: 22px;
}

/* Shortcode button */
.acu-chat-shortcode-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.acu-chat-shortcode-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    text-decoration: none;
    color: inherit;
}

.acu-chat-shortcode-btn:active {
    transform: translateY(0);
}

.acu-chat-shortcode-btn svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

/* Responsive */
@media (max-width: 480px) {
    .acu-chat-popup {
        width: calc(100vw - 30px);
        left: 15px !important;
        right: 15px !important;
    }
}
