/* Chat bubble button (floating) */
.car-bubble-btn {
    position: fixed;
    bottom: 28px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #1976d2, #00b6f1);
    color: #fff;
    border-radius: 50%;
    border: none;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.25);
    z-index: 999999;
    transition: transform 0.25s ease;
}

/* English → bubble on RIGHT */
html[dir="ltr"] .car-bubble-btn {
    right: 28px;
}

/* Arabic → bubble on LEFT */
html[dir="rtl"] .car-bubble-btn {
    left: 28px;
}

.car-bubble-btn:hover {
    transform: scale(1.08);
}


/* CHAT WINDOW */
.car-chat-window {
    position: fixed;
    bottom: 110px;
    width: 720px;
    height: 900px;
    max-height: 80vh;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0px 8px 40px rgba(0, 0, 0, 0.25);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 999999;
}

/* English → drawer on RIGHT */
html[dir="ltr"] .car-chat-window {
    right: 28px;
}

/* Arabic → drawer on LEFT */
html[dir="rtl"] .car-chat-window {
    left: 28px;
}

.car-chat-window.open {
    display: flex;
    animation: fadeIn 0.25s ease;
}


/* Header */
.car-chat-header {
    background: linear-gradient(135deg, #1976d2, #00b6f1);
    color: #fff;
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    font-weight: bold;
}

.car-chat-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
}


/* Chat area */
.car-chat-log {
    flex: 1;
    padding: 14px;
    background: #f5f7fb;
    overflow-y: auto;
}


/* Messages */
.chat-msg {
    display: flex;
    margin-bottom: 10px;
}

.chat-msg.user {
    justify-content: flex-start;
}

.chat-msg.ai {
    justify-content: flex-end;
}

html[dir="rtl"] .chat-msg.user {
    justify-content: flex-end;
}

html[dir="rtl"] .chat-msg.ai {
    justify-content: flex-start;
}

.msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 15px;
    line-height: 1.6;
}

.chat-msg.user .msg {
    background: #1976d2;
    color: #fff;
}

.chat-msg.ai .msg {
    background: #eef1f6;
    color: #222;
}

.chat-msg.error .msg {
    background: #ffe3e3;
    color: #a00;
}


/* Input area */
.car-chat-input-box {
    background: white;
    padding: 10px;
    display: flex;
    border-top: 1px solid #ddd;
}

.car-chat-input-box input {
    flex: 1;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 10px 14px;
    font-size: 14px;
}

.car-chat-input-box button {
    width: 42px;
    height: 42px;
    margin-left: 8px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #1976d2, #00b6f1);
    color: #fff;
    cursor: pointer;
}


/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: translateY(0); }
}
.room-card img,
.car-img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 8px;
}
.img-box {
    width: 100%;
    height: 260px;        /* نفس ارتفاع الصورة */
    overflow: hidden;
    border-radius: 8px;
    background: #f5f5f5;
}
.compare-table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
    background: #fff;
}

.compare-table th,
.compare-table td {
    border: 1px solid #ddd;
    padding: 6px 10px;
}

.compare-table th {
    background: #f3f3f3;
    font-weight: bold;
}
/* ====== Car cards inside chatbot ====== */

.car-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e4e7f0;
    padding: 12px 14px;
    margin-bottom: 10px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 14px;
}

.car-card + .car-card {
    margin-top: 8px;
}

.car-image {
    width: 100%;
}

.car-image .no-img {
    width: 100%;
    height: 220px;
    border-radius: 8px;
    background: #f3f4f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 13px;
}

.car-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.car-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.car-title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 2px;
    color: #1f2937;
}

.car-info p {
    margin: 0;
    color: #374151;
}

.car-info b {
    font-weight: 600;
}

/* Contact block */
.car-contact {
    margin-top: 4px;
    padding-top: 6px;
    border-top: 1px dashed #e5e7eb;
    font-size: 13px;
    color: #111827;
}

.car-contact p {
    margin: 2px 0;
}

/* Actions */
.car-actions {
    margin-top: 8px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.car-chat-btn {
    border: none;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
    background: linear-gradient(135deg, #1976d2, #00b6f1);
    color: #fff;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.car-chat-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.45);
}
.car-view-btn {
    border: none;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
    background: #fff;
    color: #1976d2;
    border: 1px solid #1976d2;
    font-weight: 500;
    margin: 0;
    text-decoration: none;
}

html[dir="rtl"] .car-view-btn {
    margin-left: 8px;
    margin-right: 0;
}

.car-view-btn:hover {
    background: #1976d2;
    color: #fff;
}
