/* ============================================================================
   File:        _rc-link-actions.css
   Purpose:     Authoritative CSS for <RcLinkAction> (inline text action, renders
                a <button> with underline chrome). Replaces .rc-link-action,
                .rc-link-select, .rc-link-deselect (AdvancedFilterModal).
   Consumes:    --rc-link-action-fs-*, --rc-link-action-underline-*,
                --rc-link-action-tone-{neutral|primary}-*,
                --rc-control-disabled-opacity, --rc-focus-ring-*,
                --rc-motion-fast. All from _rc-tokens.css.
   Rendered by: Pages/ReportCenter/Components/Shared/RcLinkAction.razor
   Loaded via:  <link> in Pages/_Layout.cshtml.
   Layer:       2 (Shared primitives).
   Invariant:   No .rc-link-action* selector may appear in any .razor.css file.

   Element contract:
     - Renders as <button>, not <a>. For navigation (href), use <a> directly.
     - Underline is declarative (text-decoration) so it survives text selection
       and screen-reader rendering; offset/thickness from tokens.
   ============================================================================ */

.rc-link-action {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1, 0.25rem);
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    font-family: inherit;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: var(--rc-link-action-underline-offset);
    text-decoration-thickness: var(--rc-link-action-underline-thickness);
    transition: color var(--rc-motion-fast);
}

.rc-link-action:focus-visible {
    outline: var(--rc-focus-ring-width) solid var(--rc-focus-ring-color);
    outline-offset: var(--rc-focus-ring-offset);
    border-radius: var(--radius-sm, 0.25rem);
}

.rc-link-action:disabled {
    opacity: var(--rc-control-disabled-opacity);
    cursor: not-allowed;
    text-decoration: none;   /* disabled link reads as static text */
}

/* --------------------------------------------------------------------------
   Sizes — only font-size changes; no box geometry.
   -------------------------------------------------------------------------- */
.rc-link-action--size-xs { font-size: var(--rc-link-action-fs-xs); }
.rc-link-action--size-sm { font-size: var(--rc-link-action-fs-sm); }

/* --------------------------------------------------------------------------
   Tones
   -------------------------------------------------------------------------- */
.rc-link-action--tone-neutral {
    color: var(--rc-link-action-tone-neutral-fg);
}
.rc-link-action--tone-neutral:hover:not(:disabled) {
    color: var(--rc-link-action-tone-neutral-fg-hover);
}
.rc-link-action--tone-primary {
    color: var(--rc-link-action-tone-primary-fg);
}
.rc-link-action--tone-primary:hover:not(:disabled) {
    color: var(--rc-link-action-tone-primary-fg-hover);
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .rc-link-action { transition: none; }
}
