#eagersky-chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Manrope', sans-serif;
}

#chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c45c1c, #e07030);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(196, 92, 28, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s;
}

#chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(196, 92, 28, 0.5);
}

#chat-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 380px;
    height: 520px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    animation: chatSlideUp 0.25s ease-out;
}

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

#chat-header {
    background: linear-gradient(135deg, #c45c1c, #e07030);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

#chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scroll-behavior: smooth;
}

#chat-messages::-webkit-scrollbar {
    width: 4px;
}

#chat-messages::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 2px;
}

.chat-message {
    display: flex;
    animation: msgFadeIn 0.2s ease-out;
}

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

.chat-message.user {
    justify-content: flex-end;
}

.chat-message.bot {
    justify-content: flex-start;
}

.message-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.chat-message.bot .message-bubble {
    background: #f3f4f6;
    color: #1f2937;
    border-bottom-left-radius: 4px;
}

.chat-message.user .message-bubble {
    background: #c45c1c;
    color: white;
    border-bottom-right-radius: 4px;
}

#chat-suggestions {
    padding: 4px 16px 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex-shrink: 0;
}

#chat-suggestions:empty {
    display: none;
}

#chat-suggestions button {
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
    background: white;
    color: #c45c1c;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

#chat-suggestions button:hover {
    background: #c45c1c;
    color: white;
    border-color: #c45c1c;
}

#chat-input-area {
    padding: 12px 16px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    background: white;
}

#chat-input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    outline: none;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

#chat-input:focus {
    border-color: #c45c1c;
}

#chat-input:disabled {
    background: #f9fafb;
    cursor: not-allowed;
}

#send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #c45c1c;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}

#send-btn:hover {
    background: #a84d16;
}

#send-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
    align-items: center;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #9ca3af;
    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(-8px); opacity: 1; }
}

@media (max-width: 480px) {
    #chat-window {
        width: calc(100vw - 32px);
        height: calc(100vh - 120px);
        bottom: 70px;
        right: -8px;
        border-radius: 12px;
    }
}

/* Property Cards */
.property-results {
    margin: 8px 0;
    max-height: 400px;
    overflow-y: auto;
}
.property-results::-webkit-scrollbar { width: 3px; }
.property-results::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 2px; }

.property-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 10px;
    transition: box-shadow 0.2s;
}
.property-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.08); }

.property-card-img {
    position: relative;
    height: 140px;
    overflow: hidden;
    background: #f3f4f6;
}
.property-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.property-rating {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.7);
    color: #f59e0b;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.property-rating i { margin-right: 2px; }

.property-card-body { padding: 12px; }

.property-card-title {
    font-weight: 700;
    font-size: 14px;
    color: #1f2937;
    margin-bottom: 4px;
    line-height: 1.3;
}

.property-card-location {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 6px;
}
.property-card-location i { color: #c45c1c; margin-right: 3px; }

.property-card-details {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 8px;
}

.property-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.property-card-price {
    font-weight: 700;
    color: #c45c1c;
    font-size: 15px;
}

.property-card-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.property-btn {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}
.property-btn-view {
    background: #c45c1c;
    color: white;
}
.property-btn-view:hover { background: #a84d16; }

.property-map-link {
    font-size: 12px;
    color: #059669;
    text-decoration: none;
}
.property-map-link:hover { text-decoration: underline; }
.property-map-link i { margin-right: 2px; }

.property-more {
    text-align: center;
    padding: 8px;
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

/* Notifications */
.chat-notifications {
    margin: 8px 0;
}
.chat-notification {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 10px;
    margin-bottom: 6px;
    font-size: 13px;
}
.chat-notification i {
    color: #0284c7;
    margin-top: 2px;
    flex-shrink: 0;
}
.chat-notification.payment {
    background: #fef3c7;
    border-color: #fde68a;
}
.chat-notification.payment i { color: #d97706; }
.chat-notification.maintenance {
    background: #fef2f2;
    border-color: #fecaca;
}
.chat-notification.maintenance i { color: #dc2626; }
.chat-notification strong { display: block; margin-bottom: 2px; color: #1f2937; }
.chat-notification p { margin: 0; color: #4b5563; font-size: 12px; }

/* Chat links */
.chat-link {
    color: #c45c1c;
    text-decoration: underline;
    text-decoration-style: dotted;
}
.chat-link:hover { text-decoration-style: solid; }

.message-bubble h2, .message-bubble h3, .message-bubble h4 {
    margin: 8px 0 4px;
    font-weight: 700;
    color: #1f2937;
}
.message-bubble ul {
    margin: 4px 0;
    padding-left: 18px;
}
.message-bubble li {
    margin-bottom: 2px;
    font-size: 14px;
}
.message-bubble code {
    background: #e5e7eb;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 13px;
}

/* Message Timestamp */
.message-time {
    font-size: 10px;
    color: #9ca3af;
    margin-top: 4px;
    padding: 0 4px;
}
.chat-message.user .message-time {
    text-align: right;
}
.message-extra {
    margin-top: 4px;
}

/* Notification Actions */
.notification-action {
    display: inline-block;
    margin-top: 6px;
    padding: 4px 12px;
    background: #c45c1c;
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}
.notification-action:hover {
    background: #a84d16;
}

/* Ticket Info */
.chat-ticket {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 10px 12px;
    margin-top: 8px;
    font-size: 13px;
}
.ticket-id {
    font-weight: 700;
    color: #166534;
    margin-bottom: 4px;
}
.ticket-detail {
    color: #4b5563;
    font-size: 12px;
}

/* Online Status Indicator */
#chat-status {
    position: relative;
}
#chat-status::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}

/* Textarea auto-resize */
#chat-input {
    resize: none;
    min-height: 40px;
    max-height: 100px;
    overflow-y: hidden;
}

/* Empty suggestions hidden */
#chat-suggestions:empty {
    display: none;
}
