/* Document-level default font, set via
   ``Application.set_default_font(family, ...)``.  ``RemoteInterface``
   manages a ``<style id="pg-default-font">`` element that defines
   ``--pg-default-font-*`` CSS variables on ``:root``; the body rule
   below consumes them, so any widget that hasn't been given an
   explicit ``set_font(...)`` inherits the registered default.
   Per-widget ``set_font`` still wins via inline-style specificity. */
body {
    font-family: var(--pg-default-font-family, sans-serif);
    font-size:   var(--pg-default-font-size,   13px);
    font-weight: var(--pg-default-font-weight, normal);
    font-style:  var(--pg-default-font-style,  normal);
}

.widget-disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* All widgets default to no browser text selection.  Drag-to-highlight
   inside a button label or row would interfere with click/drag, range
   select, etc.  Override per-instance with `pgwidgets-text-select` on
   the widget element (via the set_allow_text_selection() method or
   the allow_text_selection constructor option). */
.pgwidgets-widget {
    user-select: none;
}

.pgwidgets-widget.pgwidgets-text-select,
.pgwidgets-widget.pgwidgets-text-select * {
    user-select: text;
}

/* Form controls (text inputs, textareas, contenteditable) always
   allow selection regardless of any wrapping widget's setting. */
.pgwidgets-widget input,
.pgwidgets-widget textarea,
.pgwidgets-widget [contenteditable="true"] {
    user-select: text;
}
