/*body.clinia {*/
/*    background-color: cadetblue;*/
/*    font-family: "Merriweather", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";*/
/*    font-weight: 400;*/
/*    line-height: 1.5;*/
/*}*/


body.clinia.bg-gray-900 {
    background-color: #0d1116 !important;
}


@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

div.loader {
    border-top-color: #3498db !important;
    animation: spin 1s linear infinite;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.5s;
}

.pulse-effect::after {
    content: '●';
    font-size: 0.8em;
    animation: pulseAnimation 1s infinite;
    opacity: 0;
    margin-left: 5px;
}

@keyframes pulseAnimation {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
}


span.pulse-effect {
    font-size: 25px;
}

/*++++++++++++++++++++*/
/* Estilo base para la columna de chatbot */
.robot-column {
    padding: 0.75rem;
    max-width: 16rem;
    overflow-x: auto;
    font-family: 'Roboto', sans-serif; /* Usar la fuente Roboto */
    font-size: 1.1rem; /* Tamaño de fuente ligeramente más grande */
    line-height: 1.6; /* Espaciado de línea optimizado para lectura */
    border-radius: 4px;
    position: relative;
    text-align: justify;
    border: 2px solid #000;
    padding-top: 30px;
    padding-bottom: 35px;
}


/* Estilo para el modo claro */
.robot-column.light-theme {
    background-color: #edf9ff;
    color: #333;
}

/* Estilo para el modo oscuro */
.robot-column.dark-theme {
    background-color: #1c1c1c;
    color: #ECEFF1;
}

/* Ícono de bot médico - Asumiendo que hay un ícono de robot médico en Font Awesome */
.robot-column::before {
    content: '\f468'; /* Este es un ejemplo, reemplaza con el código Unicode correcto del ícono que elijas */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 5px;
    left: 5px;
    font-size: 1.2rem;
    color: #757575;
}

/* Descripción de que es la respuesta de un robot */
.robot-column::after {
    content: 'Respuesta de la IA Médica';
    font-size: 0.7rem;
    position: absolute;
    bottom: 5px;
    right: 5px;
    color: #999;
}

.robot-column.dark-theme::after {
    color: #ECEFF1;
}


.clinia-icon {
    height: 150px
}
.icons {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    height: 200px;
    margin-bottom: 50px;
    background: #ffffff38;
    padding: 25px;
}

.icons img{
    display: inline-block;
    height: 90px;
    margin: 0 auto;
    position: relative;
    vertical-align: super;
}
/*++++++++++++++++++++++*/
/* Estilos base para el textarea */
/* Limitar el redimensionamiento del textarea */

#chat-column{
    flex: 0.3;
}


.chat-textarea {
    max-height: 150px; /* Puedes ajustar este valor según tus necesidades */
    height: 150px;
    width: 100%;
    border-radius: 0.5rem;
    padding: 0.5rem;
    transition: background-color 0.3s, color 0.3s;
}

/* Estilo para el tema oscuro */
body.bg-gray-900 .chat-textarea {
    background-color: #2D3748; /* Color de fondo oscuro para el textarea */
    color: #E2E8F0; /* Color de texto claro para el textarea */
}

/* Estilo para el tema claro */
body.bg-white .chat-textarea {
    background-color: #EDF2F7; /* Color de fondo claro para el textarea */
    color: #2D3748; /* Color de texto oscuro para el textarea */
}

/*++++++++++++++++++++++++*/
/* Estilo general para las barras de desplazamiento */
::-webkit-scrollbar {
    width: 10px;
}

/* Estilo para el pulgar (la parte móvil) de la barra */
::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 10px;
    transition: background-color 0.3s;
}

/* Estilo para el pulgar en hover (cuando el mouse está encima) */
::-webkit-scrollbar-thumb:hover {
    background-color: #999;
}

/* Estilo para la pista (la parte inmóvil) de la barra */
::-webkit-scrollbar-track {
    background-color: #f1f1f1;
    border-radius: 10px;
}

/* Estilos específicos para el tema oscuro */
body.bg-gray-900::-webkit-scrollbar-thumb {
    background-color: #555;
}

body.bg-gray-900::-webkit-scrollbar-thumb:hover {
    background-color: #333;
}

body.bg-gray-900::-webkit-scrollbar-track {
    background-color: #222;
}


/*+++++++++++++++++++++++++++++*/
#messages {
    max-height: calc(100vh - 325px);
    overflow-y: auto;
    position: relative;
    overflow-x: hidden;
}

/* Asegurarse de que la columna de chat no exceda la altura de la ventana */
.flex-none {
    max-height: 99vh;
    overflow: hidden;
}

/* Estilos comunes para los mensajes */
.chat-message-container {
    display: inline-block;
    max-width: 80%;
    border-radius: 7px;
    font-family: 'Roboto', sans-serif;
    text-align: justify;
    margin-top: 10px;
    overflow: hidden;

}

.chat-message-header {
    font-size: 0.9em;
    color: #888;
    padding: 5px 15px;
    border-top-left-radius: 7px;
    border-top-right-radius: 7px;
}

.chat-message {
}

.chat-message-sender {
    font-weight: bold;
    margin-right: 10px;
}

.chat-message-timestamp {
    color: #aaa;
    font-size: 0.8em;
}

.chat-message-text {
    padding: 10px 15px;
    word-wrap: break-word;
    text-align: justify;
}


.chat-message-received.error .chat-message-container {
    background-color: #fff2f2;
    float: right;
    font-style: italic;
}

.chat-message-received.error .chat-message-text {
    background-color: #ffd7d2;
    float: right;
    font-style: italic;
}

body.bg-gray-900 .chat-message-received.error .chat-message-container {
    background-color: #46191c;
    float: right;
    font-style: italic;
}

body.bg-gray-900 .chat-message-received.error .chat-message-text {
    background-color: #622427;
    float: right;
    font-style: italic;
}


.chat-message-received .chat-message-container {
    background-color: #DCF8C6;
    float: right;
    clear: both;
}

.chat-message-sent .chat-message-container {
    background-color: #f8f8f8;
    float: left;
    clear: both;
}

/* Modo oscuro */
body.bg-gray-900 .chat-message-received .chat-message-container {
    background-color: #262D31;
    color: #E1EDEC;
}

body.bg-gray-900 .chat-message-sent .chat-message-container {
    background-color: #056162;
    color: #ffffff;
}

/* Pico para los mensajes */
.chat-message-text::before {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    position: absolute;
    top: 1px;
    left: 1px;

}

.chat-message-received {
    text-align: right;
}

.chat-message-received .chat-message-text {
    background-color: #DCF8C6;
    float: right;
    clear: both;
}

.chat-message-received .chat-message-text::before {
    border-width: 10px 10px 0 0;
    border-color: #DCF8C6 transparent transparent transparent;
    right: -8px;
    top: 1px;
    left: auto;
}

.chat-message-text {
    padding-top: 0;
}

.chat-message-sent .chat-message-text {
    background-color: #f8f8f8;
    float: left;
    clear: both;
}

.chat-message-sent .chat-message-text::before {
    border-width: 10px 0 0 10px;
    border-color: #f8f8f8 transparent transparent transparent;
    left: -9px;
    top: 1px;
}

/**/

.history-selector-container {
    display: flex;
    align-items: center;
    padding-bottom: 10px;
}

.history-selector-container button {
    border: none;
    cursor: pointer;
    margin-left: 8px; /* Espaciado entre el selector y el botón */
    width: auto;
    width: auto;
    padding-left: 10px;
    padding-right: 10px;
}

.history-selector-container select {
    width: 100%;
    margin-right: 8px;
}


/* Modo oscuro */
body.bg-gray-900 {
    background-color: #000;
}

body.bg-gray-900 .chat-message-text {
    background-color: #262D31;
    color: #E1EDEC;
    text-orientation: sideways;
}

body.bg-gray-900 .chat-message-header {
    color: #B1B3B5;
}

body.bg-gray-900 .chat-message-sent .chat-message-text {
    background-color: #056162;
    color: #ffffff;
}


/* Estilos para el modo oscuro */
body.bg-gray-900 .chat-message-received .chat-message-text::before {
    border-color: #262D31 transparent transparent transparent;
}

body.bg-gray-900 .chat-message-sent .chat-message-text::before {
    border-color: #056162 transparent transparent transparent;
}

.clear-fix {
    clear: both;
}

/*++++++++++++++++++++*/
@keyframes dotPulse {
    0% {
        transform: translateY(0);
        opacity: 0.5;
    }
    50% {
        transform: translateY(-5px);
        opacity: 1;
    }
    100% {
        transform: translateY(0);
        opacity: 0.5;
    }
}

.isWritingDot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #000; /* Color por defecto (modo claro) */
    border-radius: 50%;
    animation: dotPulse 1s infinite;
    margin-left: 2px;
    opacity: 0.5;
}

.isWritingContainer {
    padding-left: 15px;
    padding-right: 15px;
}

body.bg-gray-900.text-white .isWritingDot {
    background-color: #fff; /* Color para el modo oscuro */
}

.isWritingDot:nth-child(2) {
    animation-delay: 0.3s;
}

.isWritingDot:nth-child(3) {
    animation-delay: 0.6s;
}

/*++++++++++++++++++++++++++++++*/


.dot {
    height: 10px;
    width: 10px;
    background-color: red;
    border-radius: 50%;
    display: inline-block;
    position: absolute;
    top: 5px;
    right: 5px;
}

/* Estilos del modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}


.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
}

.settings-modal-body {
    padding: 15px;
}

/* Modo Claro */
#chat-for .settings-button {
    background-color: #b0b0b0;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

#chat-for .settings-button:hover {
    background-color: #a0a0a0;
}

/* Modo Oscuro */
#chat-form .settings-button {
    background-color: #4a4a4a;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s;
    position: relative;
}

#chat-for .settings-button:hover {
    background-color: #3a3a3a;
}


/* Modo Claro */
body .settings-modal {
    background-color: #ffffff;
    color: #000000;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

body .settings-modal-header {
    background-color: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}

body .settings-modal-footer {
    background-color: #f5f5f5;
    border-top: 1px solid #e0e0e0;
}

/* Modo Oscuro */
body .settings-modal {
    background-color: #333333;
    color: #ffffff;
    border: 1px solid #555555;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

body .settings-modal-header {
    background-color: #444444;
    border-bottom: 1px solid #555555;
}

body .settings-modal-footer {
    background-color: #444444;
    border-top: 1px solid #555555;
}


/* TailwindCSS utility class to invert colors */
.invert-colors {
    filter: invert(1);
}

.text-orange-500 {
    --tw-text-opacity: 1;
    color: rgb(185, 117, 16, var(--tw-text-opacity));
}

mark {
    border-radius: 5px;
}

html.fancybox-lock {
    overflow-y: scroll !important
}


/*==================================*/


/* Image Styles */
.thumbnail-img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    padding: 5px;
    background: white;
    border: 1px solid #BBB;
    margin: 7px 14px 7px 0;
    width: 160px;
    float: left;
    background: transparent;
}

/* Estilos comunes para el botón */
.theme-toggle-btn {
    padding: 0.5rem;
    border-radius: 9999px; /* rounded-full */
    transition: background-color 0.3s ease; /* suaviza la transición de color */
    font-size: 1.25rem; /* Ajuste el tamaño del icono si es necesario */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Estilos para el tema claro */
.theme-toggle-btn[ng-class*="light"] {
    background-color: #f0f0f0; /* Color de fondo para el modo claro */
    color: #333; /* Color del ícono para el modo claro */
}

.theme-toggle-btn[ng-class*="light"]:hover {
    background-color: #e2e2e2; /* Color de fondo al pasar el mouse para el modo claro */
}

/* Estilos para el tema oscuro */
.theme-toggle-btn[ng-class*="dark"] {
    background-color: #333; /* Color de fondo para el modo oscuro */
    color: #f0f0f0; /* Color del ícono para el modo oscuro */
}

.theme-toggle-btn[ng-class*="dark"]:hover {
    background-color: #444; /* Color de fondo al pasar el mouse para el modo oscuro */
}

select {
    transition: background-color 0.2s, color 0.2s;
}

select:hover {
    background-color: theme('colors.gray.300'); /* Más claro para el tema claro */
}

select:focus {
    outline: none;
    border-color: theme('colors.blue.500');
}


/*===================================*/
.fixed-header-table, .fixed-header-table thead th, .scrollable-body-table, .scrollable-body-table tbody td {
    table-layout: fixed;
    width: 100%;
}

.info-span {
    color: #585858;
    margin-top: 15px;
    margin-left: 5px;
    margin-bottom: 5px;
}

.dark-mode .info-span {
    color: #a9a9a9;
    margin-top: 15px;
    margin-left: 5px;
    margin-bottom: 5px;
}

/*=========================================================*/


#infoModal p {
    margin-bottom: 15px;
}

:disabled {
    cursor: not-allowed !important;
}

textarea#messageText:disabled {
    color: #757575;
}
/*================================  loading animation ====================================*/
@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

#loading {
    position: fixed; /* Use fixed or absolute positioning */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f3f3f3;
    z-index: 1000; /* Ensure this is above your content */
}



#loading.fade-out {
    animation: fadeOut 0.3s ease forwards;
}


.light-mode #loading{
    background-color: #f3f3f3;
}
.dark-mode #loading{
    background-color: #0d1116;
}


.spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db; /* Blue */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


:root {
    --hue: 223;
    --bg: hsl(var(--hue),90%,95%);
    --fg: hsl(var(--hue),90%,5%);
}

.sp {
    display: block;
    width: 8em;
    height: 8em;
}
.sp__ring {
    stroke: hsla(var(--hue),90%,5%,0.8);
    transition: stroke 0.3s;
}

.dark-mode .sp__ring {
    stroke: hsl(223deg 26.85% 36.12% / 80%);
}


    .sp__worm1,
.sp__worm2,
.sp__worm2-1 {
    animation: worm1 5s ease-in infinite;
}
.sp__worm1 {
    transform-origin: 64px 64px;
}
.sp__worm2,
.sp__worm2-1 {
    transform-origin: 22px 22px;
}
.sp__worm2 {
    animation-name: worm2;
    animation-timing-function: linear;
}
.sp__worm2-1 {
    animation-name: worm2-1;
    stroke-dashoffset: 175.92;
}

/* Dark theme */
@media (prefers-color-scheme: dark) {
    :root {
        --bg: hsl(var(--hue),90%,5%);
        --fg: hsl(var(--hue),90%,95%);
    }
    .sp__ring {
        stroke: hsla(var(--hue),90%,95%,0.1);
    }
}

/* Animations */
@keyframes worm1 {
    from,
    to {
        stroke-dashoffset: 0
    }
    12.5% {
        animation-timing-function: ease-out;
        stroke-dashoffset: -175.91;
    }
    25% {
        animation-timing-function: cubic-bezier(0,0,0.43,1);
        stroke-dashoffset: -307.88;
    }
    50% {
        animation-timing-function: ease-in;
        stroke-dashoffset: -483.8;
    }
    62.5% {
        animation-timing-function: ease-out;
        stroke-dashoffset: -307.88;
    }
    75% {
        animation-timing-function: cubic-bezier(0,0,0.43,1);
        stroke-dashoffset: -175.91;
    }
}
@keyframes worm2 {
    from,
    12.5%,
    75%,
    to {
        transform: rotate(0) translate(-42px,0);
    }
    25%,
    62.5% {
        transform: rotate(0.5turn) translate(-42px,0);
    }
}
@keyframes worm2-1 {
    from {
        stroke-dashoffset: 175.91;
        transform: rotate(0);
    }
    12.5% {
        animation-timing-function: cubic-bezier(0,0,0.42,1);
        stroke-dashoffset: 0;
        transform: rotate(0);
    }
    25% {
        animation-timing-function: linear;
        stroke-dashoffset: 0;
        transform: rotate(1.5turn);
    }
    37.5%,
    50% {
        stroke-dashoffset: -175.91;
        transform: rotate(1.5turn);
    }
    62.5% {
        animation-timing-function: cubic-bezier(0,0,0.42,1);
        stroke-dashoffset: 0;
        transform: rotate(1.5turn);
    }
    75% {
        animation-timing-function: linear;
        stroke-dashoffset: 0;
        transform: rotate(0);
    }
    87.5%,
    to {
        stroke-dashoffset: 175.92;
        transform: rotate(0);
    }
}

/*==========================  media  ===============================*/

@media screen and (max-width: 1981px) {
    #chat-column{
        flex: 0.5;
    }

}


@media screen and (min-width: 1981px) {
    body {
        padding-left: 10%;
        padding-right: 10%;
    }


}


@media screen and (max-height: 1000px) {
    .information-text {
        display: none;
    }

    .clinia-icon {
        height: 82px
    }

    .action-buttons {
        height: 50px;
    }

    .action-buttons button {
        height: 50px;
        overflow: hidden;
        padding-top: 0px;
        padding-bottom: 0px;
        padding-left: 7px;
        padding-right: 7px;
    }



}