/**
 * VOTING ASSISTANT CHAT MODAL - STYLES
 * AI-powered voting information assistant
 */

/* Modal Overlay */
.voting-assistant-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease;
}

.voting-assistant-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

/* Modal Container */
.voting-assistant-container {
    position: relative;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 700px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

/* Header */
.voting-assistant-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.voting-assistant-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.voting-assistant-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Messages Container */
.voting-assistant-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: #f9fafb;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Message Bubbles */
.user-message,
.assistant-message {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    animation: fadeInMessage 0.3s ease;
}

.user-message {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.message-content {
    flex: 1;
    max-width: 75%;
}

.message-bubble {
    padding: 1rem 1.25rem;
    border-radius: 16px;
    line-height: 1.6;
    font-size: 0.9375rem;
}

.user-bubble {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.assistant-bubble {
    background: white;
    color: #1a202c;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Message Content Styling */
.assistant-bubble p {
    margin: 0 0 0.75rem;
}

.assistant-bubble p:last-child {
    margin-bottom: 0;
}

.assistant-bubble ul,
.assistant-bubble ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.assistant-bubble li {
    margin-bottom: 0.375rem;
}

.assistant-bubble a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.assistant-bubble a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.assistant-bubble strong {
    color: #1f2937;
    font-weight: 600;
}

/* Typing Indicator */
.typing-indicator .typing-dots {
    display: flex;
    gap: 0.375rem;
    padding: 0.5rem 0;
}

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

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

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

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

/* Input Container */
.voting-assistant-input-container {
    padding: 1rem 1.5rem;
    background: white;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
}

.voting-assistant-input {
    flex: 1;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    resize: none;
    font-family: inherit;
    transition: all 0.2s ease;
    max-height: 120px;
    overflow-y: auto;
}

.voting-assistant-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.voting-assistant-send-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.voting-assistant-send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.voting-assistant-send-btn:active {
    transform: translateY(0);
}

/* Privacy Notice */
.voting-assistant-privacy {
    padding: 0.75rem 1.5rem;
    background: #f0f9ff;
    text-align: center;
    font-size: 0.8125rem;
    color: #0c4a6e;
    border-top: 1px solid #bae6fd;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .voting-assistant-container {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .voting-assistant-header {
        padding: 1rem;
    }
    
    .voting-assistant-messages {
        padding: 1rem;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .message-bubble {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
    }
    
    .voting-assistant-input-container {
        padding: 1rem;
    }
}

/* Mobile Landscape */
@media (max-width: 896px) and (max-height: 500px) {
    .voting-assistant-container {
        max-height: 100vh;
    }
    
    .voting-assistant-header {
        padding: 0.75rem 1rem;
    }
    
    .voting-assistant-header h3 {
        font-size: 1rem;
    }
    
    .voting-assistant-messages {
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .message-bubble {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

/* Scrollbar Styling */
.voting-assistant-messages::-webkit-scrollbar {
    width: 8px;
}

.voting-assistant-messages::-webkit-scrollbar-track {
    background: #f3f4f6;
}

.voting-assistant-messages::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

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