/* AI Chat Interface Styles for Sol Azteca AI */

/* Chat Toggle Button */
.chat-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(255, 107, 53, 0.4);
    background: linear-gradient(135deg, #e55a2b, #e8851a);
}

.chat-icon {
    font-size: 20px;
}

/* Main Chat Container */
.ai-chat-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 400px;
    height: 600px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    transform: translateY(100%) scale(0.8);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1001;
    overflow: hidden;
}

.ai-chat-container.open {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Chat Header */
.chat-header {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 20px 20px 0 0;
}

.chat-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-icon {
    font-size: 24px;
}

.chat-title h3 {
    margin: 0;
    font-size: 18px;
}

.chat-status {
    background: #27ae60;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    margin-left: 10px;
}

.chat-controls {
    display: flex;
    gap: 5px;
}

.chat-control-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: background 0.3s;
}

.chat-control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 85%;
    word-wrap: break-word;
}

.user-message {
    align-self: flex-end;
}

.user-message .message-content {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    padding: 12px 16px;
    border-radius: 18px 18px 4px 18px;
    font-size: 14px;
    line-height: 1.4;
}

.ai-message {
    align-self: flex-start;
}

.ai-message .message-content {
    background: white;
    color: #2c3e50;
    padding: 12px 16px;
    border-radius: 18px 18px 18px 4px;
    font-size: 14px;
    line-height: 1.4;
    border: 1px solid #e9ecef;
}

.message-time {
    font-size: 11px;
    color: #6c757d;
    margin-top: 4px;
    text-align: right;
}

.user-message .message-time {
    text-align: right;
}

.ai-message .message-time {
    text-align: left;
}

/* Typing Indicator */
.typing-indicator .message-content {
    padding: 16px;
}

.typing-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff6b35;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Itinerary Card */
.itinerary-card {
    background: linear-gradient(135deg, #fff3e0, #ffe0cc);
    border: 2px solid #ff6b35;
    border-radius: 15px;
    padding: 20px;
    margin: 10px 0;
}

.itinerary-header h4 {
    color: #2c3e50;
    margin: 0 0 10px 0;
    font-size: 16px;
}

.itinerary-details {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.itinerary-details span {
    background: rgba(255, 107, 53, 0.1);
    color: #ff6b35;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.itinerary-days {
    margin-bottom: 15px;
}

.day-plan {
    background: white;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    border-left: 4px solid #ff6b35;
}

.day-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.day-number {
    background: #ff6b35;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.day-title {
    font-weight: bold;
    color: #2c3e50;
    font-size: 14px;
}

.day-activities {
    font-size: 13px;
    color: #6c757d;
    line-height: 1.4;
}

.activity {
    margin-bottom: 2px;
}

.itinerary-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.itinerary-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.itinerary-btn.primary {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
}

.itinerary-btn.primary:hover {
    background: linear-gradient(135deg, #e55a2b, #e8851a);
    transform: translateY(-1px);
}

.itinerary-btn.secondary {
    background: white;
    color: #ff6b35;
    border: 1px solid #ff6b35;
}

.itinerary-btn.secondary:hover {
    background: #ff6b35;
    color: white;
}

/* Chat Input */
.chat-input-container {
    background: white;
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
}

.input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

#chat-input {
    flex: 1;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    padding: 12px 16px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

#chat-input:focus {
    border-color: #ff6b35;
}

.voice-btn, .send-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s;
}

.voice-btn {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
}

.voice-btn:hover {
    background: linear-gradient(135deg, #5a6268, #3d4043);
    transform: scale(1.05);
}

.voice-btn.listening {
    background: linear-gradient(135deg, #dc3545, #c82333);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.send-btn {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
}

.send-btn:hover {
    background: linear-gradient(135deg, #e55a2b, #e8851a);
    transform: scale(1.05);
}

/* Quick Suggestions */
.quick-suggestions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.suggestion-btn {
    background: rgba(255, 107, 53, 0.1);
    color: #ff6b35;
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 15px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.suggestion-btn:hover {
    background: #ff6b35;
    color: white;
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .ai-chat-container {
        width: calc(100vw - 20px);
        height: calc(100vh - 40px);
        bottom: 10px;
        right: 10px;
        left: 10px;
        border-radius: 15px;
    }
    
    .chat-toggle {
        bottom: 15px;
        right: 15px;
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .chat-header {
        padding: 15px;
    }
    
    .chat-messages {
        padding: 15px;
    }
    
    .itinerary-details {
        flex-direction: column;
        gap: 8px;
    }
    
    .itinerary-actions {
        flex-direction: column;
    }
    
    .itinerary-btn {
        width: 100%;
        text-align: center;
    }
    
    .quick-suggestions {
        flex-direction: column;
    }
    
    .suggestion-btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .ai-chat-container {
        width: 100vw;
        height: 100vh;
        bottom: 0;
        right: 0;
        left: 0;
        border-radius: 0;
    }
    
    .chat-header {
        border-radius: 0;
    }
}

/* Scrollbar Styling */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #ff6b35;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #e55a2b;
}