/* ===============================
   🏛️ Museum Assistant Page Only
=============================== */

/* reduce top padding of the section */
.museum-assistant-page.section {
    padding-top: 40px; /* adjust if needed (was likely ~80–120px) */
}

/* tighten heading spacing */
.museum-assistant-page h1 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 42px; /* optional tweak */
}

/* tighten paragraph spacing under title */
.museum-assistant-page p {
    margin-top: 0;
    margin-bottom: 20px;
    color: rgba(255,255,255,0.85); /* softer than pure white */
    font-size: 16px;
    line-height: 1.6;
}

/* ===============================
   MUSEUM ASSISTANT UI
================================ */

/* ===============================
   MUSEUM ASSISTANT UI (THEMED)
================================ */

.assistant-wrapper {
    max-width: 1400px !important;
    width: 100% !important;
    margin: 30px auto;
    /* 🔵 Deep blue gradient instead of flat black */
    background: linear-gradient(145deg, #0b1a2a, #0e2238);
    /* 🟡 Gold border */
    border: 1px solid rgba(212, 175, 55, 0.6);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    height: 65vh;
    max-height: 700px;
    overflow: hidden;
    min-width: 0;
    /* subtle glow */
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.15);
}

.assistant-wrapper::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(
        to right,
        transparent,
        rgba(212,175,55,0.8),
        transparent
    );
}

.section .container {
    max-width: 1400px !important;
}

/* ===============================
   CHAT AREA (💣 FIXED)
================================ */

.assistant-chat {
    flex: 1;
    min-height: 0;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    /* 🔵 subtle inner tint */
    background: rgba(5, 15, 30, 0.6);
	overscroll-behavior: contain;
}

/* ===============================
   MESSAGES
================================ */

.message {
    padding: 12px 16px;
    border-radius: 10px;

    display: block;
    width: auto;
    max-width: 80%;

    box-sizing: border-box;

    line-height: 1.5;
    font-size: 0.95rem;

    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;

    flex-shrink: 0;   /* 💣 prevents vertical compression */
}

/* ensure typed spans don't break layout */
.message span {
    display: inline;
    word-break: break-word;
}

/* ===============================
   USER MESSAGE
================================ */

.message.user {
    background: #7c4dff;
    color: #fff;

    margin-left: auto;
    align-self: flex-end;
}

/* ===============================
   ASSISTANT MESSAGE
================================ */

.message.assistant {
    background: #06101a; /* deeper than input bar */
    color: #e0e0e0;

    align-self: flex-start;

    max-width: 80%;
    min-width: 0;
    min-height: 20px;

    border: 1px solid rgba(212, 175, 55, 0.25); /* subtle gold edge */
}

.message.assistant > div {
    background: transparent !important;
    border: none !important;
}

/* ===============================
   LINKS
================================ */

.message.assistant a {
    color: #d4af37; /* rich gold */
    text-decoration: none;
    font-weight: 500;

    display: inline;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.message.assistant a:hover {
    color: #ffd700; /* brighter gold */
    text-decoration: underline;
}

/* ===============================
   INPUT ROW
================================ */

.assistant-input-row {
    display: flex;
    border-top: 1px solid rgba(212, 175, 55, 0.3); /* gold accent instead of grey */
    background: #071422; /* darker, richer blue */

    flex-shrink: 0;
}

/* INPUT */

#assistant-input {
    flex: 1;
    padding: 14px;
    border: none;
    background: transparent;
    color: #ffffff;
    font-size: 0.95rem;
    outline: none;
}

/* BUTTON */

#assistant-send {
    padding: 0 20px;
    border: none;
    background: linear-gradient(135deg, #7c4dff, #5a36cc);
    color: #ffffff;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s ease;
}

#assistant-send:hover {
    opacity: 0.85;
}

/* ===============================
   SCROLLBAR
================================ */

.assistant-chat::-webkit-scrollbar {
    width: 6px;
}

.assistant-chat::-webkit-scrollbar-thumb {
    background: #2e2e2e;
    border-radius: 4px;
}

/* ===============================
   MOBILE
================================ */

@media (max-width: 768px) {

    .assistant-wrapper {
        margin: 0;
        height: 100vh;
        border-radius: 0;
    }

    .assistant-chat {
        padding: 15px;
    }

    .message {
        max-width: 100%;
    }
}

/* ===============================
   CONTAINER OVERRIDE
================================ */

body .section.section-large .container {
    max-width: 1600px !important;
    width: 100% !important;
    padding-left: 20px;
    padding-right: 20px;
}