.ai-chat-fab {
    align-items: center;
    background: #fff;
    border: 2px solid #C5A572;
    border-radius: 999px;
    bottom: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    display: flex;
    gap: 12px;
    max-width: calc(100vw - 32px);
    padding: 8px 18px 8px 8px;
    position: fixed;
    right: 24px;
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 9990;
}

.ai-chat-fab:hover {
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
    transform: translateY(-2px);
}

.ai-chat-fab img {
    border-radius: 50%;
    flex-shrink: 0;
    height: 52px;
    object-fit: cover;
    width: 52px;
}

.ai-chat-fab-icon {
    align-items: center;
    background: #C5A572;
    border-radius: 50%;
    color: #fff;
    display: flex;
    flex-shrink: 0;
    font-family: Montserrat, sans-serif;
    font-size: 14px;
    font-weight: 600;
    height: 52px;
    justify-content: center;
    width: 52px;
}

.ai-chat-fab-label {
    color: #222;
    font-family: Montserrat, sans-serif;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    text-align: left;
}

.ai-chat-panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    bottom: 96px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    height: min(520px, calc(100vh - 120px));
    overflow: hidden;
    position: fixed;
    right: 24px;
    width: min(380px, calc(100vw - 32px));
    z-index: 9991;
}

.ai-chat-panel[hidden] {
    display: none !important;
}

.ai-chat-header {
    align-items: center;
    background: linear-gradient(135deg, #1e293b, #334155);
    color: #fff;
    display: flex;
    justify-content: space-between;
    padding: 14px 16px;
}

.ai-chat-header-info {
    align-items: center;
    display: flex;
    gap: 12px;
}

.ai-chat-header-info strong {
    display: block;
    font-family: Montserrat, sans-serif;
    font-size: 14px;
    font-weight: 600;
}

.ai-chat-header-info span {
    color: rgba(255, 255, 255, 0.75);
    font-family: Montserrat, sans-serif;
    font-size: 11px;
}

.ai-chat-header-photo {
    border: 2px solid #C5A572;
    border-radius: 50%;
    height: 42px;
    object-fit: cover;
    width: 42px;
}

.ai-chat-close {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    font-size: 22px;
    height: 32px;
    line-height: 1;
    width: 32px;
}

.ai-chat-messages {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    padding: 16px;
}

.ai-chat-message {
    border-radius: 12px;
    font-family: Montserrat, sans-serif;
    font-size: 13px;
    line-height: 1.5;
    max-width: 88%;
    padding: 10px 14px;
    white-space: pre-wrap;
}

.ai-chat-message.user {
    align-self: flex-end;
    background: #C5A572;
    color: #fff;
}

.ai-chat-message.assistant {
    align-self: flex-start;
    background: #f3f4f6;
    color: #111;
}

.ai-chat-message.error {
    align-self: flex-start;
    background: #fef2f2;
    color: #991b1b;
}

.ai-chat-message.typing {
    color: #6b7280;
    font-style: italic;
}

.ai-chat-form {
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 8px;
    padding: 12px;
}

.ai-chat-form input {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    flex: 1;
    font-family: Montserrat, sans-serif;
    font-size: 13px;
    padding: 10px 12px;
}

.ai-chat-form button {
    background: #1e293b;
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    font-family: Montserrat, sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 16px;
}

.ai-chat-form button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

@media (max-width: 480px) {
    .ai-chat-fab-label {
        display: none;
    }

    .ai-chat-fab {
        padding: 6px;
    }

    .ai-chat-panel {
        bottom: 88px;
        right: 16px;
        width: calc(100vw - 32px);
    }
}
