/* Document excerpter surface — owned entirely by JS (documentExcerpter.js).
   Selectors are unscoped because the DOM tree is built imperatively after
   Blazor's scoped-CSS post-processing has already run. */

.dde-host {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    background: #f8f9fa;
    font-family: 'IBM Plex Sans', 'Segoe UI', sans-serif;
}

/* Pending-selection bar — sits above the doc, blue-tinted */
.dde-pending-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #dbeafe;
    border-bottom: 1px solid #93c5fd;
    flex-shrink: 0;
}

.dde-pending-label {
    font-size: 12px;
    font-weight: 600;
    color: #1e3a8a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.dde-pending-chip {
    font-size: 10px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 3px;
    flex-shrink: 0;
}

.dde-pending-spacer {
    flex: 1;
}

.dde-pending-create {
    padding: 4px 12px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 4px;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.dde-pending-create:hover { background: #2563eb; }

.dde-pending-cancel {
    padding: 4px 8px;
    background: transparent;
    color: #3b82f6;
    border: 1px solid #93c5fd;
    border-radius: 4px;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
    line-height: 1;
}

.dde-pending-cancel:hover { background: #eff6ff; }

/* Scroll container — relative offset parent for doc + overlay */
.dde-scroll {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    background: #fff;
}

/* Doc text sits BELOW the overlay so the drag handles render on top of the
   text. The overlay's root SVG has pointer-events: none — only the handle
   hit circles re-enable pointer-events — so text selection and click events
   pass straight through to .dde-doc. */
.dde-doc {
    position: relative;
    z-index: 1;
    padding: 28px 36px 60px 36px;
    font-family: 'IBM Plex Serif', Georgia, serif;
    font-size: 14.5px;
    line-height: 1.85;
    color: #1a1a2e;
    cursor: text;
    word-break: break-word;
}

.dde-doc ::selection { background-color: #bfdbfe; }

.dde-doc p { margin: 0 0 0.9em; }
.dde-doc h1, .dde-doc h2, .dde-doc h3, .dde-doc h4 {
    font-family: 'IBM Plex Sans', 'Segoe UI', sans-serif;
    font-weight: 700;
    margin: 1.4em 0 0.6em;
}

/* Overlay layer — SVG element built imperatively in JS. Position/size/opacity
   for individual paths/rects/circles are set as SVG attributes by the
   renderer; no CSS rules target the child shapes. */

/* Multi-excerpt picker */
.dde-picker {
    position: absolute;
    z-index: 50;
    min-width: 220px;
    max-width: 320px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    padding: 4px 0;
    pointer-events: auto;
}

.dde-picker-head {
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #eee;
}

.dde-picker-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 6px 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    color: #333;
    text-align: left;
}

.dde-picker-item:hover { background: #f3f4f6; }

.dde-picker-swatch {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex-shrink: 0;
}

.dde-picker-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
