/* Bookmark Assistant's page: the extension's frosted-glass panel (copied from its src/content.ts, light and
   dark), the sample-search chips and the browser frame of the demo (demo.js). The panel keeps the app's own
   amber tick; the rest of the page uses the site's colors (styles.css, PROJECT PAGE). */

.ba-panel {
    --text: #172A3A; --soft: rgba(23, 42, 58, 0.76); --faint: rgba(23, 42, 58, 0.64);
    --line: rgba(23, 42, 58, 0.1); --hover: rgba(23, 42, 58, 0.05);
    --fill: rgba(23, 42, 58, 0.07); --fill-hover: rgba(23, 42, 58, 0.13);
    --amber: #F59E0B; --red: #E5281C;
    color: var(--text);
    font-size: 16px;
    line-height: 1.5;
    text-align: left;
    background:
        radial-gradient(140% 90% at 0% 0%, rgba(245, 158, 11, 0.1), transparent 55%),
        radial-gradient(140% 100% at 100% 100%, rgba(66, 111, 118, 0.13), transparent 60%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.3));
    -webkit-backdrop-filter: blur(22px) saturate(1.8);
    backdrop-filter: blur(22px) saturate(1.8);
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 24px;
    padding: 8px;
    box-shadow: 0 0 0 1px rgba(23, 42, 58, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.95),
                0 18px 44px -14px rgba(23, 42, 58, 0.28), 0 3px 10px -2px rgba(23, 42, 58, 0.08);
    animation: ba-appear 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.ba-dark {
    --text: #fff; --soft: rgba(255, 255, 255, 0.78); --faint: rgba(255, 255, 255, 0.62);
    --line: rgba(255, 255, 255, 0.12); --fill: rgba(255, 255, 255, 0.12);
    background:
        radial-gradient(140% 90% at 0% 0%, rgba(245, 158, 11, 0.12), transparent 55%),
        radial-gradient(140% 100% at 100% 100%, rgba(66, 111, 118, 0.2), transparent 60%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 24px 60px -18px rgba(0, 0, 0, 0.6);
}
@keyframes ba-appear { from { opacity: 0; transform: translateY(6px) scale(0.98); } }

.ba-head, .ba-tab { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 6px 6px 8px 16px; }
.ba-label { display: flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em;
            text-transform: uppercase; color: var(--faint); }
.ba-label::before { content: ''; flex: none; width: 4px; height: 14px; border-radius: 2px; background: var(--amber); }
.ba-pill, .ba-panel button {
    flex: none; padding: 5px 14px; font: inherit; font-size: 13px; font-weight: 600; line-height: 1.4;
    color: var(--text); background: var(--fill); border: 0; border-radius: 999px;
}
.ba-panel button { cursor: pointer; transition: background 0.15s, color 0.15s, transform 0.1s; }
.ba-panel button:hover { background: var(--fill-hover); }
.ba-panel button:active { transform: scale(0.96); }
.ba-panel button:focus-visible, .ba-panel a:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.ba-panel ul { list-style: none; }
.ba-panel li { position: relative; display: flex; padding: 12px 48px 12px 16px; border-radius: 14px; transition: background 0.15s; }
.ba-panel li + li::before { content: ''; position: absolute; top: 0; left: 16px; right: 16px; height: 1px; background: var(--line); }
.ba-panel li:hover::before, .ba-panel li:hover + li::before { opacity: 0; }
.ba-panel:not(.ba-dark) li:hover { background: var(--hover); }
.ba-panel a { flex: 1; min-width: 0; color: inherit; border-radius: 6px; }
.ba-panel a:hover { text-decoration: none; }
.ba-panel a:hover .ba-title { text-decoration: underline; text-underline-offset: 3px; }
.ba-title { font-weight: 600; letter-spacing: -0.01em; line-height: 1.35; }
.ba-desc { margin-top: 3px; font-size: 14px; line-height: 1.45; color: var(--soft); }
.ba-path { margin-top: 4px; font-size: 13px; color: var(--faint); }
.ba-foot { display: flex; gap: 8px; padding: 6px 6px 4px 16px; }

/* Delete: a trash icon that widens to "Delete bookmark" when pointed at, turning red; then Undo */
.ba-panel .ba-delete {
    position: absolute; top: 9px; right: 8px; display: flex; align-items: center; gap: 6px;
    padding: 6px 8px; color: var(--faint); background: transparent;
}
.ba-delete svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ba-delete-text { max-width: 0; overflow: hidden; white-space: nowrap; transition: max-width 0.2s ease; }
.ba-panel .ba-delete:hover, .ba-panel .ba-delete:focus-visible { color: #fff; background: var(--red); }
.ba-delete:hover .ba-delete-text, .ba-delete:focus-visible .ba-delete-text { max-width: 120px; }
.ba-panel li.ba-removed { align-items: center; gap: 10px; padding-right: 10px; background: rgba(229, 40, 28, 0.08); }
.ba-removed-text { flex: 1; min-width: 0; }
.ba-removed-head { font-size: 14px; font-weight: 600; color: #C21F14; }
.ba-removed-title { overflow: hidden; font-size: 14px; color: var(--soft); white-space: nowrap; text-overflow: ellipsis; }

/* Hidden: a small glass capsule */
.ba-panel.ba-collapsed { width: fit-content; margin-left: auto; padding: 6px 6px 6px 14px; border-radius: 999px; }
.ba-collapsed .ba-tab { padding: 0; }

/* In the hero: the dark panel, showing what appears beside the results */
.ba-hero-panel { max-width: 400px; justify-self: end; animation-delay: 0.15s; }

/* Sample searches */
.ba-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1.5rem; }
.ba-chips button {
    min-height: 40px; padding: 0.45rem 1rem; font: inherit; font-size: 0.9rem; color: var(--navy);
    background: transparent; border: 1px solid var(--field); border-radius: 980px; cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.ba-chips button:hover { border-color: var(--navy); }
.ba-chips button[aria-pressed="true"] { color: var(--bg); background: var(--navy); border-color: var(--navy); }
.ba-chip-note { color: var(--gray); font-size: 0.8rem; }
.ba-chips button[aria-pressed="true"] .ba-chip-note { color: inherit; opacity: 0.75; }

/* The browser frame */
.ba-browser {
    margin-top: 1.25rem; overflow: hidden; background: var(--white); border: 1px solid rgba(23, 42, 58, 0.14);
    border-radius: 18px; box-shadow: 0 2px 4px rgba(23, 42, 58, 0.05), 0 30px 60px -30px rgba(23, 42, 58, 0.4);
}
.ba-chrome { display: flex; align-items: center; gap: 14px; height: 46px; padding: 0 12px 0 16px; background: #EEF0F1; border-bottom: 1px solid #DDE1E3; }
.ba-dots { display: flex; gap: 7px; }
.ba-dots i { width: 11px; height: 11px; border-radius: 50%; background: #CDD2D5; }
.ba-address {
    flex: 1; min-width: 0; overflow: hidden; padding: 5px 14px; font-size: 13px; color: #5F6B72;
    white-space: nowrap; text-overflow: ellipsis; background: var(--white); border-radius: 980px;
}
.ba-address-q { color: #202124; }
.ba-toolbar { position: relative; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; background: none; border: 0; border-radius: 8px; cursor: pointer; }
.ba-toolbar:hover { background: rgba(23, 42, 58, 0.08); }
.ba-toolbar img { width: 20px; height: 20px; }
.ba-toolbar[aria-pressed="false"] img { filter: grayscale(1); opacity: 0.6; }
.ba-badge {
    position: absolute; right: -2px; bottom: 1px; padding: 0 3px; font-size: 9px; font-weight: 700; line-height: 13px;
    color: #fff; background: #188038; border-radius: 3px;
}
.ba-toolbar[aria-pressed="false"] .ba-badge { display: none; }

/* A Google-like results page: Arial, Google's own blues and grays, made-up sites */
.ba-page { padding: 20px clamp(16px, 4vw, 40px) 32px; font-family: Arial, Helvetica, sans-serif; color: #202124; }
.ba-search input {
    width: 100%; max-width: 560px; height: 44px; padding: 0 20px; font: 16px Arial, Helvetica, sans-serif; color: #202124;
    background: var(--white); border: 1px solid #DFE1E5; border-radius: 24px; box-shadow: 0 1px 6px rgba(32, 33, 36, 0.18);
}
.ba-search input:focus { outline: none; border-color: transparent; box-shadow: 0 1px 6px rgba(32, 33, 36, 0.28), 0 0 0 2px var(--teal); }
.ba-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: 32px; align-items: start; margin-top: 24px; min-height: 420px; }
.ba-result + .ba-result { margin-top: 26px; }
.ba-site { font-size: 13px; color: #4D5156; }
.ba-link { margin-top: 3px; font-size: 19px; line-height: 1.3; color: #1A0DAB; }
.ba-snippet { margin-top: 4px; font-size: 14px; line-height: 1.55; color: #4D5156; }
.ba-skeleton { display: block; height: 10px; margin-top: 8px; background: #ECEEF0; border-radius: 5px; }
.ba-skeleton.ba-sk-title { height: 16px; width: 60%; background: #DCE3F4; }
.ba-side { font-family: var(--sans); }
.ba-side .ba-panel { animation-duration: 0.35s; }
.ba-note { min-height: 1.6em; margin-top: 0.9rem; font-size: 0.9rem; color: var(--gray); }

@media (max-width: 900px) {
    .ba-hero-panel { justify-self: start; width: 100%; }
}
/* Narrow: like the extension in a narrow window, the panel sits above the results */
@media (max-width: 760px) {
    .ba-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; min-height: 0; }
    .ba-side { order: -1; }
    .ba-side:empty { display: none; }
    .ba-link { font-size: 17px; }
}
@media (max-width: 480px) {
    .ba-hero-panel li:nth-child(3), .ba-hero-panel .ba-foot { display: none; }
    .ba-dots { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .ba-panel { animation: none; }
    .ba-delete-text, .ba-chips button, .ba-panel li, .ba-panel button { transition: none; }
}
