/**
 * Gemini Real Estate Chat Widget Styles
 */

/* Chat Widget Container */
.grec-chat {
    position: fixed;
    bottom: 20px;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.grec-chat--right {
    right: 20px;
}

.grec-chat--left {
    left: 20px;
}

/* Chat Toggle Button */
.grec-chat__toggle {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: 50px;
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.grec-chat__toggle:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.grec-chat__toggle-text {
    margin-right: 10px;
    font-weight: 500;
}

.grec-chat__toggle-icon {
    width: 24px;
    height: 24px;
}

.grec-chat__toggle-icon--close {
    display: none;
}

/* Chat Window */
.grec-chat__window {
    display: none;
    position: absolute;
    bottom: 70px;
    width: 350px;
    max-width: 90vw;
    height: 500px;
    max-height: 70vh;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    flex-direction: column;
}

.grec-chat--right .grec-chat__window {
    right: 0;
}

.grec-chat--left .grec-chat__window {
    left: 0;
}

/* Chat Header */
.grec-chat__header {
    padding: 15px;
    color: white;
    text-align: center;
}

.grec-chat__title {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

/* Chat Messages */
.grec-chat__messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background-color: #f7f7f7;
}

.grec-chat__message {
    margin-bottom: 15px;
    clear: both;
    max-width: 80%;
}

.grec-chat__message--user {
    float: right;
}

.grec-chat__message--ai {
    float: left;
}

.grec-chat__message--system {
    float: left;
    opacity: 0.8;
    max-width: 100%;
}

.grec-chat__message--error {
    float: left;
    background-color: #ffebee !important;
    border-color: #ffcdd2 !important;
    color: #b71c1c !important;
    max-width: 100%;
}

.grec-chat__message-content {
    padding: 10px 15px;
    border-radius: 18px;
    background-color: #e9e9eb;
    display: inline-block;
    word-break: break-word;
}

.grec-chat__message--user .grec-chat__message-content {
    background-color: #1e88e5;
    color: white;
    border-bottom-right-radius: 4px;
}

.grec-chat__message--ai .grec-chat__message-content {
    background-color: white;
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 4px;
}

.grec-chat__message--system .grec-chat__message-content {
    background-color: #f0f0f0;
    border: 1px solid #e0e0e0;
    font-style: italic;
}

/* Save Button */
.grec-chat__save-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 10px;
    background-color: #4caf50;
    color: white;
    font-size: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.grec-chat__save-btn:hover {
    background-color: #388e3c;
}

/* Chat Input */
.grec-chat__input-container {
    display: flex;
    align-items: center;
    padding: 10px;
    border-top: 1px solid #e0e0e0;
    background-color: white;
}

.grec-chat__input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    resize: none;
    outline: none;
    height: 40px;
    line-height: 20px;
    overflow-y: auto;
    max-height: 100px;
}

.grec-chat__send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background-color: #1e88e5;
    color: white;
    margin-left: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.grec-chat__send:hover {
    background-color: #1976d2;
}

.grec-chat__send svg {
    width: 20px;
    height: 20px;
}

/* Active state modifiers */
.grec-chat.is-active .grec-chat__toggle-icon--open {
    display: none;
}

.grec-chat.is-active .grec-chat__toggle-icon--close {
    display: block;
}

.grec-chat.is-active .grec-chat__window {
    display: flex;
}

/* Animations */
@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.grec-chat__window {
    animation: slideUp 0.3s ease;
}

/* Loading indicator */
.grec-chat__loading {
    display: inline-block;
    padding: 10px 15px;
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 18px;
    margin-bottom: 15px;
    float: left;
    clear: both;
}

.grec-chat__loading:after {
    content: '.';
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60% {
        content: '...';
    }
    80%, 100% {
        content: '';
    }
}

/* Saved response in content area */
.grec-saved-response {
    margin: 20px 0;
    padding: 20px;
    background-color: #f1f8e9;
    border-left: 4px solid #4caf50;
    border-radius: 4px;
}

.grec-saved-response h4 {
    margin-top: 0;
    color: #2e7d32;
}

/* Responsive styles */
@media (max-width: 480px) {
    .grec-chat__toggle-text {
        display: none;
    }
    
    .grec-chat__toggle {
        width: 50px;
        height: 50px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }
    
    .grec-chat__toggle-icon {
        margin: 0;
    }
    
    .grec-chat__window {
        height: 60vh;
        width: 85vw;
    }
} 