/*!
 * Copyright 2024 Adobe. All rights reserved.
 *
 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License. You may obtain a copy
 * of the License at <http://www.apache.org/licenses/LICENSE-2.0>
 *
 * Unless required by applicable law or agreed to in writing, software distributed under
 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
 * OF ANY KIND, either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */

@container style(--system: spectrum) {
	.spectrum-ActionButton {
		--spectrum-actionbutton-background-color-default: var(--spectrum-gray-100);
		--spectrum-actionbutton-background-color-hover: var(--spectrum-gray-200);
		--spectrum-actionbutton-background-color-down: var(--spectrum-gray-200);
		--spectrum-actionbutton-background-color-focus: var(--spectrum-gray-200);
		--spectrum-actionbutton-background-color-disabled: var(--spectrum-disabled-background-color);

		--spectrum-actionbutton-background-color-selected: var(--spectrum-neutral-background-color-selected-default);
		--spectrum-actionbutton-background-color-selected-hover: var(--spectrum-neutral-background-color-selected-hover);
		--spectrum-actionbutton-background-color-selected-down: var(--spectrum-neutral-background-color-selected-down);
		--spectrum-actionbutton-background-color-selected-focus: var(--spectrum-neutral-background-color-selected-key-focus);

		--spectrum-actionbutton-border-color-default: transparent;
		--spectrum-actionbutton-border-color-hover: transparent;
		--spectrum-actionbutton-border-color-down: transparent;
		--spectrum-actionbutton-border-color-focus: transparent;
		--spectrum-actionbutton-border-color-disabled: transparent;

		--spectrum-actionbutton-content-color-selected: var(--spectrum-gray-50);

		&.spectrum-ActionButton--sizeM {
			--spectrum-actionbutton-border-radius-default: var(--spectrum-corner-radius-medium-size-medium);
		}

		&.spectrum-ActionButton--sizeXS {
			--spectrum-actionbutton-border-radius-default: var(--spectrum-corner-radius-medium-size-extra-small);
		}

		&.spectrum-ActionButton--sizeS {
			--spectrum-actionbutton-border-radius-default: var(--spectrum-corner-radius-medium-size-small);
		}

		&.spectrum-ActionButton--sizeL {
			--spectrum-actionbutton-border-radius-default: var(--spectrum-corner-radius-medium-size-large);
		}

		&.spectrum-ActionButton--sizeXL {
			--spectrum-actionbutton-border-radius-default: var(--spectrum-corner-radius-medium-size-extra-large);
		}

		&.spectrum-ActionButton--quiet {
			--spectrum-actionbutton-background-color-default: transparent;
			--spectrum-actionbutton-background-color-hover: var(--spectrum-gray-200);
			--spectrum-actionbutton-background-color-down: var(--spectrum-gray-200);
			--spectrum-actionbutton-background-color-focus: var(--spectrum-gray-200);
			--spectrum-actionbutton-background-color-disabled: transparent;
			--spectrum-actionbutton-background-color-selected-disabled: var(--spectrum-disabled-background-color);
		}

		&.spectrum-ActionButton--staticBlack {
			--spectrum-actionbutton-border-color-default: transparent;
			--spectrum-actionbutton-border-color-hover: transparent;
			--spectrum-actionbutton-border-color-down: transparent;
			--spectrum-actionbutton-border-color-focus: transparent;
			--spectrum-actionbutton-border-color-disabled: transparent;

			--spectrum-actionbutton-background-color-disabled: var(--spectrum-disabled-static-black-background-color);
			--spectrum-actionbutton-background-color-selected-disabled: var(--spectrum-disabled-static-black-background-color);

			--spectrum-actionbutton-background-color-default: var(--spectrum-transparent-black-100);
			--spectrum-actionbutton-background-color-hover: var(--spectrum-transparent-black-200);
			--spectrum-actionbutton-background-color-down: var(--spectrum-transparent-black-200);
			--spectrum-actionbutton-background-color-focus: var(--spectrum-transparent-black-200);

			&.spectrum-ActionButton--quiet {
				--spectrum-actionbutton-background-color-default: transparent;
				--spectrum-actionbutton-background-color-hover: var(--spectrum-transparent-black-200);
				--spectrum-actionbutton-background-color-down: var(--spectrum-transparent-black-200);
				--spectrum-actionbutton-background-color-focus: var(--spectrum-transparent-black-200);
				--spectrum-actionbutton-background-color-disabled: transparent;
			}
		}

		&.spectrum-ActionButton--staticWhite {
			--spectrum-actionbutton-border-color-default: transparent;
			--spectrum-actionbutton-border-color-hover: transparent;
			--spectrum-actionbutton-border-color-down: transparent;
			--spectrum-actionbutton-border-color-focus: transparent;
			--spectrum-actionbutton-border-color-disabled: transparent;

			--spectrum-actionbutton-background-color-disabled: var(--spectrum-disabled-static-white-background-color);
			--spectrum-actionbutton-background-color-selected-disabled: var(--spectrum-disabled-static-white-background-color);

			--spectrum-actionbutton-background-color-default: var(--spectrum-transparent-white-100);
			--spectrum-actionbutton-background-color-hover: var(--spectrum-transparent-white-200);
			--spectrum-actionbutton-background-color-down: var(--spectrum-transparent-white-200);
			--spectrum-actionbutton-background-color-focus: var(--spectrum-transparent-white-200);

			&.spectrum-ActionButton--quiet {
				--spectrum-actionbutton-background-color-default: transparent;
				--spectrum-actionbutton-background-color-hover: var(--spectrum-transparent-white-200);
				--spectrum-actionbutton-background-color-down: var(--spectrum-transparent-white-200);
				--spectrum-actionbutton-background-color-focus: var(--spectrum-transparent-white-200);
				--spectrum-actionbutton-background-color-disabled: transparent;
			}
		}
	}
}
