/* =========================
   BASE (UNCHANGED)
   ========================= */

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin-bottom: 60px;
    background-color: #f4f6f9;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}


/* =========================
   CHAT UI (FINAL — SAME BOTH SIDES)
   ========================= */

.chat-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 500px;
    overflow-y: auto;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    max-width: 900px;
    margin: 0 auto;
}

/* ROW */
.chat-row {
    display: flex;
    width: 100%;
}

    /* LEFT (USER) */
    .chat-row.user {
        justify-content: flex-start;
    }

    /* RIGHT (ADMIN) */
    .chat-row.admin {
        justify-content: flex-end;
    }

/* BUBBLE BASE */
.chat-bubble {
    max-width: 65%;
    padding: 14px 16px;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    background: white;
    color: #1f2937;
}

/* 🔥 FIXES ALIGNMENT (THIS WAS YOUR BUG) */
.chat-row.user .chat-bubble {
    margin-left: 10px;
    margin-right: auto;
}

.chat-row.admin .chat-bubble {
    margin-left: auto;
    margin-right: 10px;
}

/* USER STYLE (BLUE) */
.chat-row.user .chat-bubble {
    background: #e6f0ff;
    border: 1px solid #c7dcff;
}

/* ADMIN STYLE (LIGHT GREEN) */
.chat-row.admin .chat-bubble {
    background: #e8f7ec;
    border: 1px solid #c7ebd2;
}


/* =========================
   TEXT
   ========================= */

.chat-header {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #475569;
}

.chat-message {
    font-size: 14px;
    line-height: 1.5;
}

.chat-time {
    font-size: 11px;
    margin-top: 6px;
    text-align: right;
    color: #94a3b8;
}


/* =========================
   ATTACHMENTS
   ========================= */

.attachments {
    margin-top: 10px;
}

.attachment-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 13px;
    background: rgba(255,255,255,0.7);
    border: 1px solid rgba(0,0,0,0.05);
}

    .attachment-pill a {
        text-decoration: none;
        color: #2563eb;
        font-weight: 500;
    }

        .attachment-pill a:hover {
            text-decoration: underline;
        }


/* =========================
   SCROLLBAR (OPTIONAL)
   ========================= */

.chat-container::-webkit-scrollbar {
    width: 8px;
}

.chat-container::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
}

.chat-container::-webkit-scrollbar-track {
    background: transparent;
}
