/* General Elements */
#chat-header {
    background-color: #093b59;
    height: 60px;
    display: flex;
    padding: 10px;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    border-radius: 10px 10px 0 0;
    border: 1px solid #093b59;
}

#chat-header-title {
    color: white;
    font-family: "Roboto", Arial, MS Sans Serif, Geneva, sans-serif;
    font-weight: 500;
    font-size: 16px;
}

#chat-content {
    height: 100%;
    overflow-y: auto;
}

#chat-tooltip {
    position: fixed;
    bottom: 5px;
    right: 10px;
    z-index: 1000;
}

/* Buttons */
#minimize-button, #new-chat-button {
    width: 40px;
    height: 40px;
}

#chat-button {
    position: relative;
    background-color: transparent;
    color: #f0f0f0;
    border: none;
    border-radius: 50%;
    /*width: 50px;*/
    /*height: 50px;*/
    transition: background-color 0.3s ease;
}

#chat-send-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin: 10px 10px 10px 5px;
    background: #a31f35;
    border: none;
    color: white;
    align-self: flex-end;
}

#chat-send-button:hover {
    background: hsl(350, 68%, 30%);
}

/* Transparent and Icon Buttons */
.transparent-btn {
    background-color: transparent;
    color: white;
    border: none;
}

.transparent-btn:hover {
    background-color: transparent;
    color: hsl(350, 68%, 55%);
}

.chat-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    cursor: pointer;
}

.icon-color {
    color: white;
}

/* Chat Window and Content */
#chat-window {
    display: none;
    flex-direction: column;
    position: absolute;
    bottom: 95px;
    right: 15px;
    width: 400px;
    height: 600px;
    max-height: 80vh;
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#chat-window.opened {
    display: flex;
}

#chat-messages {
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
}

#chat-messages div.chat-message {
    white-space: normal !important;
    line-height: 1.5em;
}

#chat-messages h1, #chat-messages h2, #chat-messages h3 {
    color: #003a5c;
    padding: 3px 0;
}

#chat-messages h1, #chat-messages h2, #chat-messages h3 {
    font-weight: 500;
}

#chat-messages h1 {
    font-size: 1.3em;
    margin-top: 10px;
}

#chat-messages h2 {
    margin-top: 5px;
    margin-bottom: 2px;
}

#chat-messages blockquote {
    border-left: 2px solid #a5c8ee;
    padding: 0.5em 1.25em 0 1.25em;
    margin: 0.75em;
}

#chat-messages hr {
    display: none;
}

#chat-messages p {
    text-align: left;
    padding: 0 0 3px;
}

#chat-messages ul {
    padding-bottom: 0;
}

#chat-input-form {
    width: 100%;
    display: flex;
    justify-content: space-between;
}

#chat-input {
    flex: 1 1 0;
    margin: 10px 5px 10px 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 10px;
}

#controls {
    display: flex;
}

#chat-support {
    text-align: center;
    color: grey;
    margin-bottom: 15px;
    margin-top: 5px;
}

#chat-support a {
    color: inherit;
    text-decoration: none;
}

/* Chat Messages */
.chat-message {
    width: fit-content;
    padding: 10px;
    margin-bottom: 5px;
    color: #003a5c;
}

.user-message {
    align-self: flex-end;
    text-align: right;
    margin-left: 20px;
    background-color: #edf5fc;
    border-radius: 10px 10px 0 10px;
}

.bot-message {
    text-align: left;
    margin-right: 20px;
    background-color: #fae5e9;
    border-radius: 10px 10px 10px 0;
}

/* Icons */
.chatbot-icons.material-symbols-outlined {
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 1;
    transform: scale(1) rotate(0deg);
    pointer-events: auto;
    position: absolute;
    font-size: 24px;
}

.chatbot-icons.material-symbols-outlined.inactive {
    opacity: 0;
    transform: scale(0.5) rotate(-180deg);
    pointer-events: none;
}

button:has(.chatbot-icons.material-symbols-outlined) {
    padding: 4px;
!important
}

/* Spinner */
#chat-spinner {
    display: flex;
    width: 50px;
    margin-left: 10px; /* fixme: unificar con texto recibidio */
}

#chat-spinner.inactive {
    display: none;
}

.loader {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: block;
    margin: 5px auto;
    position: relative;
    background: #FFF;
    box-shadow: -10px 0 #FFF, 10px 0 #FFF;
    box-sizing: border-box;
    animation: shadowPulse 0.8s linear infinite;
}

@keyframes shadowPulse {
    33% {
        background: #FFF;
        box-shadow: -10px 0 #a31f34, 10px 0 #FFF;
    }
    66% {
        background: #a31f34;
        box-shadow: -10px 0 #FFF, 10px 0 #FFF;
    }
    100% {
        background: #FFF;
        box-shadow: -10px 0 #FFF, 10px 0 #a31f34;
    }
}
