/* =====================================================
   INRADR — Field reveal — the elements the reveal engine adds
   inradr-design layer: own inradr-* classes and --inradr-* tokens only, no DevExpress selectors.
   Engine: js/inradr-field-reveal.js, gated by ReadonlyFieldEnhancementController (data-inradr-enhanced) and fed by
   CroppedStringPropertyEditor (span.inradr-cropped-string[field-text]). It adds the full-value line, the copy
   button and the one-time hint styled here. The states of the DevExpress editor and grid cell that host them
   (clipped, expanded, copyable, cursors, pointer events, cell wrapping) are adapter rules in
   inradr-feature-editors.css and inradr-feature-grid.css.
   Ported from A inradr-features/inradr-field-reveal.css (plan 7.5): the token names are the D1 names, the
   !important chains are gone, the hint uses the elevation token instead of A's own shadow literal.
   ===================================================== */

/* ── Truncated grid value (span.inradr-cropped-string) ──────────
   Hover and keyboard focus show that the value can be opened: a light accent tint and a dashed accent
   outline, the same affordance as a clipped read-only field (inradr-feature-editors.css). */
.inradr-cropped-string {
    border-radius: var(--inradr-radius-sm);
    outline-offset: 1px;
}

.inradr-cropped-string:hover,
.inradr-cropped-string:focus-visible {
    background-color: color-mix(in srgb, var(--inradr-color-accent) 6%, transparent);
    outline: 1px dashed color-mix(in srgb, var(--inradr-color-accent) 70%, var(--inradr-color-border));
}

.inradr-cropped-string.inradr-cropped-expanded {
    white-space: normal;
    overflow-wrap: anywhere;
}

/* ── Full value of an expanded read-only field ───────────────────
   div.inradr-inline-full-text > span.inradr-inline-full-text-value replaces the hidden input while the field is
   expanded; body text on the control height. */
.inradr-inline-full-text {
    display: block;
    width: 100%;
    min-height: var(--inradr-height-control);
    color: var(--inradr-color-text-primary);
    background: transparent;
    font-family: var(--inradr-font-body);
    font-size: var(--inradr-text-body-size);
    font-weight: var(--inradr-text-body-weight);
    line-height: var(--inradr-text-body-line-height);
    white-space: normal;
    overflow-wrap: anywhere;
}

/* ── One-time hint (div.inradr-clipped-text-hint on the body) ────
   A small card bottom right that fades in once; above popups (tooltip layer), never clickable. */
.inradr-clipped-text-hint {
    position: fixed;
    right: var(--inradr-space-sm);
    bottom: var(--inradr-space-sm);
    z-index: var(--inradr-layer-tooltip);
    max-width: min(320px, calc(100vw - 2 * var(--inradr-space-sm)));
    padding: var(--inradr-space-xs) var(--inradr-space-2xs);
    border: 1px solid var(--inradr-color-border);
    border-radius: var(--inradr-radius-sm);
    background: var(--inradr-color-surface);
    color: var(--inradr-color-text-primary);
    box-shadow: var(--inradr-elevation-3-shadow);
    font-family: var(--inradr-font-body);
    font-size: var(--inradr-text-body-size);
    line-height: var(--inradr-text-body-line-height);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 140ms ease, transform 140ms ease;
    pointer-events: none;
}

.inradr-clipped-text-hint-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Copy button (button.inradr-hover-copy-button > span.icon-copy | icon-check) ──
   A 24px icon button on the right edge of a read-only field, on a nearly opaque canvas so it stays readable over
   the value. Hidden until the engine sets .inradr-copy-visible (pointer over or focus in the field, or the
   field is expanded); .inradr-copy-done shows the success state after a copy. The lucide glyph is 15px. */
.inradr-hover-copy-button {
    position: absolute;
    top: 50%;
    right: 2px;
    z-index: var(--inradr-layer-sticky);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: var(--inradr-radius-sm);
    background: color-mix(in srgb, var(--inradr-color-surface) 88%, transparent);
    color: var(--inradr-color-text-secondary);
    font-size: 15px;
    line-height: 1;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%);
    transition: opacity 120ms ease, background-color 120ms ease, color 120ms ease;
}

.inradr-hover-copy-button > span {
    line-height: 1;
}

.inradr-hover-copy-button.inradr-copy-visible {
    opacity: 1;
    pointer-events: auto;
}

.inradr-hover-copy-button:hover,
.inradr-hover-copy-button:focus-visible {
    background: color-mix(in srgb, var(--inradr-color-accent) 8%, var(--inradr-color-surface));
    color: var(--inradr-color-accent);
}

.inradr-hover-copy-button:focus-visible {
    outline: 2px solid var(--inradr-focus-ring-color);
    outline-offset: 2px;
}

.inradr-hover-copy-button.inradr-copy-done {
    color: var(--inradr-color-status-ok);
}
