/*!
 * 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.
 */

/* @combine .spectrum.spectrum--legacy */

@import "./spectrum-two.css";

@container style(--system: legacy) {
	.spectrum-ActionButton {
		--spectrum-actionbutton-background-color-default: var(--spectrum-gray-75);
		--spectrum-actionbutton-background-color-hover: var(--spectrum-gray-200);
		--spectrum-actionbutton-background-color-down: var(--spectrum-gray-300);
		--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-border-color-default: var(--spectrum-gray-400);
		--spectrum-actionbutton-border-color-hover: var(--spectrum-gray-500);
		--spectrum-actionbutton-border-color-down: var(--spectrum-gray-600);
		--spectrum-actionbutton-border-color-focus: var(--spectrum-gray-500);
		--spectrum-actionbutton-border-color-disabled: var(--spectrum-disabled-border-color);

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

		&.spectrum-ActionButton--sizeXS,
		&.spectrum-ActionButton--sizeS,
		&.spectrum-ActionButton--sizeM,
		&.spectrum-ActionButton--sizeL,
		&.spectrum-ActionButton--sizeXL {
			--spectrum-actionbutton-border-radius-default: var(--spectrum-corner-radius-100);
		}

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

		&.spectrum-ActionButton--staticBlack {
			--spectrum-actionbutton-border-color-default: var(--spectrum-transparent-black-400);
			--spectrum-actionbutton-border-color-hover: var(--spectrum-transparent-black-500);
			--spectrum-actionbutton-border-color-down: var(--spectrum-transparent-black-600);
			--spectrum-actionbutton-border-color-focus: var(--spectrum-transparent-black-500);
			--spectrum-actionbutton-border-color-disabled: var(--spectrum-disabled-static-black-border-color);

			--spectrum-actionbutton-background-color-default: transparent;
			--spectrum-actionbutton-background-color-hover: var(--spectrum-transparent-black-300);
			--spectrum-actionbutton-background-color-down: var(--spectrum-transparent-black-400);
			--spectrum-actionbutton-background-color-focus: var(--spectrum-transparent-black-300);
			--spectrum-actionbutton-background-color-disabled: transparent;

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

		&.spectrum-ActionButton--staticWhite {
			--spectrum-actionbutton-border-color-default: var(--spectrum-transparent-white-400);
			--spectrum-actionbutton-border-color-hover: var(--spectrum-transparent-white-500);
			--spectrum-actionbutton-border-color-down: var(--spectrum-transparent-white-600);
			--spectrum-actionbutton-border-color-focus: var(--spectrum-transparent-white-500);
			--spectrum-actionbutton-border-color-disabled: var(--spectrum-disabled-static-white-border-color);

			--spectrum-actionbutton-background-color-default: transparent;
			--spectrum-actionbutton-background-color-hover: var(--spectrum-transparent-white-300);
			--spectrum-actionbutton-background-color-down: var(--spectrum-transparent-white-400);
			--spectrum-actionbutton-background-color-focus: var(--spectrum-transparent-white-300);
			--spectrum-actionbutton-background-color-disabled: transparent;

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