/* Extracted from index.html. Load order matters: the cascade depends on it (see index.html <link> order). */
/* MGH ASK Full View */
.mghask-workspace {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    gap: 1rem;
    height: calc(100vh - 170px);
    min-height: 560px;
}

.chat-container {
    background: var(--bg-surface);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    min-height: 0;
    border: 1px solid var(--border);
}

.chat-header {
    background: #102A5C;
    color: white;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.chat-header h4 { margin: 0; display: flex; align-items: center; gap: 0.5rem; font-size: 1rem; }

.chat-header p { margin: 0.2rem 0 0; color: rgba(255,255,255,0.68); font-size: 0.82rem; }

.chat-header button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.1rem;
}

.chat-body {
    flex: 1;
    padding: 1.25rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--bg);
}

.msg {
    padding: 0.85rem 1rem;
    border-radius: 8px;
    max-width: min(860px, 88%);
    font-size: 0.875rem;
    line-height: 1.4;
}

.msg.bot {
    background: white;
    align-self: flex-start;
    border: 1px solid var(--border);
    border-bottom-left-radius: 0;
}

.msg.user {
    background: var(--primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 0;
}

.msg.thinking {
    color: var(--text-muted);
}

.mghask-suggestions {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 1.1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #FFFFFF;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow: hidden;
}

.mghask-suggestions-label {
    color: var(--ink);
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.3;
}

.mghask-suggestions-intro {
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.45;
    margin: 0.3rem 0 0.9rem;
}

.mghask-chip-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-height: 0;
    overflow-y: auto;
    padding: 0.05rem 0.25rem 0.05rem 0;
}

.mghask-chip {
    border: 1px solid #D8E1F0;
    background: var(--bg);
    color: var(--ink-soft);
    border-radius: 9px;
    padding: 0.72rem 0.75rem;
    cursor: pointer;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 0.65rem;
    text-align: left;
    width: 100%;
    transition: border-color 0.18s, background 0.18s, transform 0.18s;
}

.mghask-chip i {
    align-items: center;
    background: var(--brand-soft);
    border-radius: 8px;
    color: var(--brand-ink);
    display: flex;
    height: 32px;
    justify-content: center;
    width: 32px;
}

.mghask-chip strong {
    color: var(--ink);
    display: block;
    font-size: 0.8rem;
    line-height: 1.25;
}

.mghask-chip span {
    color: var(--muted);
    display: block;
    font-size: 0.7rem;
    line-height: 1.35;
    margin-top: 0.18rem;
}

.mghask-chip:hover {
    border-color: var(--brand-line);
    color: var(--brand-hover);
    background: var(--brand-soft);
    transform: translateY(-1px);
}

@media (max-width: 980px) {
    .mghask-workspace {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 0;
    }
    .mghask-suggestions {
        max-height: 330px;
    }
    .chat-container {
        height: 620px;
    }
}

.mghask-result-title {
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.3rem;
}

.mghask-result-table-wrap {
    margin-top: 0.8rem;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.mghask-result-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 560px;
    background: #FFFFFF;
}

.mghask-result-table th,
.mghask-result-table td {
    text-align: left;
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
    font-size: 0.8rem;
}

.mghask-result-table th {
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: var(--bg);
}

.mghask-result-table tr:last-child td {
    border-bottom: 0;
}

.mghask-shipment-link {
    appearance: none;
    background: none;
    border: 0;
    color: var(--primary);
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.mghask-shipment-link:hover,
.mghask-shipment-link:focus-visible {
    color: var(--brand-ink);
}

.chat-input {
    padding: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.5rem;
    background: var(--bg-surface);
}

.chat-input textarea {
    flex: 1;
    min-height: 46px;
    max-height: 130px;
    resize: vertical;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    outline: none;
    font-family: inherit;
    font-size: 0.92rem;
}

.chat-input button {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    width: 48px;
    cursor: pointer;
    transition: background 0.2s;
}

.chat-input button:hover {
    background: var(--primary-hover);
}
