/* Chat Interface Styles for XBurg AI Realtor */

/*
 * NOTICE: Core layout styles have been moved to fullscreen.css
 * This file now focuses on chat interface-specific styles
 * such as message bubbles, property cards, and input controls
 */

/* 
 * The following commented styles are now defined in fullscreen.css
 * They are listed here for reference but are not active
 */

/* Chat panel structure - see fullscreen.css */
/* .chat-panel { ... } */

/* Chat header structure - see fullscreen.css */
/* .chat-header { ... } */

/* Logo elements - see fullscreen.css */
/* .logo, .logo-img, .logo-text { ... } */

/* Control buttons - see fullscreen.css */
/* .chat-controls, .btn-saved-chats, .btn-resume-chat, .btn-voice { ... } */

/* CHAT-SPECIFIC OVERRIDES */
/* These styles add specific behavior for the chat component */

/* Ensure all chat panel elements use border-box */
.chat-panel * {
    box-sizing: border-box;
}

/* Voice button - see fullscreen.css */
/* .btn-voice { ... } */

/* Chat Messages Area */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-color: white;
    width: 100%;
    box-sizing: border-box;
}

/* Message Bubbles */
.message {
    display: flex;
    max-width: 85%;
    margin-bottom: 15px;
}

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

.user-message {
    align-self: flex-end;
    margin-left: auto;
    justify-content: flex-end;
}

.message-content {
    padding: 12px 16px;
    border-radius: 18px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    line-height: 1.5;
    max-width: 100%;
}

.ai-message .message-content {
    background-color: #f8f8f8;
    border: 1px solid #eaeaea;
    border-radius: 18px 18px 18px 4px;
    color: #333;
}

.user-message .message-content {
    background-color: #4f0f87;
    color: white;
    border-radius: 18px 18px 4px 18px;
}

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

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

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

/* Property Cards in Chat */
.property-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    margin-top: 10px;
    padding-bottom: 5px;
    width: 100%;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch; /* Better scrolling on iOS */
}

.property-card {
    flex: 0 0 auto;
    width: 180px;
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 5px;
    border: 1px solid #eaeaea;
}

/* Mobile adjustments for property cards */
@media (max-width: 768px) {
    .property-list {
        margin-top: 8px;
        padding-bottom: 3px;
        gap: 8px; /* Smaller gap on mobile */
    }
    
    .property-card {
        width: 150px; /* Slightly smaller cards for mobile */
    }
    
    .property-details {
        padding: 8px 10px;
    }
    
    .property-price {
        font-size: 14px;
    }
    
    .property-specs {
        font-size: 12px;
        gap: 6px;
    }
    
    .property-location {
        font-size: 11px;
    }
}

.property-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.property-details {
    padding: 12px;
}

.property-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--xburg-purple);
    margin-bottom: 5px;
}

.property-specs {
    display: flex;
    gap: 8px;
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

.property-location {
    font-size: 12px;
    color: #888;
}

/* Chat Input Area */
.chat-input {
    padding: 15px 20px;
    background-color: white;
    border-top: 1px solid #eaeaea;
}

.input-container {
    display: flex;
    background-color: #f5f7fa;
    border-radius: 24px;
    overflow: hidden;
    padding: 0 5px 0 15px;
}

.input-container input {
    flex: 1;
    border: none;
    padding: 12px 0;
    background-color: transparent;
    outline: none;
    font-size: 14px;
}

.input-container button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background-color: var(--xburg-purple);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.input-container button:hover {
    background-color: #3d0a6b;
}

.chat-actions {
    display: flex;
    margin-top: 10px;
    justify-content: center;
    gap: 15px;
}

.action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: white;
    border: 1px solid #eaeaea;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #777;
}

.action-btn:hover {
    background-color: #f5f5f5;
    color: var(--xburg-purple);
}

/* Enhanced Visual feedback for voice input recording and processing */
.btn-voice.recording {
    background-color: #ff4444 !important;
    animation: pulse 1s infinite;
}

.btn-voice.recording i {
    color: white;
}

.btn-voice.processing {
    background-color: #ffa500 !important;
    animation: spin 1s linear infinite;
}

.btn-voice.processing i {
    color: white;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 8px rgba(255, 68, 68, 0.3);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

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

.chat-messages::-webkit-scrollbar-track {
    background-color: #f5f7fa;
}

.chat-messages::-webkit-scrollbar-thumb {
    background-color: #ddd;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background-color: #ccc;
}

/* New Chat Button Styling */
#newChatBtn {
    position: relative;
}

#newChatBtn .far.fa-comment {
    font-size: 1.5em;
}

#newChatBtn .fas.fa-plus {
    position: absolute;
    font-size: 0.8em;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
