/**
 * Fosters AI Assistant Widget Styles
 */

/* Widget Container - Full Screen */
#fosters-ai-widget {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
}


/* Hide widget by default */
#fosters-ai-widget.fosters-widget-closed {
    display: none;
}

/* Toggle Button - Floating */
.fosters-widget-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #1e153d;
    border: none;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(30, 21, 61, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
}

.fosters-widget-toggle:hover {
	    background: var(--e-global-color-secondary);

    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(30, 21, 61, 0.5);
}

/* Hide toggle when widget is open */
.fosters-widget-toggle.fosters-hidden {
    display: none;
}

/* Widget Window - Full Screen Layout */
.fosters-widget-window {
    width: 100%;
    height: 100%;
    background: transparent;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header - Hero Section */
.fosters-widget-header {
    background: transparent;
    color: #1a1a2e;
    padding: 60px 20px 40px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.fosters-widget-header h3 {
    margin: 0 0 20px 0;
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    color: #1a1a2e;
}

.fosters-widget-header h3::before {
    content: '';
    display: block;
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: #1e153d;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(30, 21, 61, 0.3);
}

.fosters-widget-subtitle {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 30px;
    font-weight: 400;
}

.fosters-widget-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.fosters-widget-close:hover {
    background: #f5f5f5;
    transform: scale(1.05);
}

/* Messages Area - Centered Container */
.fosters-widget-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    background: transparent;
}

.fosters-message {
    margin-bottom: 16px;
    animation: fadeIn 0.3s ease;
}

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

.fosters-message-content {
    padding: 16px 20px;
    border-radius: 16px;
    max-width: 100%;
    word-wrap: break-word;
    font-size: 15px;
    line-height: 1.6;
}

.fosters-message-assistant .fosters-message-content {
    background: white;
    color: #333;
    border: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.fosters-message-user .fosters-message-content {
    background: #1e153d;
    color: white;
    margin-left: auto;
    box-shadow: 0 2px 12px rgba(30, 21, 61, 0.3);
}

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

/* Typing Indicator */
.fosters-typing-indicator {
    display: inline-flex;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.fosters-typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #999;
    margin: 0 2px;
    animation: typing 1.4s infinite;
}

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

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

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

/* Quick Reply Chips */
.fosters-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
    justify-content: center;
}

.fosters-chip {
    padding: 12px 24px;
    background: white;
    border: 2px solid #e0e0e0;
    color: #333;
    border-radius: 30px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.fosters-chip:hover {
    background: #1e153d;
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(30, 21, 61, 0.3);
}

/* Input Area - Centered at Bottom */
.fosters-widget-input {
    padding: 30px 20px;
    background: transparent;
    display: flex;
    gap: 12px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

#fosters-widget-input-field {
    flex: 1;
    padding: 16px 24px;
    border: 2px solid #e0e0e0;
    border-radius: 30px;
    font-size: 15px;
    outline: none;
    transition: all 0.3s;
    background: white;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

#fosters-widget-input-field:focus {
    border-color: #1e153d;
    box-shadow: 0 4px 20px rgba(30, 21, 61, 0.2);
}

#fosters-widget-send {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #1e153d;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 4px 16px rgba(30, 21, 61, 0.3);
}

#fosters-widget-send:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(30, 21, 61, 0.4);
}

#fosters-widget-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .fosters-widget-header {
        padding: 40px 20px 30px;
    }
    
    .fosters-widget-header h3 {
        font-size: 32px;
    }
    
    .fosters-widget-header h3::before {
        width: 48px;
        height: 48px;
    }
    
    .fosters-widget-subtitle {
        font-size: 14px;
    }
    
    .fosters-widget-input {
        padding: 20px 15px;
    }
    
    .fosters-chips {
        gap: 8px;
    }
    
    .fosters-chip {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Scrollbar Styling */
.fosters-widget-messages::-webkit-scrollbar {
    width: 6px;
}

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

.fosters-widget-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.fosters-widget-messages::-webkit-scrollbar-thumb:hover {
    background: #999;
}
