/* MRANTI Grant Assistant Styles */

.grant-assistant {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 30;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Toggle Button */
.assistant-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #1D4ED8 0%, #2563EB 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(29, 78, 216, 0.4);
    transition: all 0.3s ease;
}

.assistant-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(29, 78, 216, 0.5);
}

.assistant-icon {
    width: 24px;
    height: 24px;
}

.assistant-badge {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Chat Window */
.assistant-window {
    display: flex;
    flex-direction: column;
    width: 380px;
    height: 550px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

/* Header */
.assistant-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #1D4ED8 0%, #2563EB 100%);
    color: white;
    padding: 16px 20px;
}

.assistant-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.assistant-avatar {
    font-size: 28px;
}

.assistant-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.assistant-subtitle {
    margin: 0;
    font-size: 12px;
    opacity: 0.9;
}

.assistant-close {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.assistant-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Messages */
.assistant-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #F9FAFB;
}

.assistant-message {
    margin-bottom: 16px;
    display: flex;
}

.assistant-message-bot {
    justify-content: flex-start;
}

.assistant-message-user {
    justify-content: flex-end;
}

.assistant-message-content {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.assistant-message-bot .assistant-message-content {
    background: white;
    color: #1F2937;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.assistant-message-user .assistant-message-content {
    background: #1D4ED8;
    color: white;
    border-bottom-right-radius: 4px;
}

/* Typing Indicator */
.typing-dots {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #9CA3AF;
    animation: typing 1.4s infinite;
}

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

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

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-8px); }
}

/* Input Container */
.assistant-input-container {
    padding: 16px;
    background: white;
    border-top: 1px solid #E5E7EB;
}

#assistant-form {
    display: flex;
    gap: 8px;
}

.assistant-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.assistant-input:focus {
    border-color: #1D4ED8;
}

.assistant-send {
    background: #1D4ED8;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.assistant-send:hover {
    background: #1E40AF;
}

.assistant-send:active {
    transform: scale(0.95);
}

/* Scrollbar */
.assistant-messages::-webkit-scrollbar {
    width: 6px;
}

.assistant-messages::-webkit-scrollbar-track {
    background: transparent;
}

.assistant-messages::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 3px;
}

.assistant-messages::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .assistant-window {
        width: calc(100vw - 32px);
        height: calc(100vh - 100px);
        max-height: 600px;
    }

    .grant-assistant {
        right: 16px;
        bottom: 16px;
    }
}
