/* PsicopeBot Simple - CSS Profesional */

/* Botón Flotante */
#psicopebot-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #2B6CB0 0%, #4FD1C5 100%);
    padding: 14px 24px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(43, 108, 176, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: all 0.3s ease;
    min-width: 140px;
}

#psicopebot-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(43, 108, 176, 0.5);
}

#psicopebot-button .psicopebot-button-text {
    color: white;
    font-weight: 600;
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Ventana del Chat */
#psicopebot-chat {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 550px;
    max-height: calc(100vh - 120px);
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

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

/* Header */
.psicopebot-header {
    background: linear-gradient(135deg, #2B6CB0 0%, #4FD1C5 100%);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 16px 16px 0 0;
}

.psicopebot-header-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.psicopebot-title {
    font-weight: 700;
    font-size: 18px;
}

.psicopebot-status {
    font-size: 13px;
    opacity: 0.9;
}

#psicopebot-close {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#psicopebot-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Mensajes */
#psicopebot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #F7FAFC;
}

.psicopebot-message {
    margin-bottom: 16px;
    animation: messageIn 0.3s ease;
}

@keyframes messageIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.psicopebot-text {
    background: white;
    padding: 12px 16px;
    border-radius: 12px 12px 12px 4px;
    max-width: 80%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    line-height: 1.5;
    color: #2D3748;
    display: inline-block;
}

.psicopebot-text a {
    color: #2B6CB0;
    text-decoration: underline;
    font-weight: 600;
}

.psicopebot-text a:hover {
    color: #4FD1C5;
}

.psicopebot-user {
    text-align: right;
}

.psicopebot-user .psicopebot-text {
    background: linear-gradient(135deg, #2B6CB0, #4FD1C5);
    color: white;
    border-radius: 12px 12px 4px 12px;
}

.psicopebot-user .psicopebot-text a {
    color: white;
    text-decoration: underline;
}

/* Input */
.psicopebot-input-area {
    padding: 16px 20px;
    background: white;
    border-top: 1px solid #E2E8F0;
    display: flex;
    gap: 12px;
    border-radius: 0 0 16px 16px;
}

#psicopebot-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #E2E8F0;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#psicopebot-input:focus {
    border-color: #4FD1C5;
}

#psicopebot-send {
    background: linear-gradient(135deg, #2B6CB0, #4FD1C5);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(43, 108, 176, 0.3);
    transition: all 0.2s ease;
}

#psicopebot-send:hover {
    transform: scale(1.1);
}

/* Typing indicator */
.psicopebot-typing {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}

.psicopebot-typing span {
    width: 8px;
    height: 8px;
    background: #CBD5E0;
    border-radius: 50%;
    animation: typing 1.4s ease-in-out infinite;
}

.psicopebot-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.psicopebot-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 480px) {
    #psicopebot-chat {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    
    #psicopebot-button {
        bottom: 16px;
        right: 16px;
    }
}

/* Scrollbar */
#psicopebot-messages::-webkit-scrollbar {
    width: 6px;
}

#psicopebot-messages::-webkit-scrollbar-track {
    background: transparent;
}

#psicopebot-messages::-webkit-scrollbar-thumb {
    background: #CBD5E0;
    border-radius: 10px;
}
