/* WebChatix widget hardening.

   The widget renders into the page DOM (there is no shadow root) and all of
   its own rules are single-class selectors, so the global site styles win:
   body { text-align: center; font: 15px/18px } is inherited by the whole
   panel, and main.css styles button/input/select/textarea globally with a
   higher specificity than .rp-in / .rp-txt.

   Below we reset only what the widget itself never declares, so the widget
   keeps full control over its own look. Loaded after main.css/stylenew.css. */

/* Inherited typography is reset on the panel root, so the widget's own values
   propagate inside it instead of the ones inherited from body. */
.rp-panel {
    font-size: initial;
    font-weight: initial;
    font-style: initial;
    line-height: initial;
    letter-spacing: initial;
    word-spacing: initial;
    text-align: initial;
    text-indent: initial;
    text-transform: initial;
    white-space: initial;
}

/* The launcher is a <button>, so the browser defaults are the sane baseline. */
.rp-btn {
    font: revert;
    letter-spacing: revert;
    word-spacing: revert;
    text-align: revert;
    text-indent: revert;
    text-transform: revert;
    white-space: revert;
}

/* Form controls: main.css sets font-family on button/input/select/textarea and
   font-weight through the `font` shorthand on inputs and textareas. The widget
   expects its controls to use the panel font (.rp-txt asks for it explicitly). */
.rp-panel button,
.rp-panel input,
.rp-panel select,
.rp-panel textarea {
    font-family: inherit;
}

.rp-panel input,
.rp-panel textarea {
    font-weight: revert;
    vertical-align: revert;
}

/* Checkboxes/radios (GDPR consent) are visually hidden site-wide and replaced
   with a sprite drawn on the following label. */
.rp-panel input[type="checkbox"],
.rp-panel input[type="radio"] {
    position: revert;
    clip: revert;
    box-sizing: revert;
    padding: revert;
    margin: revert;
}

.rp-panel input[type="checkbox"] + label,
.rp-panel input[type="radio"] + label {
    display: revert;
    position: revert;
    box-sizing: revert;
    line-height: revert;
    overflow: revert;
    padding: revert;
}

.rp-panel input[type="checkbox"] + label:before,
.rp-panel input[type="checkbox"] + label:after,
.rp-panel input[type="radio"] + label:before,
.rp-panel input[type="radio"] + label:after {
    content: none;
}

/* Content tags inside messages. */
.rp-panel b,
.rp-panel strong {
    font-family: inherit;
}

.rp-panel img {
    vertical-align: revert;
}

.rp-panel p,
.rp-panel li {
    margin: 0;
    text-align: inherit;
}
