/* Modern, responsive chat styling with beautiful animations */
#empleadorobot-chat-sidebar {
    z-index: 2147483647;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Enhanced bubble styling with gradients and shadows */
.chat-bubble-enhanced {
    background: linear-gradient(135deg, #04584E 0%, #7CDDD0 100%);
    border-radius: 18px;
    box-shadow: 0 4px 15px rgba(4, 88, 78, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.chat-bubble-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.chat-bubble-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(4, 88, 78, 0.15);
}

/* Responsive floating button with pulse animation */
#er-float-bubble {
    position: fixed !important;
    z-index: 2147483647 !important;
    bottom: 1.5rem !important;
    right: 1.5rem !important;
    left: auto !important;
    background: linear-gradient(135deg, #04584E 0%, #7CDDD0 100%) !important;
    box-shadow: 0 4px 20px rgba(4, 88, 78, 0.4) !important;
    animation: pulse-glow 2s infinite;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#er-float-bubble:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 8px 30px rgba(4, 88, 78, 0.6) !important;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(4, 88, 78, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(4, 88, 78, 0.6);
    }
}

/* Enhanced search bar styling */
.search-container {
    position: relative;
    max-width: 600px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.search-form {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.search-form:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(4, 88, 78, 0.3);
}

.search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    background: transparent;
    font-size: 1rem;
    outline: none;
    color: #333;
}

.search-input::placeholder {
    color: #999;
    font-weight: 400;
}

.search-button {
    background: linear-gradient(135deg, #04584E 0%, #7CDDD0 100%) !important;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(4, 88, 78, 0.3);
}

.search-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(4, 88, 78, 0.4);
}

/* Link styling for markdown links */
.chat-link {
    color: #04584E;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
    background: linear-gradient(to right, #04584E, #7CDDD0);
    background-size: 0% 2px;
    background-position: bottom;
    background-repeat: no-repeat;
}

.chat-link:hover {
    background-size: 100% 2px;
    color: #7CDDD0;
}

/* Responsive breakpoints */
@media (max-width: 768px) {
    #empleadorobot-chat-sidebar {
        width: 100vw !important;
        height: 100vh !important;
        right: 0 !important;
        top: 0 !important;
        border-radius: 0 !important;
    }
    
    .search-container {
        margin: 1rem auto;
        padding: 0 0.5rem;
    }
    
    .search-form {
        padding: 6px;
    }
    
    .search-input {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .search-button {
        width: 40px;
        height: 40px;
    }
    
    #er-float-bubble {
        position: fixed !important;
        z-index: 2147483647 !important;
        width: 56px !important;
        height: 56px !important;
        bottom: 20px !important;
        right: 20px !important;
        left: auto !important;
    }
}

@media (max-width: 480px) {
    .search-container {
        margin: 0.5rem auto;
    }
    
    .search-input {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    #er-float-bubble {
        position: fixed !important;
        z-index: 2147483647 !important;
        width: 52px !important;
        height: 52px !important;
        bottom: 16px !important;
        right: 16px !important;
        left: auto !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .search-form {
        background: rgba(30, 30, 30, 0.95);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .search-input {
        color: #fff;
    }
    
    .search-input::placeholder {
        color: #666;
    }
}

/* Smooth animations for all interactive elements */
* {
    -webkit-tap-highlight-color: transparent;
}

button, input, .chat-link {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced typing indicator */
.typing-enhanced {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 18px;
    padding: 12px 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.typing-enhanced .dot {
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #04584E 0%, #7CDDD0 100%);
    border-radius: 50%;
    animation: typing-bounce 1.4s infinite ease-in-out;
}

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

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

@keyframes typing-bounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.user-bubble, .chat-bubble-enhanced.user-bubble {
    background: linear-gradient(135deg, #04584E 0%, #7CDDD0 100%) !important;
    color: #fff !important;
}

.send-button, .er-send-btn {
    background: linear-gradient(135deg, #04584E 0%, #7CDDD0 100%) !important;
    color: #fff !important;
}

.header h2, .er-header-title {
    background: linear-gradient(135deg, #04584E 0%, #7CDDD0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}
  