body, html {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

#new-chat-button {
    display: block;
    margin: 20px auto;
    padding: 10px 20px;
    background-color: #f45151;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s ease;
}

    #new-chat-button:hover {
        background-color: #d83939;
    }

#file-input {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    z-index: -1;
}

.content {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logos {
    text-align: center;
    padding-bottom: 30px;
}

.logo {
    max-width: 280px;
    height: auto;
    margin: 10px;
    padding-bottom: 22px;
}

#chat-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #f45151;
    border: none;
    cursor: pointer;
    z-index: 1000;
    background-image: url('https://electroventas-web-prod-exeeamhcekhdendd.canadacentral-01.azurewebsites.net/img/Logo-Red-2.png');
    background-size: cover;
    background-position: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

    #chat-button:hover {
        transform: scale(1.05);
    }

#chat-container {
    display: none;
    position: fixed;
    bottom: 110px;
    right: 20px;
    width: 350px;
    height: 600px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    overflow: hidden;
}

#chat-window {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    background-color: #f8f9fa;
}

#chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background-color: #fff;
}

#chat-form {
    display: flex;
    flex-direction: column;
    padding: 15px;
    background-color: #fff;
    border-top: 1px solid #eee;
}

.chat-input-container {
    position: relative;
    margin-bottom: 10px;
}

#chat-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    resize: none;
    height: 50px;
    font-size: 14px;
    line-height: 1.4;
    transition: border-color 0.2s ease;
}

    #chat-input:focus {
        outline: none;
        border-color: #f45151;
    }

.chat-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-tools {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tool-button {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #666;
    border-radius: 50%;
    transition: all 0.2s ease;
}

    .tool-button:hover {
        background-color: #f0f0f0;
        color: #f45151;
    }

#chat-submit {
    padding: 10px 20px;
    background-color: #f45151;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
    margin-left: auto;
}

    #chat-submit:hover {
        background-color: #d83939;
    }

    #chat-submit:disabled {
        background-color: #ccc;
        cursor: not-allowed;
    }

.message {
    margin-bottom: 15px;
    padding: 12px 15px;
    border-radius: 12px;
    max-width: 80%;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
}

.user-message {
    background-color: #f45151;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.ai-message {
    background-color: #f0f2f5;
    color: #1c1e21;
    margin-right: auto;
    border-bottom-left-radius: 4px;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #666;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

    .close-button:hover {
        background-color: #f0f0f0;
    }

.loader {
    display: none;
    text-align: center;
    padding: 10px;
}

    .loader span {
        display: inline-block;
        width: 8px;
        height: 8px;
        background-color: #f45151;
        border-radius: 50%;
        margin: 0 3px;
        opacity: 0;
        animation: loader 1.4s infinite;
    }

        .loader span:nth-child(2) {
            animation-delay: 0.2s;
        }

        .loader span:nth-child(3) {
            animation-delay: 0.4s;
        }

@keyframes loader {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

.attachments-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.attachment-item {
    display: flex;
    align-items: center;
    padding: 8px;
    background-color: #f8f9fa;
    border-radius: 8px;
    gap: 8px;
}

.attachment-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background-color: #e9ecef;
}

.attachment-info {
    flex: 1;
    min-width: 0;
}

.attachment-name {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attachment-remove {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

    .attachment-remove:hover {
        background-color: #e9ecef;
    }

.attachment-preview {
    max-width: 200px;
    max-height: 150px;
    border-radius: 8px;
    margin-top: 8px;
}

.attachment-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.attachment-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #f45151;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.recording-indicator {
    display: none;
    align-items: center;
    padding: 6px 12px;
    background-color: #fee;
    border-radius: 8px;
    font-size: 12px;
    color: #f45151;
    gap: 6px;
}

    .recording-indicator i {
        animation: pulse 1.5s infinite;
    }

.chat-divider {
    position: relative;
    text-align: center;
    margin: 20px 0;
}

    .chat-divider::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        height: 1px;
        background-color: #e0e0e0;
        z-index: 1;
    }

    .chat-divider span {
        background-color: #fff;
        padding: 0 10px;
        color: #666;
        font-size: 12px;
        position: relative;
        z-index: 2;
    }

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

#chat-iframe-container {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
}

#chat-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.audio-attachment {
    margin: 10px 0;
}

.audio-player {
    display: block;
    width: 100%;
    margin-top: 8px;
    border-radius: 20px;
    height: 40px;
}

.audio-attachment i {
    margin-right: 5px;
    color: #666;
}

@media (max-width: 767px) {
    #chat-container {
        width: calc(100% - 40px);
        right: 20px;
        height: calc(100% - 120px);
        bottom: 110px;
    }

    .message {
        max-width: 85%;
    }
}

#error-report-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #f45151;
    border: none;
    cursor: pointer;
    z-index: 1000;
    color: white;
    font-size: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

    #error-report-button:hover {
        transform: scale(1.05);
    }

#error-report-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-report-modal {
    background: white;
    padding: 20px;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

    .error-report-modal h3 {
        margin-top: 0;
        color: #333;
        margin-bottom: 20px;
    }

#captura-container {
    position: relative;
    display: inline-block;
    margin-top: 20px;
    max-width: 100%;
    overflow: auto;
}

#canvas-dibujo {
    position: absolute;
    top: 0;
    left: 0;
    cursor: crosshair;
}

#comentario,
#acciones {
    display: none;
    width: 100%;
    margin-top: 20px;
}

    #comentario textarea {
        width: 100%;
        height: 100px;
        padding: 10px;
        border: 1px solid #ddd;
        border-radius: 8px;
        resize: vertical;
    }

.send-button {
    background-color: #f45151;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

    .send-button:hover {
        background-color: #d83939;
    }

.whatsapp-info {
    margin: 20px 0;
    font-size: 16px;
    color: #333;
    text-align: center;
}

.whatsapp-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #25D366;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 16px;
    transition: background-color 0.2s ease;
    margin: 10px auto;
}

    .whatsapp-button:hover {
        background-color: #128C7E;
        color: white;
        text-decoration: none;
    }

    .whatsapp-button i {
        font-size: 20px;
    }
