/* Holoments Chat Widget Styles - Corregido */


/* Container principal */

.holoments-chat-container {
    position: fixed;
    bottom: 20px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.holoments-chat-position-right {
    right: 20px;
}

.holoments-chat-position-left {
    left: 20px;
}


/* Botón del chat */

.holoments-chat-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #45d3d3;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.holoments-chat-button:hover {
    background-color: #37b2b2;
    transform: scale(1.05);
}

.holoments-chat-open .holoments-chat-button {
    transform: scale(0.9);
}


/* Iconos */

.holoments-chat-icon {
    font-size: 24px;
}

.holoments-chat-svg-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.holoments-chat-svg-icon img,
.holoments-chat-svg-icon .svg-icon {
    max-width: 60%;
    max-height: 60%;
    width: 24px !important;
    height: 24px !important;
    filter: brightness(0) invert(1);
    object-fit: contain;
}


/* Popup del chat */

.holoments-chat-popup {
    position: absolute;
    bottom: 80px;
    width: var(--holoments-chat-window-width, 350px);
    height: var(--holoments-chat-window-height, 500px);
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.holoments-chat-position-right .holoments-chat-popup {
    right: 0;
}

.holoments-chat-position-left .holoments-chat-popup {
    left: 0;
}

.holoments-chat-popup-open {
    opacity: 1;
    transform: translateY(0);
}


/* Header del chat */

.holoments-chat-header {
    height: var(--holoments-chat-header-height, 60px);
    min-height: var(--holoments-chat-header-height, 60px);
    background-color: var(--holoments-chat-primary-color, #45d3d3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.holoments-chat-title {
    font-weight: bold;
    font-size: 16px;
}


/* Botón de cerrar */

.holoments-chat-close {
    background: none;
    border: none;
    color: white;
    font-size: var(--holoments-chat-close-size, 24px);
    width: 30px;
    height: 30px;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.2s ease;
    border-radius: 50%;
}

.holoments-chat-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}


/* Contenedor del iframe */

.holoments-chat-frame-container {
    flex: 1;
    position: relative;
    overflow: hidden;
}

#holoments-chat-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    background-color: #fff;
    transform-origin: top left;
}


/* Indicador de carga */

.holoments-chat-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    z-index: 1;
}

.holoments-chat-loading::after {
    content: "";
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #45d3d3;
    border-radius: 50%;
    animation: holoments-chat-spin 1s linear infinite;
}

@keyframes holoments-chat-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}


/* Variables CSS personalizadas */

:root {
    --holoments-chat-send-button-color: #45d3d3;
    --holoments-chat-header-height: 60px;
    --holoments-chat-close-size: 24px;
    --holoments-chat-window-width: 350px;
    --holoments-chat-window-height: 500px;
}


/* Modo fullscreen para móviles */

.holoments-chat-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 0 !important;
    z-index: 999999 !important;
    transform: none !important;
}

.holoments-chat-noscroll {
    overflow: hidden !important;
}


/* Responsividad móvil */

@media (max-width: 480px) {
    .holoments-chat-popup {
        width: 100%;
        height: 80vh;
        position: fixed;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        border-radius: 12px 12px 0 0;
    }
    .holoments-chat-mobile .holoments-chat-button {
        width: 50px;
        height: 50px;
    }
    .holoments-chat-mobile .holoments-chat-icon {
        font-size: 20px;
    }
    .holoments-chat-container.holoments-chat-fullscreen-enabled .holoments-chat-popup.holoments-chat-fullscreen {
        animation: slideToFullscreen 0.3s ease-in-out forwards;
    }
}

@keyframes slideToFullscreen {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(0);
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
}