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

.spectrum-Modal{
  pointer-events:none;
  visibility:hidden;
  opacity:0;
  transition:transform var(--mod-overlay-animation-duration, var(--spectrum-animation-duration-100, 130ms)) ease-in-out, opacity var(--mod-overlay-animation-duration, var(--spectrum-animation-duration-100, 130ms)) ease-in-out, visibility 0ms linear var(--mod-overlay-animation-duration, var(--spectrum-animation-duration-100, 130ms));
}

.spectrum-Modal.is-open{
  pointer-events:auto;
  visibility:visible;
  opacity:1;
  transition-delay:var(--mod-overlay-animation-duration-opened, var(--spectrum-animation-duration-0, 0ms));
}

.spectrum-Modal{
	--spectrum-modal-confirm-exit-animation-delay:var(--spectrum-animation-duration-0);
	--spectrum-modal-fullscreen-margin:32px;
	--spectrum-modal-max-height:90vh;
	--spectrum-modal-max-width:90%;

	--spectrum-modal-background-color:var(--spectrum-gray-100);
	--spectrum-modal-confirm-border-radius:var(--spectrum-corner-radius-100);
	--spectrum-modal-confirm-exit-animation-duration:var(--spectrum-animation-duration-100);
	--spectrum-modal-confirm-entry-animation-duration:var(--spectrum-animation-duration-500);
	--spectrum-modal-confirm-entry-animation-delay:var(--spectrum-animation-duration-200);
	--spectrum-modal-transition-animation-duration:var(--spectrum-animation-duration-100);
}

.spectrum-Modal-wrapper{
	position:fixed;
	inset-inline-start:0;
	inset-block-start:0;

	display:flex;
	align-items:center;
	justify-content:center;

	box-sizing:border-box;
	inline-size:100vw;
	block-size:100vh;
	block-size:-webkit-fill-available;
	block-size:-moz-available;
	block-size:stretch;

	visibility:hidden;
	pointer-events:none;
	z-index:2;
	transition:visibility 0ms linear var(--mod-modal-transition-animation-duration, var(--spectrum-modal-transition-animation-duration));
}

.spectrum-Modal-wrapper.is-open{
		visibility:visible;
	}

.spectrum-Modal{
	transform:translateY(var(--mod-modal-confirm-entry-animation-distance, var(--spectrum-modal-confirm-entry-animation-distance)));
	z-index:2;
	max-block-size:var(--mod-modal-max-height, var(--spectrum-modal-max-height));
	max-inline-size:var(--mod-modal-max-width, var(--spectrum-modal-max-width));

	background:var(--mod-modal-background-color, var(--spectrum-modal-background-color));
	border-radius:var(--mod-modal-confirm-border-radius, var(--spectrum-modal-confirm-border-radius));
	overflow:hidden;
	outline:none;
	pointer-events:auto;
	transition:opacity var(--mod-modal-confirm-exit-animation-duration, var(--spectrum-modal-confirm-exit-animation-duration)) var(--spectrum-animation-ease-in) var(--mod-modal-confirm-exit-animation-delay, var(--spectrum-modal-confirm-exit-animation-delay)), visibility 0ms linear calc(
				var(--mod-modal-confirm-exit-animation-delay, var(--spectrum-modal-confirm-exit-animation-delay)) +
					var(--mod-modal-confirm-exit-animation-duration, var(--spectrum-modal-confirm-exit-animation-duration))
			), transform 0ms linear calc(
				var(--mod-modal-confirm-exit-animation-delay, var(--spectrum-modal-confirm-exit-animation-delay)) +
					var(--mod-modal-confirm-exit-animation-duration, var(--spectrum-modal-confirm-exit-animation-duration))
			);
}

.spectrum-Modal.is-open{
	transition:transform var(--mod-modal-confirm-entry-animation-duration, var(--spectrum-modal-confirm-entry-animation-duration)) var(--spectrum-animation-ease-out) var(--mod-modal-confirm-entry-animation-delay, var(--spectrum-modal-confirm-entry-animation-delay)), opacity var(--mod-modal-confirm-entry-animation-duration, var(--spectrum-modal-confirm-entry-animation-duration)) var(--spectrum-animation-ease-out) var(--mod-modal-confirm-entry-animation-delay, var(--spectrum-modal-confirm-entry-animation-delay));

	transform:translateY(0);
}

@media only screen and (device-width <= 400px), only screen and (device-height <= 350px){
	.spectrum-Modal--responsive{
		inline-size:100%;
		block-size:100%;
		max-inline-size:100%;
		max-block-size:100%;
		border-radius:0;
	}
		.spectrum-Modal-wrapper .spectrum-Modal--responsive{
			margin-block-start:0;
		}
}

.spectrum-Modal--fullscreen{
	position:fixed;
	inset-inline-start:var(--mod-modal-fullscreen-margin, var(--spectrum-modal-fullscreen-margin));
	inset-block-start:var(--mod-modal-fullscreen-margin, var(--spectrum-modal-fullscreen-margin));
	inset-inline-end:var(--mod-modal-fullscreen-margin, var(--spectrum-modal-fullscreen-margin));
	inset-block-end:var(--mod-modal-fullscreen-margin, var(--spectrum-modal-fullscreen-margin));
	max-inline-size:none;
	max-block-size:none;
}

.spectrum-Modal--fullscreenTakeover{
	position:fixed;
	inset:0;
	max-inline-size:none;
	max-block-size:none;

	box-sizing:border-box;
	border:none;
	border-radius:0;
}

.spectrum-Modal--fullscreenTakeover, .spectrum-Modal--fullscreenTakeover.is-open{
		transform:none;
	}
