/*!
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-Tray{
  --spectrum-tray-exit-animation-delay:0ms;
  --spectrum-tray-entry-animation-delay:160ms;
  --spectrum-tray-max-inline-size:375px;
  --spectrum-tray-spacing-edge-to-tray-safe-zone:64px;

  --spectrum-tray-entry-animation-duration:var(--spectrum-animation-duration-500);
  --spectrum-tray-exit-animation-duration:var(--spectrum-animation-duration-100);

  --spectrum-tray-corner-radius:var(--spectrum-corner-radius-100);
  --spectrum-tray-background-color:var(--spectrum-background-layer-2-color);
}

.spectrum-Tray-wrapper{
  inset-inline-start:0;
  position:fixed;
  inset-block-end:0;
  display:flex;
  justify-content:center;
  inline-size:100%;
}

.spectrum-Tray{
  inline-size:100%;
  --mod-modal-max-width:100%;
  max-inline-size:100%;

  max-block-size:calc(100vh - var(--mod-tray-spacing-edge-to-tray-safe-zone, var(--spectrum-tray-spacing-edge-to-tray-safe-zone)));
  margin-block-start:var(--mod-tray-spacing-edge-to-tray-safe-zone, var(--spectrum-tray-spacing-edge-to-tray-safe-zone));
  padding-block-start:var(--mod-tray-top-to-content-area, var(--spectrum-tray-top-to-content-area));
  padding-block-end:var(--mod-tray-bottom-to-content-area, var(--spectrum-tray-top-to-content-area));
  box-sizing:border-box;
  overflow:auto;
  outline:none;
  border-radius:var(--mod-tray-corner-radius-portrait, 0) var(--mod-tray-corner-radius-portrait, 0) 0 0;
  transform:translateY(100%);
  transition:opacity var(--mod-tray-exit-animation-duration, var(--spectrum-tray-exit-animation-duration)) cubic-bezier(0.5, 0, 1, 1) var(--mod-tray-exit-animation-delay, var(--spectrum-tray-exit-animation-delay)), visibility var(--mod-tray-exit-animation-duration, var(--spectrum-tray-exit-animation-duration)) linear calc(var(--mod-tray-exit-animation-delay, var(--spectrum-tray-exit-animation-delay)) + var(--mod-tray-exit-animation-duration, var(--spectrum-tray-exit-animation-duration))), transform var(--mod-tray-exit-animation-duration, var(--spectrum-tray-exit-animation-duration)) cubic-bezier(0.5, 0, 1, 1) var(--mod-tray-exit-animation-delay, var(--spectrum-tray-exit-animation-delay));

  background-color:var(--highcontrast-tray-background-color, var(--mod-tray-background-color, var(--spectrum-tray-background-color)));
}

.spectrum-Tray.is-open{
    transition:transform var(--mod-tray-entry-animation-duration, var(--spectrum-tray-entry-animation-duration)) cubic-bezier(0, 0, 0.4, 1) var(--mod-tray-entry-animation-delay, var(--spectrum-tray-entry-animation-delay)), opacity var(--spectrum-tray-entry-animation-duration, var(--mod-tray-entry-animation-duration)) cubic-bezier(0, 0, 0.4, 1) var(--mod-tray-entry-animation-delay, var(--spectrum-tray-entry-animation-delay));
    transform:translateY(0);
  }

@media screen and (orientation: landscape){
  .spectrum-Tray{
    border-start-start-radius:var(--mod-tray-corner-radius, var(--spectrum-tray-corner-radius));
    border-start-end-radius:var(--mod-tray-corner-radius, var(--spectrum-tray-corner-radius));
    max-inline-size:var(--mod-tray-max-inline-size, var(--spectrum-tray-max-inline-size));
  }
}

@media (forced-colors: active){
  .spectrum-Tray{
    --highcontrast-tray-background-color:Canvas;

    border:solid;
  }

    .spectrum-Tray .spectrum-Dialog{
      border:none;
    }
}