/* AI Chat Specific Styles */

/* AI Chat Header */
.ai-chat-header {
    background: var(--brand-gradient);
    color: white;
    padding: 160px 0 60px;
    text-align: center;
}

.ai-header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.ai-icon {
    width: 80px;
    height: 80px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.ai-chat-header h1 {
    font-size: 3rem;
    margin: 0;
    font-weight: 700;
}

.ai-chat-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0;
}

/* Chat Section */
.chat-section {
    padding: 40px 0;
    background: #f8f9fa;
    min-height: calc(100vh - 200px);
}

.chat-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Chat Container */
.chat-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 700px;
}

/* Chat Header */
.chat-header {
    background: var(--brand-gradient);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

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

.chat-info h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.status {
    font-size: 0.9rem;
    opacity: 0.8;
}

.status.online::before {
    content: "●";
    color: #4ade80;
    margin-right: 5px;
}

.chat-actions {
    margin-left: auto;
}

.clear-chat {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.clear-chat:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.message {
    display: flex;
    gap: 12px;
    max-width: 80%;
    animation: messageSlide 0.3s ease-out;
}

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

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

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

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

.user-message .message-avatar {
    background: var(--secondary-blue);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.ai-message .message-avatar {
    background: #f0f0f0;
}

.message-content {
    background: #f8f9fa;
    padding: 15px 18px;
    border-radius: 18px;
    border-bottom-left-radius: 6px;
    line-height: 1.5;
}

.message-content strong {
    font-weight: 600;
    color: #2d3748;
}

.message-content a {
    color: var(--secondary-blue);
    text-decoration: none;
}

.message-content a:hover {
    text-decoration: underline;
}

.user-message .message-content {
    background: var(--secondary-blue);
    color: white;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 6px;
}

.user-message .message-content strong {
    color: #fff;
}

.user-message .message-content a {
    color: #e2e8f0;
}

.message-content p {
    margin: 0 0 10px 0;
}

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

.message-content ul {
    margin: 10px 0;
    padding-left: 20px;
}

.message-content li {
    margin-bottom: 5px;
}

/* Quick Actions */
.quick-actions {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.quick-btn {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.quick-btn:hover {
    background: var(--secondary-blue);
    color: white;
    border-color: var(--secondary-blue);
}

/* Chat Input */
.chat-input-container {
    padding: 20px;
    border-top: 1px solid #eee;
    background: #fafafa;
}

.chat-input {
    display: flex;
    gap: 10px;
    align-items: center;
}

.chat-input input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.chat-input input:focus {
    border-color: var(--secondary-blue);
}

.send-btn {
    width: 45px;
    height: 45px;
    background: var(--secondary-blue);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.send-btn:hover {
    background: var(--secondary-blue);
}

.send-btn svg {
    width: 20px;
    height: 20px;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 10px 0;
    align-items: center;
}

.typing-indicator::before {
    content: "AI is thinking";
    font-size: 0.9rem;
    color: #666;
    margin-right: 10px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--secondary-blue);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

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

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

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

/* Sidebar */
.chat-sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar-section {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.sidebar-section h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid var(--secondary-blue);
    padding-bottom: 8px;
}

/* Feature List */
.feature-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.feature-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.feature-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.feature-item h4 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    color: #333;
}

.feature-item p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

/* Recent Quotes */
.recent-quotes {
    min-height: 100px;
}

.no-quotes {
    color: #888;
    font-style: italic;
    text-align: center;
    padding: 20px 0;
}

.quote-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid var(--secondary-blue);
}

.quote-item h4 {
    margin: 0 0 5px 0;
    font-size: 0.95rem;
    color: #333;
}

.quote-item p {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
}

/* Tips List */
.tips-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tip-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.tip-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.tip-item p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

/* Quote Display */
.quote-display {
    background: var(--brand-gradient);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin: 15px 0;
}

.quote-display h4 {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
}

.quote-options {
    display: grid;
    gap: 10px;
}

.quote-option {
    background: rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.quote-option h5 {
    margin: 0 0 5px 0;
    font-size: 1rem;
}

.quote-option p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.quote-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #4ade80;
}

/* Enhanced Quote Display */
.quote-display {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    margin: 8px 0;
    max-width: 100%;
}

.quote-display h4 {
    margin: 0 0 12px 0;
    color: #2d3748;
    font-size: 16px;
    font-weight: 600;
}

.quote-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quote-option {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.2s;
}

.quote-option:hover {
    border-color: var(--secondary-blue);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

.quote-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.quote-header h5 {
    margin: 0;
    color: #2d3748;
    font-size: 16px;
    font-weight: 600;
}

.quote-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--secondary-blue);
    margin: 0;
}

.quote-details {
    margin-bottom: 12px;
}

.quote-details p {
    margin: 4px 0;
    font-size: 13px;
    color: #718096;
}

.rating-info {
    font-weight: 500;
    color: #2d3748 !important;
}

.availability {
    color: #38a169 !important;
    font-weight: 500;
}

.services {
    color: #4a5568 !important;
}

.special-offer {
    color: #d69e2e !important;
    font-weight: 500;
    background: #fef5e7;
    padding: 4px 8px;
    border-radius: 4px;
    margin: 8px 0 !important;
}

.quote-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.quote-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.quote-btn:not(.secondary) {
    background: var(--secondary-blue);
    color: white;
}

.quote-btn:not(.secondary):hover {
    background: var(--secondary-blue);
    transform: translateY(-1px);
}

.quote-btn.secondary {
    background: #edf2f7;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}

.quote-btn.secondary:hover {
    background: #e2e8f0;
    border-color: #cbd5e0;
}

.quote-footer {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.quote-footer small {
    color: #718096;
    font-style: italic;
}

/* AI Status and Setup Styles */
.ai-status-message {
    margin: 15px 0;
    padding: 0;
    background: none;
    border: none;
}

.status-content {
    background: var(--brand-gradient);
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.status-icon {
    font-size: 18px;
}

.status-text {
    flex: 1;
    font-weight: 500;
}

.setup-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.setup-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.api-setup-container {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 20px;
    border-radius: 12px;
    margin: 10px 0;
    border: 1px solid #e1e8ed;
}

.api-setup-container h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 18px;
}

.api-setup-container p {
    margin: 10px 0;
    color: #5a6c7d;
    line-height: 1.5;
}

.input-group {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.api-key-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    background: white;
    transition: border-color 0.3s ease;
}

.api-key-input:focus {
    outline: none;
    border-color: var(--secondary-blue);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.setup-submit-btn {
    background: var(--brand-gradient);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.setup-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.setup-info {
    background: rgba(255, 255, 255, 0.7);
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    border-left: 4px solid var(--secondary-blue);
}

.setup-info ol {
    margin: 10px 0;
    padding-left: 20px;
}

.setup-info li {
    margin: 5px 0;
    color: #5a6c7d;
}

.setup-info a {
    color: var(--secondary-blue);
    text-decoration: none;
    font-weight: 600;
}

.setup-info a:hover {
    text-decoration: underline;
}

.setup-info small {
    color: #7f8c8d;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .chat-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .chat-sidebar {
        order: -1;
    }
    
    .sidebar-section {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .ai-chat-header {
        padding: 60px 0 40px;
    }
    
    .ai-chat-header h1 {
        font-size: 2.2rem;
    }
    
    .ai-icon {
        width: 60px;
        height: 60px;
    }
    
    .chat-container {
        height: 600px;
    }
    
    .chat-header {
        padding: 15px;
    }
    
    .chat-messages {
        padding: 15px;
    }
    
    .message {
        max-width: 90%;
    }
    
    .quick-actions {
        padding: 12px 15px;
    }
    
    .quick-btn {
        font-size: 0.8rem;
        padding: 6px 10px;
    }
    
    .chat-input-container {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .ai-chat-header h1 {
        font-size: 1.8rem;
    }
    
    .chat-layout {
        padding: 0 10px;
    }
    
    .chat-container {
        height: 500px;
    }
    
    .sidebar-section {
        padding: 15px;
    }
    
    .feature-item,
    .tip-item {
        flex-direction: column;
        gap: 8px;
    }
    
    .feature-icon,
    .tip-icon {
        align-self: flex-start;
    }
}