/* Houzez Chatbot Frontend Styles */

/* Reset & Base */
.houzez-chatbot-page {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    background: #f5f7fa;
}

/* Container */
.chatbot-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
    background: #ffffff;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.1);
}

/* Header */
.chatbot-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 20px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.chatbot-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.chatbot-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.chatbot-title .chatbot-icon {
    font-size: 36px;
}

.chatbot-title h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

.chatbot-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
}

/* Main Chat Area */
.chatbot-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chatbot-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    background: #f5f7fa;
}

.chatbot-messages {
    max-width: 900px;
    margin: 0 auto;
}

/* Welcome Screen */
.chat-welcome {
    text-align: center;
    padding: 60px 20px;
}

.welcome-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: wave 1.5s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(20deg); }
    75% { transform: rotate(-20deg); }
}

.chat-welcome h2 {
    font-size: 32px;
    color: #1a202c;
    margin-bottom: 15px;
}

.chat-welcome p {
    font-size: 18px;
    color: #4a5568;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto 40px;
}

/* Quick Questions */
.quick-questions {
    margin-top: 40px;
}

.quick-questions h3 {
    font-size: 18px;
    color: #2d3748;
    margin-bottom: 20px;
}

.quick-question-btn {
    display: block;
    width: 100%;
    max-width: 600px;
    margin: 10px auto;
    padding: 15px 20px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    text-align: left;
    font-size: 15px;
    color: #2d3748;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-question-btn:hover {
    background: #667eea;
    color: #ffffff;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Chat Messages */
.chat-message {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.chat-message.user .message-avatar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.chat-message.assistant .message-avatar {
    background: #e2e8f0;
}

.message-content {
    flex: 1;
    max-width: 70%;
}

.message-bubble {
    padding: 15px 20px;
    border-radius: 18px;
    line-height: 1.6;
    word-wrap: break-word;
}

.chat-message.user .message-bubble {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

.chat-message.assistant .message-bubble {
    background: #ffffff;
    color: #2d3748;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 4px;
}

.message-time {
    font-size: 12px;
    color: #a0aec0;
    margin-top: 5px;
    padding: 0 5px;
}

/* Loading Indicator */
.chatbot-loading {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.typing-indicator {
    display: flex;
    gap: 5px;
    padding: 15px 20px;
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #667eea;
    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);
    }
    30% {
        transform: translateY(-10px);
    }
}

.chatbot-loading p {
    color: #718096;
    font-size: 14px;
    margin: 0;
}

/* Input Container */
.chatbot-input-container {
    padding: 20px 30px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
}

.chatbot-form {
    max-width: 900px;
    margin: 0 auto;
}

.input-wrapper {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

.chatbot-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    resize: none;
    min-height: 50px;
    max-height: 150px;
    transition: all 0.3s ease;
}

.chatbot-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-send {
    padding: 15px 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-send:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-send:active {
    transform: translateY(0);
}

.btn-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.input-hint {
    margin-top: 10px;
    text-align: center;
}

.input-hint small {
    color: #a0aec0;
    font-size: 13px;
}

/* Footer */
.chatbot-footer {
    padding: 15px 30px;
    background: #f7fafc;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.chatbot-footer p {
    margin: 0;
    font-size: 13px;
    color: #718096;
}

/* Responsive */
@media (max-width: 768px) {
    .chatbot-header {
        padding: 15px 20px;
    }
    
    .chatbot-title h1 {
        font-size: 22px;
    }
    
    .chatbot-actions {
        width: 100%;
        justify-content: stretch;
    }
    
    .chatbot-actions .btn {
        flex: 1;
        justify-content: center;
    }
    
    .chatbot-messages-container {
        padding: 20px 15px;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .chatbot-input-container {
        padding: 15px;
    }
    
    .input-wrapper {
        gap: 10px;
    }
    
    .btn-send {
        padding: 15px 20px;
    }
    
    .btn-send-text {
        display: none;
    }
}

/* Scrollbar Styling */
.chatbot-messages-container::-webkit-scrollbar {
    width: 8px;
}

.chatbot-messages-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chatbot-messages-container::-webkit-scrollbar-thumb {
    background: #c1c9d2;
    border-radius: 4px;
}

.chatbot-messages-container::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Property Cards Styling */
.property-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.property-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.property-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.property-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.property-card-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.property-card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.1) 100%);
}

.property-card-content {
    padding: 16px;
}

.property-card-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: #2d3748;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}

.property-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.property-meta-item {
    font-size: 12px;
    color: #718096;
    background: #edf2f7;
    padding: 4px 10px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.property-card-specs {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.spec-item {
    font-size: 13px;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 4px;
}

.property-card-price {
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 12px;
}

.property-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.property-card:hover .property-card-cta {
    transform: translateX(4px);
}

/* Mobile Responsive for Property Cards */
@media (max-width: 768px) {
    .property-cards-container {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px;
    }
    
    .property-card-image {
        height: 180px;
    }
    
    .property-card-title {
        font-size: 15px;
    }
    
    .property-card-price {
        font-size: 16px;
    }
}
