/**
 * Copyright © Volker Schukai and all contributing authors, 2026. All rights reserved.
 * Node module: @schukai/monster
 *
 * This source code is licensed under the GNU Affero General Public License version 3 (AGPLv3).
 * The full text of the license can be found at: https://www.gnu.org/licenses/agpl-3.0.en.html
 *
 * For those who do not wish to adhere to the AGPLv3, a commercial license is available.
 * Acquiring a commercial license allows you to use this software without complying with the AGPLv3 terms.
 * For more information about purchasing a commercial license, please contact Volker Schukai.
 */

import { addAttributeToken } from "../../../dom/attributes.mjs";
import { ATTRIBUTE_ERRORMESSAGE } from "../../../dom/constants.mjs";

export { FilterControlsDefaultsStyleSheet };

/**
 * @private
 * @type {CSSStyleSheet}
 */
const FilterControlsDefaultsStyleSheet = new CSSStyleSheet();

try {
	FilterControlsDefaultsStyleSheet.insertRule(
		`
@layer filtercontrolsdefaults {
[data-monster-role=control]{outline:none;width:100%;box-sizing:border-box}[data-monster-role=control].flex{display:flex;flex-direction:row;align-items:center}:host{display:block;box-sizing:border-box}div[data-monster-role=popper]{box-sizing:border-box;display:none;opacity:1;padding:1.1em;max-width:var(--monster-popper-max-width,calc(100vw - 2rem));max-height:var(--monster-popper-max-height,calc(100vh - 2rem));z-index:var(--monster-z-index-modal);background:var(--monster-bg-color-primary-1);color:var(--monster-color-primary-1);border-radius:var(--monster-border-radius);border-width:var(--monster-border-width);border-style:var(--monster-border-style);border-color:var(--monster-bg-color-primary-4);box-shadow:var(--monster-box-shadow-1);justify-content:space-between;align-content:center;width:-moz-max-content;width:max-content;position:absolute;top:0;left:0;transition:opacity var(--monster-popper-fade-duration,.14s) var(--monster-popper-fade-timing,cubic-bezier(.2,0,0,1))}div[data-monster-role=popper][data-monster-appearance=opening]{opacity:0}div[data-monster-role=popper][data-monster-appearance=open]{opacity:1}@media (prefers-reduced-motion:reduce){div[data-monster-role=popper]{transition:none}}div[data-monster-role=popper]>[part=content]{overflow:auto;max-width:100%;max-height:var(--monster-popper-content-max-height,calc(100vh - 4.2rem))}div[data-monster-role=popper]>[part=content][data-monster-overflow-mode=horizontal]{overflow-x:auto;overflow-y:visible;clip-path:none}div[data-monster-role=popper]>[part=content][data-monster-overflow-mode=visible]{overflow:visible;clip-path:none;max-width:none;max-height:none}div[data-monster-role=popper] div[data-monster-role=arrow]{position:absolute;width:calc(max(var(--monster-popper-witharrrow-distance), -1 * var(--monster-popper-witharrrow-distance))*2);height:calc(max(var(--monster-popper-witharrrow-distance), -1 * var(--monster-popper-witharrrow-distance))*2);z-index:-1;pointer-events:none;background:var(--monster-bg-color-primary-1)}input,meter,progress,select,textarea{accent-color:var(--monster-color-secondary-2);box-sizing:border-box;color:var(--monster-color-primary-1);background-color:var(--monster-bg-color-primary-1);font-family:inherit;font-size:100%;margin:0;outline:none;border-width:var(--monster-theme-control-border-width);border-radius:var(--monster-theme-control-border-radius);border-style:var(--monster-theme-control-border-style);border-color:var(--monster-theme-control-border-color)}input,select,textarea{padding:.4rem .6rem;height:-moz-fit-content;height:fit-content}textarea{resize:vertical;min-height:6rem}input[type=color]{padding:.1rem;margin:0;height:2rem;width:2rem}input:hover:not([type=radio]):not([type=checkbox]):not([type=range]),select:hover,textarea:hover{transition:background .8s,color .25s .0833333333s;box-shadow:var(--monster-box-shadow-2)}input:focus,select:focus,textarea:focus{outline:1px dashed var(--monster-color-selection-3);outline-offset:3px}:host{width:100%;height:100%}div[data-monster-role=control]{height:100%;position:relative;display:flex}div[data-monster-role=control] .form-container{max-width:600px;margin:0 auto}:is(div[data-monster-role=control] .form-container) .form-group{margin-bottom:.2rem}:is(:is(div[data-monster-role=control] .form-container) .form-group) input[type=number]{width:5rem;text-align:right}:is(:is(div[data-monster-role=control] .form-container) .form-group) input[type=number]::-webkit-inner-spin-button,:is(:is(div[data-monster-role=control] .form-container) .form-group) input[type=number]::-webkit-outer-spin-button{margin-left:10px}:is(:is(div[data-monster-role=control] .form-container) .form-group) input[type=radio]{accent-color:var(--monster-bg-color-primary-3)}[data-monster-role=popper]{position:absolute}
}`,
		0,
	);
} catch (e) {
	addAttributeToken(
		document.getRootNode().querySelector("html"),
		ATTRIBUTE_ERRORMESSAGE,
		e + "",
	);
}
