/* Version 2.0.3: the Documents Hub always owns the full theme content column.
   Total/WPBakery can keep the shortcode outside post_content, so both a body
   class and :has(.ldl-library) are used. The inline JS in the shortcode is the
   fallback for cached/page-builder markup. */
body.ldl-document-library-page #content-wrap,
body:has(.ldl-library) #content-wrap {
    display: block !important;
}

body.ldl-document-library-page #content-wrap > .content-area,
body.ldl-document-library-page #content-wrap > #primary,
body:has(.ldl-library) #content-wrap > .content-area,
body:has(.ldl-library) #content-wrap > #primary {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body.ldl-document-library-page #content-wrap > .sidebar-container,
body.ldl-document-library-page #content-wrap > #secondary,
body.ldl-document-library-page #content-wrap > #sidebar,
body:has(.ldl-library) #content-wrap > .sidebar-container,
body:has(.ldl-library) #content-wrap > #secondary,
body:has(.ldl-library) #content-wrap > #sidebar {
    display: none !important;
}

body.ldl-document-library-page .ldl-library,
body:has(.ldl-library) .ldl-library {
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 1400px;
}

.ldl-library {
    margin-left: auto;
    margin-right: auto;
}

.ldl-library {
    --ldl-navy: #111a43;
    --ldl-navy-2: #1d2a5a;
    --ldl-border: #dde2ea;
    --ldl-muted: #667085;
    --ldl-bg: #f6f7f9;
    --ldl-white: #fff;
    color: #18213f;
    font-family: inherit;
    width: 100%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.ldl-library * { box-sizing: border-box; }
.ldl-library [hidden] { display: none !important; }
.ldl-library button, .ldl-library input { font: inherit; }

.ldl-intro {
    align-items: center;
    background: linear-gradient(110deg, rgba(11, 19, 50, .98), rgba(23, 38, 86, .92));
    color: var(--ldl-white);
    display: flex;
    justify-content: space-between;
    margin-bottom: 34px;
    min-height: 250px;
    overflow: hidden;
    padding: clamp(34px, 5vw, 66px);
    position: relative;
}

.ldl-intro::after {
    background: linear-gradient(135deg, transparent 45%, rgba(255,255,255,.035) 45% 55%, transparent 55%);
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.ldl-intro > div:first-child { max-width: 730px; position: relative; z-index: 1; }
.ldl-eyebrow { font-size: 12px !important; font-weight: 700; letter-spacing: .15em; margin: 0 0 12px !important; text-transform: uppercase; }
.ldl-intro h1 { color: #fff; font-size: clamp(34px, 5vw, 58px); letter-spacing: -.035em; line-height: 1.05; margin: 0 0 18px; text-transform: uppercase; }
.ldl-intro p:last-child { font-size: 18px; line-height: 1.65; margin: 0; max-width: 690px; }
.ldl-intro-icon { opacity: .95; position: relative; width: 120px; z-index: 1; }
.ldl-intro-icon svg { display: block; width: 100%; }

.ldl-layout { display: grid; gap: 26px; grid-template-columns: 245px minmax(0, 1fr); }

.ldl-filters {
    align-self: start;
    background: #fff;
    border: 1px solid var(--ldl-border);
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    overscroll-behavior: contain;
    position: sticky;
    scrollbar-gutter: stable;
    top: 30px;
}

.ldl-filter-heading {
    align-items: center;
    border-bottom: 1px solid var(--ldl-border);
    display: flex;
    font-size: 14px;
    justify-content: space-between;
    letter-spacing: .02em;
    padding: 20px;
    text-transform: uppercase;
}

.ldl-filter-close { background: none; border: 0; cursor: pointer; display: none; font-size: 28px; line-height: 1; }
.ldl-filter-group { border-bottom: 1px solid var(--ldl-border); padding: 5px 18px 14px; }
.ldl-filter-group-title { align-items: center; background: transparent; border: 0; color: var(--ldl-navy); cursor: pointer; display: flex; font-size: 12px; font-weight: 800; justify-content: space-between; padding: 15px 0 8px; text-align: left; text-transform: uppercase; width: 100%; }
.ldl-filter-options { display: grid; gap: 5px; }
.ldl-filter-group.is-collapsed .ldl-filter-options { display: none; }
.ldl-filter-options label { align-items: center; cursor: pointer; display: grid; font-size: 13px; gap: 9px; grid-template-columns: 18px minmax(0,1fr) auto; line-height: 1.35; padding: 4px 0; }
.ldl-filter-options input { accent-color: var(--ldl-navy); height: 16px; margin: 0; width: 16px; }
.ldl-filter-options small { color: #8a91a2; font-size: 11px; }
.ldl-reset-filters { background: #fff; border: 1px solid #cfd5df; color: var(--ldl-navy); cursor: pointer; font-size: 12px; font-weight: 700; margin: 16px 16px 45px; padding: 11px 15px; text-transform: uppercase; width: calc(100% - 32px); }

.ldl-results {
    min-width: 0;
    max-height: none;
    overflow: visible;
    overscroll-behavior: auto;
    scrollbar-gutter: auto;
}
.ldl-toolbar { align-items: center; display: flex; gap: 20px; justify-content: space-between; margin-bottom: 16px; }
.ldl-search { align-items: center; border: 1px solid var(--ldl-border); display: flex; flex: 1; gap: 10px; max-width: 610px; padding: 0 14px; }
.ldl-search svg { color: #5f6678; flex: 0 0 20px; width: 20px; }
.ldl-search input { background: transparent; border: 0 !important; box-shadow: none !important; min-height: 48px; outline: 0; padding: 0; width: 100%; }
.ldl-result-count { color: #475067; font-size: 13px; white-space: nowrap; }
.ldl-result-count strong { color: var(--ldl-navy); }

.ldl-quick-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.ldl-quick-filters button { background: #fff; border: 1px solid var(--ldl-border); color: #26304c; cursor: pointer; font-size: 12px; font-weight: 700; padding: 10px 14px; }
.ldl-quick-filters button.is-active { background: var(--ldl-navy); border-color: var(--ldl-navy); color: #fff; }

.ldl-cards { display: grid; gap: 14px; }
.ldl-card { align-items: stretch; background: #fff; border: 1px solid var(--ldl-border); display: grid; grid-template-columns: 150px minmax(0, 1fr) minmax(270px, .8fr); min-height: 198px; }
.ldl-card-cover { background: var(--ldl-bg); min-height: 198px; overflow: hidden; padding: 14px; }
.ldl-card-cover img { display: block; height: 100%; object-fit: cover; width: 100%; }
.ldl-cover-placeholder { background: linear-gradient(155deg, #162454, #0d1538); color: #fff; display: flex; flex-direction: column; height: 100%; justify-content: flex-end; min-height: 170px; padding: 16px; text-transform: uppercase; }
.ldl-cover-placeholder span { font-size: 10px; letter-spacing: .12em; margin-bottom: 8px; }
.ldl-cover-placeholder strong { font-size: 18px; line-height: 1.1; }
.ldl-card-content { padding: 24px 26px; }
.ldl-card-type { color: #24427f; font-size: 11px; font-weight: 800; letter-spacing: .04em; margin-bottom: 8px; text-transform: uppercase; }
.ldl-card h2 { color: var(--ldl-navy); font-size: 20px; line-height: 1.2; margin: 0 0 10px; text-transform: uppercase; }
.ldl-card-content > p { color: #4d5568; font-size: 14px; line-height: 1.55; margin: 0 0 14px; }
.ldl-meta { color: #5d6578; display: flex; flex-wrap: wrap; font-size: 12px; gap: 0; margin-top: 14px; }
.ldl-meta span + span::before { color: #c2c6cf; content: "|"; margin: 0 10px; }
.ldl-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.ldl-tags span { background: #f0f2f6; border-radius: 30px; color: #46516c; font-size: 11px; padding: 6px 10px; }
.ldl-card-request { border-left: 1px solid var(--ldl-border); display: flex; flex-direction: column; justify-content: center; padding: 24px; }
.ldl-card-request > strong { color: var(--ldl-navy); font-size: 12px; margin-bottom: 12px; text-transform: uppercase; }
.ldl-request-form { display: grid; gap: 9px; }
.ldl-request-form > input[type="email"] { border: 1px solid #ccd2dd !important; border-radius: 0 !important; box-shadow: none !important; min-height: 44px; padding: 9px 12px; width: 100%; }
.ldl-request-form > button { background: var(--ldl-navy); border: 1px solid var(--ldl-navy); border-radius: 0; color: #fff; cursor: pointer; font-size: 12px; font-weight: 800; min-height: 44px; padding: 10px 16px; text-transform: uppercase; transition: background .2s ease; }
.ldl-request-form > button:hover { background: var(--ldl-navy-2); }
.ldl-request-form > button:disabled { cursor: wait; opacity: .65; }
.ldl-direct-download { align-items: center; background: var(--ldl-navy); border: 1px solid var(--ldl-navy); color: #fff !important; display: inline-flex; font-size: 12px; font-weight: 800; justify-content: center; min-height: 44px; padding: 10px 16px; text-decoration: none !important; text-transform: uppercase; transition: background .2s ease; }
.ldl-direct-download:hover { background: var(--ldl-navy-2); color: #fff !important; }
.ldl-file-unavailable { color: #697184; font-size: 12px; }
.ldl-consent { align-items: flex-start; color: #697184; display: flex; font-size: 10px; gap: 7px; line-height: 1.35; }
.ldl-consent input { flex: 0 0 auto; margin-top: 2px; }
.ldl-form-message { font-size: 12px; line-height: 1.35; min-height: 0; }
.ldl-form-message.is-success { color: #157347; }
.ldl-form-message.is-error { color: #b42318; }
.ldl-honeypot { height: 0; left: -9999px; overflow: hidden; position: absolute; width: 0; }
.ldl-no-results { background: var(--ldl-bg); border: 1px solid var(--ldl-border); padding: 40px; text-align: center; }
.ldl-mobile-filter-row { display: none; }


/* Subtle custom scrollbars */
.ldl-filters,
.ldl-quick-filters {
    scrollbar-width: thin;
    scrollbar-color: rgba(20, 32, 70, .24) transparent;
}

.ldl-filters::-webkit-scrollbar {
    width: 7px;
}

.ldl-quick-filters::-webkit-scrollbar {
    height: 7px;
}

.ldl-filters::-webkit-scrollbar-track,
.ldl-quick-filters::-webkit-scrollbar-track {
    background: transparent;
}

.ldl-filters::-webkit-scrollbar-thumb,
.ldl-quick-filters::-webkit-scrollbar-thumb {
    background: rgba(20, 32, 70, .18);
    border-radius: 999px;
    border: 1px solid transparent;
    background-clip: padding-box;
}

.ldl-filters:hover::-webkit-scrollbar-thumb,
.ldl-quick-filters:hover::-webkit-scrollbar-thumb {
    background: rgba(20, 32, 70, .30);
}

.ldl-filters::-webkit-scrollbar-corner,
.ldl-quick-filters::-webkit-scrollbar-corner {
    background: transparent;
}

@media (max-width: 1050px) {
    .ldl-card { grid-template-columns: 130px minmax(0, 1fr); }
    .ldl-card-request { border-left: 0; border-top: 1px solid var(--ldl-border); grid-column: 1 / -1; }
}

@media (max-width: 800px) {
    .ldl-intro { min-height: 220px; }
    .ldl-intro-icon { width: 82px; }
    .ldl-layout { display: block; }
    .ldl-results { max-height: none; overflow: visible; overscroll-behavior: auto; scrollbar-gutter: auto; }
    .ldl-mobile-filter-row { display: flex; justify-content: flex-end; margin-bottom: 16px; }
    .ldl-mobile-filter-toggle { background: var(--ldl-navy); border: 0; color: #fff; cursor: pointer; font-weight: 700; padding: 11px 16px; }
    .ldl-filters { bottom: 0; box-shadow: 0 0 40px rgba(0,0,0,.18); left: 0; max-height: none; max-width: 340px; overflow-y: auto; overscroll-behavior: contain; position: fixed; scrollbar-gutter: auto; top: 0; transform: translateX(-105%); transition: transform .25s ease; width: 90%; z-index: 999999; }
    .ldl-filters.is-open { transform: translateX(0); }
    .ldl-filter-close { display: block; }
    body.ldl-filter-open { overflow: hidden; }
    .ldl-toolbar { align-items: stretch; flex-direction: column; }
    .ldl-search { max-width: none; }
    .ldl-result-count { text-align: right; }
}

@media (max-width: 600px) {
    .ldl-intro { padding: 30px 24px; }
    .ldl-intro-icon { display: none; }
    .ldl-intro p:last-child { font-size: 16px; }
    .ldl-card { grid-template-columns: 96px minmax(0, 1fr); }
    .ldl-card-cover { min-height: 150px; padding: 9px; }
    .ldl-cover-placeholder { min-height: 132px; padding: 10px; }
    .ldl-cover-placeholder strong { font-size: 13px; }
    .ldl-card-content { padding: 18px 16px; }
    .ldl-card h2 { font-size: 16px; }
    .ldl-card-content > p { font-size: 13px; }
    .ldl-card-request { padding: 18px 16px; }
    .ldl-quick-filters { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
    .ldl-quick-filters button { flex: 0 0 auto; }
}

/* LION Document AI */
.ldl-ai {
    background: #fff;
    border: 1px solid var(--ldl-border);
    box-shadow: 0 12px 34px rgba(17, 26, 67, .07);
    margin: 0 0 34px;
    overflow: hidden;
}
.ldl-ai-head {
    align-items: center;
    background: linear-gradient(110deg, #0d1538, #1c2c65);
    color: #fff;
    display: grid;
    gap: 14px;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    min-height: 82px;
    padding: 17px 22px;
}
.ldl-ai-mark {
    align-items: center;
    background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.18), rgba(255,255,255,.08));
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .16), inset 0 1px 0 rgba(255,255,255,.07);
    display: flex;
    height: 44px;
    isolation: isolate;
    justify-content: center;
    overflow: visible;
    position: relative;
    transform-origin: center bottom;
    width: 44px;
    animation: ldl-ai-avatar-float 4.8s ease-in-out infinite;
}
.ldl-ai-mark::before,
.ldl-ai-mark::after {
    border-radius: 50%;
    content: "";
    pointer-events: none;
    position: absolute;
}
.ldl-ai-mark::before {
    inset: -2px;
    background: conic-gradient(from 0deg, #72e39d, #53d0ff, #9184ff, #f47cff, #ffd166, #72e39d);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
    opacity: .95;
    animation: ldl-ai-ring-spin 6.5s linear infinite;
    z-index: -1;
}
.ldl-ai-mark::after {
    inset: -5px;
    background: conic-gradient(from 120deg, rgba(114,227,157,.75), rgba(83,208,255,.65), rgba(145,132,255,.72), rgba(244,124,255,.72), rgba(255,209,102,.75), rgba(114,227,157,.75));
    filter: blur(6px);
    opacity: .45;
    animation: ldl-ai-ring-spin 8.8s linear infinite reverse;
    z-index: -2;
}
.ldl-ai-mark img {
    display: block;
    height: 29px;
    object-fit: contain;
    position: relative;
    width: 27px;
    z-index: 1;
    animation: ldl-ai-avatar-nod 5.2s ease-in-out infinite;
}
.ldl-ai.is-busy .ldl-ai-mark {
    animation-duration: 1.9s;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .2), 0 0 0 8px rgba(255,255,255,.03);
}
.ldl-ai.is-busy .ldl-ai-mark::before {
    animation-duration: 2.3s;
}
.ldl-ai.is-busy .ldl-ai-mark::after {
    animation-duration: 1.5s;
    opacity: .6;
}
.ldl-ai.is-busy .ldl-ai-mark img {
    animation-duration: 1.45s;
}
.ldl-ai-head-copy { min-width: 0; }
.ldl-ai-kicker { font-size: 10px; font-weight: 700; letter-spacing: .13em; opacity: .72; text-transform: uppercase; }
.ldl-ai-head h2 { color: #fff; font-size: 22px; line-height: 1.15; margin: 2px 0 0; }
.ldl-ai-status { align-items: center; display: flex; font-size: 11px; gap: 7px; opacity: .86; white-space: nowrap; }
.ldl-ai-status > span { background: #7fda9d; border-radius: 50%; box-shadow: 0 0 0 4px rgba(127,218,157,.12); height: 7px; width: 7px; }
.ldl-ai[data-ai-ready="0"] .ldl-ai-status > span { background: #e5b760; box-shadow: 0 0 0 4px rgba(229,183,96,.12); }
.ldl-ai-body { padding: 22px; }
.ldl-ai-welcome { margin-bottom: 26px; }
.ldl-ai-welcome > p { color: #49536a; font-size: 14px; line-height: 1.65; margin: 0 0 14px; max-width: 900px; }
.ldl-ai-suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 0; }
.ldl-ai-suggestions button {
    background: #f6f8fb;
    border: 1px solid #dce2ec;
    border-radius: 999px;
    color: #273659;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 12px;
    transition: border-color .18s ease, background .18s ease, color .18s ease;
}
.ldl-ai-suggestions button:hover:not(:disabled) { background: #eef2f8; border-color: #bfc9da; color: var(--ldl-navy); }
.ldl-ai-suggestions button:disabled { cursor: not-allowed; opacity: .52; }
.ldl-ai-messages { display: grid; gap: 12px; max-height: 460px; overflow-y: auto; padding: 0 2px; scrollbar-width: thin; scrollbar-color: rgba(20,32,70,.20) transparent; }
.ldl-ai-messages:not(:empty) { margin-bottom: 16px; padding-bottom: 3px; }
.ldl-ai-message { display: flex; width: 100%; }
.ldl-ai-message--user { justify-content: flex-end; }
.ldl-ai-message--assistant { justify-content: flex-start; }
.ldl-ai-bubble { max-width: min(1060px, 96%); width: auto; }
.ldl-ai-message--user .ldl-ai-bubble { max-width: min(820px, 88%); }
.ldl-ai-answer {
    background: #f7f8fb;
    border: 1px solid #e2e6ed;
    border-radius: 4px 15px 15px 15px;
    color: #26304c;
    font-size: 14px;
    line-height: 1.62;
    padding: 15px 17px;
}
.ldl-ai-answer p { margin: 0 0 10px; }
.ldl-ai-answer p:last-child { margin-bottom: 0; }
.ldl-ai-answer ul { display: grid; gap: 7px; margin: 8px 0 12px; padding-left: 20px; }
.ldl-ai-answer li { margin: 0; padding-left: 2px; }
.ldl-ai-answer strong { color: var(--ldl-navy); font-weight: 700; }
.ldl-ai-answer-heading { color: var(--ldl-navy); font-size: 15px; font-weight: 800; margin: 13px 0 7px; }
.ldl-ai-answer-heading:first-child { margin-top: 0; }
.ldl-ai-message--user .ldl-ai-answer { background: var(--ldl-navy); border-color: var(--ldl-navy); border-radius: 15px 15px 4px 15px; color: #fff; }
.ldl-ai-message--user .ldl-ai-answer strong { color: #fff; }
.ldl-ai-message.is-pending .ldl-ai-answer { color: #6c7486; font-size: 13px; }
.ldl-ai-message.is-pending .ldl-ai-answer::after { animation: ldl-ai-pulse 1.1s infinite; content: " …"; }
.ldl-ai-source-section { margin-top: 10px; }
.ldl-ai-sources-title { color: var(--ldl-navy); font-size: 11px; font-weight: 800; letter-spacing: .06em; margin: 0 0 8px; text-transform: uppercase; }
.ldl-ai-sources { display: grid; gap: 9px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ldl-ai-source {
    align-items: stretch;
    background: #fff;
    border: 1px solid #d8deea;
    border-radius: 10px;
    color: #26304c;
    cursor: pointer;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 30px;
    min-height: 92px;
    overflow: hidden;
    padding: 0;
    text-align: left;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
    width: 100%;
}
.ldl-ai-source:hover { border-color: #aab8cf; box-shadow: 0 8px 20px rgba(17,26,67,.08); transform: translateY(-1px); }
.ldl-ai-source-media { align-items: center; background: #f2f4f8; display: flex; justify-content: center; min-height: 92px; overflow: hidden; }
.ldl-ai-source-media img { display: block; height: 100%; min-height: 92px; object-fit: cover; width: 100%; }
.ldl-ai-source-placeholder { align-items: center; background: var(--ldl-navy); color: #fff; display: flex; font-size: 10px; font-weight: 800; height: 48px; justify-content: center; letter-spacing: .08em; width: 36px; }
.ldl-ai-source-copy { align-self: center; display: flex; flex-direction: column; min-width: 0; padding: 12px 12px 12px 14px; }
.ldl-ai-source-type { color: #6c7890; font-size: 9px; font-weight: 800; letter-spacing: .08em; margin-bottom: 4px; text-transform: uppercase; }
.ldl-ai-source-copy strong { color: var(--ldl-navy); display: -webkit-box; font-size: 12px; font-weight: 750; line-height: 1.35; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.ldl-ai-source-action { color: #477052; font-size: 10px; font-weight: 700; margin-top: 5px; }
.ldl-ai-source-arrow { align-items: center; color: #52705b; display: flex; font-size: 18px; justify-content: center; padding-right: 8px; }
.ldl-ai-form { margin: 0; }
.ldl-ai-input-wrap { align-items: flex-end; background: #fff; border: 1px solid #cfd6e2; display: flex; gap: 10px; padding: 7px 7px 7px 14px; transition: border-color .18s ease, box-shadow .18s ease; }
.ldl-ai-input-wrap:focus-within { border-color: #7286ad; box-shadow: 0 0 0 3px rgba(36,66,127,.08); }
.ldl-ai-input-wrap textarea {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #202a45;
    flex: 1;
    font: inherit;
    font-size: 14px;
    line-height: 1.5;
    max-height: 132px;
    min-height: 32px;
    outline: 0;
    overflow-y: auto;
    padding: 5px 0;
    resize: none;
    width: 100%;
}
.ldl-ai-input-wrap textarea::placeholder { color: #9299a9; }
.ldl-ai-input-wrap > button {
    align-items: center;
    background: var(--ldl-navy);
    border: 0;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    flex: 0 0 38px;
    height: 38px;
    justify-content: center;
    padding: 0;
    width: 38px;
}
.ldl-ai-input-wrap > button svg { height: 19px; width: 19px; }
.ldl-ai-input-wrap > button:hover:not(:disabled) { background: var(--ldl-navy-2); }
.ldl-ai-input-wrap > button:disabled { cursor: not-allowed; opacity: .5; }
.ldl-ai-input-wrap > button.is-loading svg { animation: ldl-ai-send 1s linear infinite; }
.ldl-ai-foot { align-items: center; color: #7a8293; display: flex; font-size: 10px; gap: 14px; justify-content: space-between; margin-top: 8px; }
.ldl-ai-clear { background: none; border: 0; color: #425170; cursor: pointer; font-size: 10px; font-weight: 700; padding: 0; text-decoration: none; }
.ldl-ai-clear:hover { color: var(--ldl-navy); }
.ldl-ai-admin-note { background: #fff7e4; border-left: 3px solid #d6a343; color: #70551f; font-size: 12px; margin: 14px 0 0; padding: 10px 12px; }
.ldl-card.is-ai-highlighted { animation: ldl-ai-highlight 3.1s ease; position: relative; z-index: 2; }

@keyframes ldl-ai-pulse { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes ldl-ai-send { to { transform: rotate(360deg); } }
@keyframes ldl-ai-ring-spin { to { transform: rotate(360deg); } }
@keyframes ldl-ai-avatar-float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-2px) rotate(-2deg); }
    50% { transform: translateY(-4px) rotate(0.8deg); }
    75% { transform: translateY(-1px) rotate(2deg); }
}
@keyframes ldl-ai-avatar-nod {
    0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
    18% { transform: translateY(-.5px) rotate(-3deg) scale(1.02); }
    36% { transform: translateY(.5px) rotate(2deg) scale(1); }
    54% { transform: translateY(-1px) rotate(-1deg) scale(1.03); }
    72% { transform: translateY(0) rotate(2deg) scale(1); }
}
@keyframes ldl-ai-avatar-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,.18); opacity: .35; }
    50% { box-shadow: 0 0 0 8px rgba(255,255,255,0); opacity: .8; }
}
@keyframes ldl-ai-highlight { 0%, 100% { border-color: var(--ldl-border); box-shadow: none; } 12%, 78% { border-color: #2f9e5b; box-shadow: 0 0 0 4px rgba(47,158,91,.24), 0 12px 30px rgba(23,112,56,.14); } }

@media (prefers-reduced-motion: reduce) {
    .ldl-ai-mark,
    .ldl-ai-mark::after,
    .ldl-ai-mark img,
    .ldl-ai-message.is-pending .ldl-ai-answer::after,
    .ldl-ai-input-wrap > button.is-loading svg,
    .ldl-card.is-ai-highlighted {
        animation: none !important;
    }
}

@media (max-width: 800px) {
    .ldl-ai-head { grid-template-columns: 42px minmax(0,1fr); padding: 15px 17px; }
    .ldl-ai-mark { height: 40px; width: 40px; }
    .ldl-ai-status { grid-column: 2; margin-top: -8px; white-space: normal; }
    .ldl-ai-body { padding: 17px; }
    .ldl-ai-bubble { max-width: 100%; width: 100%; }
    .ldl-ai-message--user .ldl-ai-bubble { max-width: 94%; width: auto; }
    .ldl-ai-sources { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .ldl-ai { margin-bottom: 24px; }
    .ldl-ai-head h2 { font-size: 19px; }
    .ldl-ai-suggestions { display: grid; }
    .ldl-ai-suggestions button { text-align: left; width: 100%; }
    .ldl-ai-welcome { margin-bottom: 22px; }
    .ldl-ai-answer { font-size: 13px; }
    .ldl-ai-source { grid-template-columns: 62px minmax(0, 1fr) 26px; min-height: 82px; }
    .ldl-ai-source-media, .ldl-ai-source-media img { min-height: 82px; }
    .ldl-ai-foot { align-items: flex-start; flex-direction: column; gap: 5px; }
}
