/* Diminet 2.0.0 visual effects

Shiny Button is adapted for vanilla JavaScript/CSS from the Magic UI component
(text mask, moving border highlight, dark/light modes and tap feedback).
https://magicui.design/docs/components/shiny-button
https://magicui.design/r/shiny-button.json
Blur Fade and Magic Card also informed the entrance and pointer effects.
https://magicui.design/docs/components/blur-fade
https://magicui.design/docs/components/magic-card
Credit: Magic UI contributors and Shiny Button contributor @luis-code.

MIT License
Copyright (c) Magic UI contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
 */

@property --x { syntax: '<percentage>'; inherits: true; initial-value: 100%; }
/* Magic UI Shiny Button — vanilla port of the current component.
   Uses the same -75deg moving text mask and masked 1px border highlight.
   Background color is intentionally not animated, so hover cannot flash it. */
.shiny-button{
 --x:100%;
 position:relative;
 isolation:isolate;
 overflow:hidden;
 cursor:pointer;
 -webkit-backdrop-filter:blur(24px);
 backdrop-filter:blur(24px);
 transition:box-shadow .3s ease-in-out,transform .30s cubic-bezier(.34,1.56,.64,1)!important;
 will-change:transform;
 transform-origin:center;
 animation:dn-magicui-shiny 4.2s cubic-bezier(.22,.72,.18,1) infinite;
}
.shiny-button .shiny-label{
 display:inline-flex;
 align-items:center;
 justify-content:center;
 gap:inherit;
 width:100%;
 height:100%;
 max-width:100%;
 position:relative;
 z-index:1;
 -webkit-mask-image:linear-gradient(-75deg,#000 calc(var(--x) + 20%),transparent calc(var(--x) + 30%),#000 calc(var(--x) + 100%));
 mask-image:linear-gradient(-75deg,#000 calc(var(--x) + 20%),transparent calc(var(--x) + 30%),#000 calc(var(--x) + 100%));
}
.shiny-button::after{
 content:'';
 position:absolute;
 inset:0;
 z-index:10;
 display:block;
 border-radius:inherit;
 padding:1px;
 pointer-events:none;
 background-image:linear-gradient(-75deg,rgba(255,255,255,.10) calc(var(--x) + 20%),rgba(255,255,255,.50) calc(var(--x) + 25%),rgba(255,255,255,.10) calc(var(--x) + 100%));
 -webkit-mask:linear-gradient(#000,#000) content-box xor,linear-gradient(#000,#000);
 mask:linear-gradient(#000,#000) content-box exclude,linear-gradient(#000,#000);
}
.shiny-button:not(:disabled):hover{box-shadow:0 8px 24px #ff790030}
.shiny-button:not(:disabled):active{transform:scale(.95);transition:box-shadow .3s ease-in-out,transform .085s cubic-bezier(.2,.8,.2,1)!important}
.shiny-button:disabled{animation:none;--x:100%}
:root[data-theme=dark] .shiny-button{box-shadow:0 0 20px #ffffff10}
@keyframes dn-magicui-shiny{
 0%,8%{--x:100%}
 72%{--x:-100%}
 72.01%,100%{--x:-100%}
}
.magic-card{--magic-x:50%;--magic-y:0%;position:relative;isolation:isolate;transition:border-color .2s,box-shadow .2s,transform .2s}
.magic-card::after{content:'';position:absolute;inset:0;pointer-events:none;border-radius:inherit;background:radial-gradient(260px circle at var(--magic-x) var(--magic-y),#ff790014,transparent 75%);opacity:0;transition:opacity .25s;z-index:-1}
@media(hover:hover) and (pointer:fine){.magic-card:hover::after{opacity:1}.magic-card:hover{border-color:#ff790060;box-shadow:0 8px 24px #ff790012}.bottom-nav a:hover .icon{transform:translateY(-2px) scale(1.08)}}
.bottom-nav .icon{transition:transform .22s ease}
.checkout-server{display:flex;align-items:center;gap:14px;border:1px solid var(--line);border-radius:16px;background:var(--soft);padding:16px;margin-bottom:12px}
.checkout-server p{font-size:.82rem;margin-top:4px}.checkout-total{margin:10px 0 18px;padding:16px 0!important;font-size:1.05rem}.checkout-total strong{color:var(--accent-hover)}
.release-version{text-align:center;color:var(--muted,#687789);font-size:.75rem;padding:12px 16px 20px}
body:has(.bottom-nav)>.release-version{padding-bottom:95px}
#dialog[open]{animation:dn-dialog .23s ease-out}#dialog::backdrop{background:#11182770;backdrop-filter:blur(4px)}
@keyframes dn-dialog{from{opacity:0;transform:translateY(8px) scale(.985)}to{opacity:1;transform:none}}
@media(max-width:600px){.setup-shell>.page-head{align-items:flex-start;flex-direction:column}.checkout-server{padding:13px}.checkout-server .summary-flag{flex-shrink:0}}
@media(prefers-reduced-motion:reduce){.shiny-button,.magic-card,#dialog[open]{animation:none!important;transition:none!important}.shiny-label{mask-image:none!important;-webkit-mask-image:none!important}.shiny-button::after{background:rgba(255,255,255,.18)}.magic-card::after{transition:none}.bottom-nav .icon{transition:none}}
