/*
|--------------------------------------------------------------------------
| OLEVAN CHAT - ESTILOS PRINCIPALES
|--------------------------------------------------------------------------
*/

* {
    box-sizing: border-box;
}


/*
|--------------------------------------------------------------------------
| PÁGINA
|--------------------------------------------------------------------------
*/

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}

body.olevan-chat-body {
    margin: 0;
    background: #e9edef;
    font-family: Arial, Helvetica, sans-serif;
    color: #111b21;
}


/*
|--------------------------------------------------------------------------
| CONTENEDOR PRINCIPAL
|--------------------------------------------------------------------------
*/

#olevan-chat-app {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}


/*
|--------------------------------------------------------------------------
| ENCABEZADO
|--------------------------------------------------------------------------
*/

.chat-header {
    height: 64px;
    min-height: 64px;

    display: flex;
    align-items: center;

    padding: 0 24px;

    background: #ffffff;

    border-bottom: 1px solid #dfe3e5;

    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);

    z-index: 10;
}

.chat-header h1 {
    margin: 0;

    font-size: 20px;

    font-weight: 700;

    letter-spacing: 0.3px;
}


/*
|--------------------------------------------------------------------------
| ÁREA DE MENSAJES
|--------------------------------------------------------------------------
*/

.chat-messages {
    flex: 1;

    width: 100%;

    overflow-y: auto;

    padding: 30px;

    background:
        radial-gradient(
            circle at 20% 20%,
            rgba(255, 255, 255, 0.7),
            transparent 25%
        ),
        #e9edef;
}


/*
|--------------------------------------------------------------------------
| MENSAJE DE BIENVENIDA
|--------------------------------------------------------------------------
*/

.welcome-message {
    width: min(600px, 100%);

    margin: 60px auto;

    padding: 35px;

    background: #ffffff;

    border-radius: 12px;

    text-align: center;

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.08);
}

.welcome-message h2 {
    margin: 0 0 12px;

    font-size: 25px;
}

.welcome-message p {
    margin: 0;

    color: #667781;

    font-size: 16px;

    line-height: 1.6;
}


/*
|--------------------------------------------------------------------------
| PIE DEL CHAT
|--------------------------------------------------------------------------
*/

.chat-footer {
    min-height: 52px;

    display: flex;

    align-items: center;

    justify-content: center;

    background: #ffffff;

    border-top: 1px solid #dfe3e5;
}

.chat-footer p {
    margin: 0;

    color: #667781;

    font-size: 13px;
}


/*
|--------------------------------------------------------------------------
| BARRA DE DESPLAZAMIENTO
|--------------------------------------------------------------------------
*/

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #c5c9cc;

    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #aeb3b6;
}


/*
|--------------------------------------------------------------------------
| CELULARES
|--------------------------------------------------------------------------
*/

@media (max-width: 700px) {

    .chat-header {
        height: 58px;
        min-height: 58px;

        padding: 0 16px;
    }

    .chat-header h1 {
        font-size: 18px;
    }

    .chat-messages {
        padding: 18px 12px;
    }

    .welcome-message {
        margin: 30px auto;

        padding: 28px 20px;
    }

    .welcome-message h2 {
        font-size: 22px;
    }

    .welcome-message p {
        font-size: 15px;
    }

}

/*
|--------------------------------------------------------------------------
| ENCABEZADO DEL PRODUCTO
|--------------------------------------------------------------------------
*/

.chat-header-product {
    display: flex;

    align-items: center;

    gap: 12px;
}

.product-avatar {
    width: 42px;
    height: 42px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #d9fdd3;

    color: #111b21;

    font-size: 14px;

    font-weight: 700;
}

.product-header-info h1 {
    margin: 0;

    font-size: 18px;

    font-weight: 700;
}

.product-header-info span {
    display: block;

    margin-top: 3px;

    color: #667781;

    font-size: 13px;
}


/*
|--------------------------------------------------------------------------
| MENSAJES
|--------------------------------------------------------------------------
*/

.chat-message {
    width: min(650px, 85%);

    margin: 0 auto 18px;

    display: flex;

    flex-direction: column;

    align-items: flex-start;
}


/*
|--------------------------------------------------------------------------
| BURBUJA
|--------------------------------------------------------------------------
*/

.message-bubble {
    position: relative;

    max-width: 100%;

    padding: 12px 14px 8px;

    background: #ffffff;

    border-radius: 10px;

    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.08);
}

.message-bubble p {
    margin: 0;

    font-size: 15px;

    line-height: 1.5;

    white-space: pre-wrap;
}


/*
|--------------------------------------------------------------------------
| HORA DEL MENSAJE
|--------------------------------------------------------------------------
*/

.message-time {
    margin-top: 5px;

    text-align: right;

    color: #667781;

    font-size: 11px;
}


/*
|--------------------------------------------------------------------------
| BOTONES DEL MENSAJE
|--------------------------------------------------------------------------
*/

.message-actions {
    display: flex;

    gap: 6px;

    margin-top: 6px;
}

.message-actions button {
    border: 1px solid #d5d9dc;

    background: #ffffff;

    color: #4f5b61;

    padding: 5px 9px;

    border-radius: 6px;

    font-size: 12px;

    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}

.message-actions button:hover {
    background: #f0f2f5;

    border-color: #bfc5c9;
}


/*
|--------------------------------------------------------------------------
| MENSAJES EN PANTALLAS PEQUEÑAS
|--------------------------------------------------------------------------
*/

@media (max-width: 700px) {

    .chat-message {
        width: 95%;
    }

    .message-bubble p {
        font-size: 15px;
    }

}

assets/css/chat.css

/*
|--------------------------------------------------------------------------
| MENSAJES DE AUDIO
|--------------------------------------------------------------------------
*/

.chat-message-audio {
    max-width: 650px;
}


.audio-bubble {
    width: 100%;

    padding: 12px;
}


.chat-audio {
    display: block;

    width: 100%;

    max-width: 520px;
}


/*
|--------------------------------------------------------------------------
| BOTÓN DESCARGAR AUDIO
|--------------------------------------------------------------------------
*/

.message-actions a.download-audio {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    border: 1px solid #d5d9dc;

    background: #ffffff;

    color: #4f5b61;

    padding: 5px 9px;

    border-radius: 6px;

    font-size: 12px;

    text-decoration: none;

    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}


.message-actions a.download-audio:hover {

    background: #f0f2f5;

    border-color: #bfc5c9;

}


/*
|--------------------------------------------------------------------------
| AUDIO EN CELULAR
|--------------------------------------------------------------------------
*/

@media (max-width: 700px) {

    .chat-message-audio {
        width: 95%;
    }

    .chat-audio {
        max-width: 100%;
    }

}

/*
|--------------------------------------------------------------------------
| MENSAJES DE VIDEO
|--------------------------------------------------------------------------
*/

.chat-message-video {
    max-width: 650px;
}


.video-bubble {
    width: 100%;

    padding: 6px;

    overflow: hidden;
}


.chat-video {
    display: block;

    width: 100%;

    max-width: 620px;

    height: auto;

    border-radius: 7px;

    background: #000000;
}


/*
|--------------------------------------------------------------------------
| BOTÓN DESCARGAR VIDEO
|--------------------------------------------------------------------------
*/

.message-actions a.download-video {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    border: 1px solid #d5d9dc;

    background: #ffffff;

    color: #4f5b61;

    padding: 5px 9px;

    border-radius: 6px;

    font-size: 12px;

    text-decoration: none;

    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}


.message-actions a.download-video:hover {

    background: #f0f2f5;

    border-color: #bfc5c9;

}


/*
|--------------------------------------------------------------------------
| VIDEO EN CELULAR
|--------------------------------------------------------------------------
*/

@media (max-width: 700px) {

    .chat-message-video {
        width: 95%;
    }

    .chat-video {
        max-width: 100%;
    }

}

/*
|--------------------------------------------------------------------------
| MENSAJES DE DOCUMENTOS
|--------------------------------------------------------------------------
*/

.chat-message-document {
    max-width: 650px;
}


.document-bubble {

    display: flex;

    align-items: center;

    gap: 12px;

    width: 100%;

    padding: 14px;

}


/*
|--------------------------------------------------------------------------
| ICONO DEL DOCUMENTO
|--------------------------------------------------------------------------
*/

.document-icon {

    width: 48px;

    height: 48px;

    flex-shrink: 0;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 8px;

    background: #f1f3f5;

    font-size: 27px;

}


/*
|--------------------------------------------------------------------------
| INFORMACIÓN
|--------------------------------------------------------------------------
*/

.document-info {

    min-width: 0;

    flex: 1;

}


.document-name {

    font-size: 15px;

    font-weight: 600;

    color: #111b21;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;

}


.document-type {

    margin-top: 4px;

    font-size: 12px;

    color: #667781;

}


/*
|--------------------------------------------------------------------------
| BOTONES
|--------------------------------------------------------------------------
*/

.message-actions a.open-document,
.message-actions a.download-document {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    border: 1px solid #d5d9dc;

    background: #ffffff;

    color: #4f5b61;

    padding: 5px 9px;

    border-radius: 6px;

    font-size: 12px;

    text-decoration: none;

    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease;

}


.message-actions a.open-document:hover,
.message-actions a.download-document:hover {

    background: #f0f2f5;

    border-color: #bfc5c9;

}


/*
|--------------------------------------------------------------------------
| DOCUMENTOS EN CELULAR
|--------------------------------------------------------------------------
*/

@media (max-width: 700px) {

    .chat-message-document {

        width: 95%;

    }


    .document-bubble {

        padding: 12px;

    }


    .document-name {

        font-size: 14px;

    }

}

/*
|--------------------------------------------------------------------------
| OLEVAN CHAT - CORRECCIÓN DEL ÁREA DE MENSAJES
|--------------------------------------------------------------------------
| Permite visualizar y desplazar todos los mensajes del producto.
|--------------------------------------------------------------------------
*/

html,
body {
    height: 100%;
}


body.olevan-chat-body {
    margin: 0;
    padding: 0;
    overflow: hidden;
}


#olevan-chat-app {
    min-height: 100vh;
    height: 100vh;
    display: flex;
    flex-direction: column;
}


.chat-layout {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}


.chat-messages {
    flex: 1;
    min-height: 0;
    height: auto;

    overflow-y: auto;
    overflow-x: hidden;

    padding-bottom: 30px;

    scroll-behavior: smooth;
}


/*
|--------------------------------------------------------------------------
| CADA MENSAJE DEBE CONSERVAR SU ALTURA
|--------------------------------------------------------------------------
*/

.chat-message {
    flex-shrink: 0;
}


/*
|--------------------------------------------------------------------------
| IMÁGENES
|--------------------------------------------------------------------------
*/

.chat-image {
    max-width: 100%;
    height: auto;
    display: block;
}


/*
|--------------------------------------------------------------------------
| EVITAR QUE LOS ELEMENTOS INTERNOS SE CORTEN
|--------------------------------------------------------------------------
*/

.message-bubble {
    overflow: visible;
}


/*
|--------------------------------------------------------------------------
| BARRA DE DESPLAZAMIENTO
|--------------------------------------------------------------------------
*/

.chat-messages::-webkit-scrollbar {
    width: 8px;
}


.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}


.chat-messages::-webkit-scrollbar-thumb {
    background: #c8c8c8;
    border-radius: 10px;
}


.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #999999;
}