/* Widget Prometeo - Estética Anticitera */

#prometeo-widget-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

#prometeo-bubble {
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    border: 2px solid #c5a059; /* Dorado/Bronce */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

#prometeo-bubble:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 40px rgba(197, 160, 89, 0.3);
}

#prometeo-bubble svg {
    width: 35px;
    height: 35px;
    fill: #c5a059;
}

/* Glassmorphism Chat Box */
#prometeo-chat-box {
    position: absolute;
    bottom: 85px;
    right: 0;
    width: 380px;
    height: 550px;
    background: rgba(13, 13, 13, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(197, 160, 89, 0.4);
    border-radius: 20px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    transform-origin: bottom right;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#prometeo-chat-box.active {
    display: flex;
    animation: slideIn 0.3s ease-out forwards;
}

@keyframes slideIn {
    from { transform: scale(0.8) translateY(20px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

#prometeo-header {
    padding: 20px;
    background: rgba(197, 160, 89, 0.1);
    border-bottom: 1px solid rgba(197, 160, 89, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#prometeo-header h3 {
    margin: 0;
    color: #c5a059;
    font-size: 1.1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

#prometeo-close {
    cursor: pointer;
    color: #888;
    font-size: 1.5rem;
}

#prometeo-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.prometeo-msg {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 15px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.prometeo-msg.ai {
    background: rgba(197, 160, 89, 0.1);
    color: #e0e0e0;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
    border: 1px solid rgba(197, 160, 89, 0.2);
}

.prometeo-msg.user {
    background: #c5a059;
    color: #000;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

#prometeo-input-area {
    padding: 20px;
    display: flex;
    gap: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

#prometeo-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(197, 160, 89, 0.3);
    border-radius: 10px;
    padding: 10px 15px;
    color: #fff;
    outline: none;
}

#prometeo-input:focus {
    border-color: #c5a059;
}

#prometeo-send {
    background: #c5a059;
    border: none;
    border-radius: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Typing Indicator */
.typing {
    font-style: italic;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 10px;
}

.prometeo-msg.ai p { margin: 0 0 10px 0; }
.prometeo-msg.ai p:last-child { margin-bottom: 0; }
.prometeo-msg.ai ul, .prometeo-msg.ai ol { margin: 10px 0; padding-left: 20px; }
.prometeo-msg.ai li { margin-bottom: 5px; }
.prometeo-msg.ai strong { color: #c5a059; font-weight: 600; }
.prometeo-msg.ai hr { border: 0; border-top: 1px solid rgba(197, 160, 89, 0.2); margin: 15px 0; }

.prometeo-sources {
    margin-top: 10px;
    font-size: 0.85rem;
}
.prometeo-sources p { margin-bottom: 5px !important; color: #888; }
.prometeo-sources ul { 
    list-style: none !important; 
    padding-left: 0 !important; 
    margin: 5px 0 !important; 
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.prometeo-sources li { margin-bottom: 0 !important; }
.prometeo-sources a {
    color: #c5a059;
    text-decoration: none;
    background: rgba(197, 160, 89, 0.1);
    padding: 2px 8px;
    border-radius: 5px;
    border: 1px solid rgba(197, 160, 89, 0.2);
    transition: all 0.2s ease;
    display: inline-block;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.prometeo-sources a:hover {
    background: rgba(197, 160, 89, 0.2);
    transform: translateY(-1px);
}

/* Animations */
@keyframes pulse-gold {
    0% { box-shadow: 0 0 0 0 rgba(197, 160, 89, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(197, 160, 89, 0); }
    100% { box-shadow: 0 0 0 0 rgba(197, 160, 89, 0); }
}

.pulse {
    animation: pulse-gold 2s infinite;
}

/* Scrollbar */
#prometeo-messages::-webkit-scrollbar {
    width: 5px;
}
#prometeo-messages::-webkit-scrollbar-thumb {
    background: rgba(197, 160, 89, 0.3);
    border-radius: 10px;
}
