/* ============================================
   MARIA AI - Chat Interface Styles
   ============================================ */

/* Section Background */
.maria-ai-section {
    padding: 6rem 0;
    background: linear-gradient(180deg, #f8fafc 0%, #e8f4f8 100%);
    position: relative;
    overflow: hidden;
}

.ai-bg-effects {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.ai-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(0, 198, 255, 0.15) 0%, transparent 70%);
    animation: aiGlow 8s ease-in-out infinite;
}

@keyframes aiGlow {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
}

/* Section Header */
.ai-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.ai-pulse {
    width: 8px;
    height: 8px;
    background: #00c6ff;
    border-radius: 50%;
    animation: aiPulse 2s ease-in-out infinite;
}

@keyframes aiPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.ai-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.gradient-text {
    background: linear-gradient(135deg, #00c6ff, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Chat Container */
.maria-ai-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

/* Chat Wrapper */
.ai-chat-wrapper {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 1.5rem;
    box-shadow: 0 20px 60px rgba(0, 43, 91, 0.15);
    overflow: hidden;
    border: 1px solid rgba(0, 198, 255, 0.2);
}

/* Chat Header */
.ai-chat-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #002b5b, #003d7a);
    color: #fff;
}

.ai-avatar {
    position: relative;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-glow {
    position: absolute;
    inset: -3px;
    background: linear-gradient(135deg, #00c6ff, #ffd700);
    border-radius: 50%;
    opacity: 0.6;
    animation: avatarGlow 3s ease-in-out infinite;
}

@keyframes avatarGlow {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.avatar-icon {
    position: relative;
    font-size: 1.5rem;
    z-index: 1;
}

.ai-info h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.ai-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    opacity: 0.9;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.ai-clear-btn {
    margin-left: auto;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-clear-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Chat Messages */
.ai-chat-messages {
    height: 400px;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ai-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.ai-chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.ai-chat-messages::-webkit-scrollbar-thumb {
    background: #00c6ff;
    border-radius: 3px;
}

/* Messages */
.message {
    display: flex;
    gap: 0.75rem;
    max-width: 85%;
    animation: messageIn 0.3s ease-out;
}

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

.ai-message {
    align-self: flex-start;
}

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

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.ai-message .message-avatar {
    background: linear-gradient(135deg, #002b5b, #00c6ff);
}

.user-message .message-avatar {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
}

.message-content {
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    line-height: 1.6;
}

.ai-message .message-content {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-top-left-radius: 4px;
}

.user-message .message-content {
    background: linear-gradient(135deg, #002b5b, #003d7a);
    color: #fff;
    border-top-right-radius: 4px;
}

.message-content p {
    margin: 0 0 0.75rem;
}

.message-content p:last-child {
    margin-bottom: 0;
}

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

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

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

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

/* Quick Prayers */
.quick-prayers {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    align-items: center;
}

.quick-label {
    font-size: 0.85rem;
    color: #64748b;
    margin-right: 0.5rem;
}

.quick-prayer-btn {
    padding: 0.5rem 1rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    font-size: 0.85rem;
    color: #334155;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.quick-prayer-btn:hover {
    background: #00c6ff;
    border-color: #00c6ff;
    color: #fff;
    transform: translateY(-2px);
}

/* Chat Input */
.ai-chat-input {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

.ai-chat-input textarea {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    font-family: inherit;
    font-size: 0.95rem;
    resize: none;
    outline: none;
    transition: border-color 0.3s ease;
    max-height: 120px;
}

.ai-chat-input textarea:focus {
    border-color: #00c6ff;
}

.send-btn {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #002b5b, #00c6ff);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 198, 255, 0.4);
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Features Sidebar */
.ai-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ai-feature {
    padding: 1.25rem;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 43, 91, 0.08);
    transition: all 0.3s ease;
}

.ai-feature:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 198, 255, 0.15);
}

.feature-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.ai-feature h4 {
    font-size: 0.95rem;
    color: #002b5b;
    margin: 0 0 0.25rem;
}

.ai-feature p {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* Disclaimer */
.ai-disclaimer {
    text-align: center;
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 2rem;
    padding: 0 1rem;
}

/* Floating Action Button */
.maria-ai-fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #002b5b, #00c6ff);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 43, 91, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
}

.maria-ai-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 198, 255, 0.4);
}

.fab-icon {
    font-size: 1.5rem;
    z-index: 1;
}

.fab-pulse {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #00c6ff, #ffd700);
    border-radius: 50%;
    animation: fabPulse 2s ease-out infinite;
}

@keyframes fabPulse {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* Responsive */
@media (max-width: 1024px) {
    .maria-ai-container {
        grid-template-columns: 1fr;
    }
    
    .ai-features {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .maria-ai-section {
        padding: 4rem 0;
    }
    
    .ai-chat-messages {
        height: 350px;
    }
    
    .ai-features {
        grid-template-columns: 1fr;
    }
    
    .maria-ai-fab {
        width: 56px;
        height: 56px;
        bottom: 1.5rem;
        right: 1.5rem;
    }
    
    .quick-prayers {
        padding: 0.75rem 1rem;
    }
    
    .quick-prayer-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .ai-chat-messages {
        height: 300px;
        padding: 1rem;
    }
    
    .ai-chat-header {
        padding: 1rem;
    }
    
    .message {
        max-width: 90%;
    }
}