/* Cloudsms motion layer: entrance animations, hovers and transitions.
   Loaded after cloudsms.css. Purely additive; every effect is switched off for visitors who prefer reduced motion. */
:root{--mo-ease:cubic-bezier(.22,.8,.3,1);--mo-fast:.2s;--mo-med:.45s;--mo-slow:.65s}
html{scroll-behavior:smooth}
@keyframes moUp{from{opacity:0;transform:translate3d(0,18px,0)}}
@keyframes moFade{from{opacity:0}}
@keyframes moDown{from{opacity:0;transform:translate3d(0,-12px,0)}}
@keyframes moPop{from{opacity:0;transform:scale(.94)}}
@keyframes moSlideX{from{opacity:0;transform:translate3d(-14px,0,0)}}

/* ---------- loading feedback while a page is being fetched (public + customer pages) ---------- */
#main{transition:opacity .25s ease}
html.pj-busy #main{opacity:.55}

/* ---------- buttons, links, form controls (all areas) ---------- */
.btn,.app-wallet,.nav-links a,.nav-actions a,.bottom-nav a,.app-side a.nav-i,.adm-side a,.badge,.tgl i{transition:transform var(--mo-fast) var(--mo-ease),box-shadow var(--mo-fast) var(--mo-ease),background-color var(--mo-fast),color var(--mo-fast),border-color var(--mo-fast),filter var(--mo-fast)}
.btn:active:not(:disabled),.bottom-nav a:active,.app-wallet:active{transform:scale(.97)}
input,select,textarea{transition:border-color var(--mo-fast),box-shadow var(--mo-fast),background-color var(--mo-fast)}
input:focus,select:focus,textarea:focus{box-shadow:0 0 0 4px rgba(124,92,255,.16)}
details>summary{transition:color var(--mo-fast)}
details[open]>:not(summary){animation:moFade .3s ease both}
.flash,.toast{animation:moDown .4s var(--mo-ease) both}
.table-wrap tbody tr{transition:background-color var(--mo-fast)}

@media (hover:hover) and (pointer:fine){
  .btn:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 10px 22px rgba(91,61,240,.22)}
  .btn-ghost:hover:not(:disabled),.btn-secondary:hover:not(:disabled){box-shadow:0 6px 14px rgba(20,16,60,.10)}
  .app-wallet:hover{transform:translateY(-1px) scale(1.03)}
  .table-wrap tbody tr:hover{background:var(--p-50,rgba(124,92,255,.06))}

  /* public header and footer */
  .nav-links>a,.nav-drop>a,.nav-drop>button{position:relative}
  .nav-links>a::after,.nav-drop>a::after{content:"";position:absolute;left:12px;right:12px;bottom:4px;height:2px;border-radius:2px;background:var(--p-500,#7c5cff);transform:scaleX(0);transform-origin:left;transition:transform .28s var(--mo-ease)}
  .nav-links>a:hover::after,.nav-drop:hover>a::after{transform:scaleX(1)}
  footer a{transition:color var(--mo-fast),transform var(--mo-fast) var(--mo-ease)}
  footer a:hover{transform:translateX(3px)}

  /* cards that lead somewhere: lift, glow, icon pop */
  .svc-card,.hiw-card,.pop-item,.product-card,.cat-card,.cat-tile,.svc-tile,.list-card,.more-card,.nm-country,.nm-row,.os-card,.pay-provider-card,.cart-item,.an-card,.nf-card,a.card{transition:transform .28s var(--mo-ease),box-shadow .28s var(--mo-ease),border-color .28s,background-color .28s}
  .svc-card:hover,.hiw-card:hover,.pop-item:hover,.product-card:hover,.cat-card:hover,.cat-tile:hover,.svc-tile:hover,.list-card:hover,.more-card:hover,.nm-country:hover,.os-card:hover,a.card:hover{transform:translateY(-5px);box-shadow:0 18px 38px rgba(40,24,120,.16);border-color:var(--p-300,#b9a8ff)}
  .nm-row:hover,.cart-item:hover,.an-card:hover,.nf-card:hover{transform:translateX(4px);box-shadow:0 8px 20px rgba(40,24,120,.10);border-color:var(--p-300,#b9a8ff)}
  .svc-card .svc-ic,.hiw-card .stat-ic,.pop-item .icon,.stat-ic{transition:transform .35s var(--mo-ease)}
  .svc-card:hover .svc-ic,.hiw-card:hover .stat-ic,.stat-grid>*:hover .stat-ic{transform:scale(1.12) rotate(-6deg)}
  .product-card img,.svc-card img,.pop-item img{transition:transform .5s var(--mo-ease)}
  .product-card:hover img,.svc-card:hover img,.pop-item:hover img{transform:scale(1.05)}
  .faq-grid details{transition:box-shadow .25s,border-color .25s}.faq-grid details:hover{box-shadow:0 8px 20px rgba(40,24,120,.10);border-color:var(--p-300,#b9a8ff)}
  .tm:hover{transform:translateY(-4px)}.tm{transition:transform .28s var(--mo-ease),box-shadow .28s}

  /* customer dashboard */
  .app-side a.nav-i:hover{transform:translateX(4px)}
  .app-content .card{transition:box-shadow .3s var(--mo-ease),border-color .3s,transform .3s var(--mo-ease)}
  .app-content .card:hover{box-shadow:0 12px 28px rgba(40,24,120,.10)}

  /* admin */
  .adm-side a:hover{transform:translateX(4px)}
  .adm-main .card{transition:box-shadow .3s var(--mo-ease),transform .3s var(--mo-ease)}
  .adm-main .card:hover{box-shadow:0 12px 28px rgba(20,16,60,.10)}
}

/* ---------- public pages: top of page enters on load, the rest reveals while scrolling ---------- */
.cb-public-page #main>section:first-of-type:not(.hero2) .container>*,.cb-public-page #main>.container>:first-child{animation:moUp var(--mo-slow) var(--mo-ease) backwards}
/* home hero: copy cascades in, art slides in, phone pops */
.hero2-copy>*{animation:moUp .7s var(--mo-ease) backwards}
.hero2-copy>:nth-child(2){animation-delay:.08s}.hero2-copy>:nth-child(3){animation-delay:.16s}.hero2-copy>:nth-child(4){animation-delay:.24s}.hero2-copy>:nth-child(n+5){animation-delay:.32s}
.hero2-art{animation:moFade .9s ease .15s backwards}
.hero2-art .phone{animation:moPop .8s var(--mo-ease) .2s backwards}
.hero2-art .hero-note{animation:moUp .7s var(--mo-ease) .55s backwards}
.cb-public-page #main>section:first-of-type:not(.hero2) .container>:nth-child(2){animation-delay:.08s}
.cb-public-page #main>section:first-of-type:not(.hero2) .container>:nth-child(3){animation-delay:.16s}
.cb-public-page #main>section:first-of-type:not(.hero2) .container>:nth-child(4){animation-delay:.24s}
.cb-public-page #main>section:first-of-type:not(.hero2) .container>:nth-child(n+5){animation-delay:.32s}
.cb-public-page .float-brand{animation-name:moPop,bob;animation-duration:.7s,6s;animation-timing-function:var(--mo-ease),ease-in-out;animation-iteration-count:1,infinite;animation-fill-mode:backwards,none}
.cb-public-page .nav{animation:moDown .5s var(--mo-ease) backwards}
/* scroll reveal (script adds .mo, then .in when the element is on screen, then removes both) */
html.mo-on .mo{opacity:0;transform:translate3d(0,24px,0);transition:opacity var(--mo-slow) var(--mo-ease),transform var(--mo-slow) var(--mo-ease);transition-delay:var(--mo-d,0ms);will-change:opacity,transform}
html.mo-on .mo.mo-zoom{transform:scale(.94)}
html.mo-on .mo.mo-left{transform:translate3d(-26px,0,0)}
html.mo-on .mo.mo-right{transform:translate3d(26px,0,0)}
html.mo-on .mo.in{opacity:1;transform:none}

/* ---------- customer dashboard: page enters, cards cascade ---------- */
.app-bar{animation:moDown .45s var(--mo-ease) backwards}
.app-side{animation:moSlideX .5s var(--mo-ease) backwards}
.app-content>*{animation:moUp var(--mo-med) var(--mo-ease) backwards}
.app-content>:nth-child(2){animation-delay:.05s}.app-content>:nth-child(3){animation-delay:.10s}.app-content>:nth-child(4){animation-delay:.15s}
.app-content>:nth-child(5){animation-delay:.20s}.app-content>:nth-child(6){animation-delay:.25s}.app-content>:nth-child(7){animation-delay:.30s}
.app-content>:nth-child(n+8){animation-delay:.35s}
.app-content .pop-grid>*,.app-content .cat-card,.app-content .nm-row,.app-content .list-card{animation:moPop .4s var(--mo-ease) backwards}
.app-content .pop-grid>:nth-child(2),.app-content .nm-row:nth-child(2){animation-delay:.05s}.app-content .pop-grid>:nth-child(3),.app-content .nm-row:nth-child(3){animation-delay:.1s}
.app-content .pop-grid>:nth-child(4),.app-content .nm-row:nth-child(4){animation-delay:.15s}.app-content .pop-grid>:nth-child(n+5),.app-content .nm-row:nth-child(n+5){animation-delay:.2s}
.bottom-nav{animation:moUp .5s var(--mo-ease) .1s backwards}

/* ---------- admin: content and tables enter gently ---------- */
.adm-main>*{animation:moUp var(--mo-med) var(--mo-ease) backwards}
.adm-main>:nth-child(2){animation-delay:.05s}.adm-main>:nth-child(3){animation-delay:.10s}.adm-main>:nth-child(4){animation-delay:.15s}.adm-main>:nth-child(n+5){animation-delay:.2s}
.adm-main tbody tr{animation:moFade .4s ease backwards}
.adm-main tbody tr:nth-child(1){animation-delay:.05s}.adm-main tbody tr:nth-child(2){animation-delay:.08s}.adm-main tbody tr:nth-child(3){animation-delay:.11s}.adm-main tbody tr:nth-child(4){animation-delay:.14s}
.adm-main tbody tr:nth-child(5){animation-delay:.17s}.adm-main tbody tr:nth-child(6){animation-delay:.20s}.adm-main tbody tr:nth-child(7){animation-delay:.23s}.adm-main tbody tr:nth-child(8){animation-delay:.26s}.adm-main tbody tr:nth-child(n+9){animation-delay:.3s}
.adm-side{animation:moSlideX .5s var(--mo-ease) backwards}

/* ---------- admin product form (accordion sections) ---------- */
.pf-sec{border:1px solid var(--line);border-radius:16px;background:var(--surface);overflow:hidden;transition:box-shadow .25s var(--mo-ease),border-color .25s}
.pf-sec[open]{border-color:var(--p-200,#d9d3ff);box-shadow:0 8px 22px rgba(40,24,120,.07)}
.pf-sec>summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 18px;font-weight:800}
.pf-sec>summary::-webkit-details-marker{display:none}
.pf-sec>summary small{font-weight:500;color:var(--muted)}
.pf-sec>summary::after{content:"";width:9px;height:9px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(45deg);transition:transform .25s var(--mo-ease);flex:none;margin-top:-4px}
.pf-sec[open]>summary::after{transform:rotate(-135deg);margin-top:4px}
.pf-body{padding:4px 18px 18px;border-top:1px solid var(--line-2,var(--line))}
.pf-body>.field:first-child,.pf-body>.row:first-child{margin-top:14px}
.pf-inner{margin-top:10px;border:1px dashed var(--line);border-radius:12px;padding:0}
.pf-inner>summary{padding:11px 14px;font-weight:700;cursor:pointer}
.pf-inner .pf-body{border-top:0}
.pf-note{font-size:.86rem;color:var(--muted);margin:12px 0 0}
.pf-private{border-color:#f4c9c9}.pf-private>summary{color:#a32020}
.pf-actions{position:sticky;bottom:0;display:flex;gap:10px;align-items:center;padding:12px 0;background:linear-gradient(to top,var(--surface) 70%,transparent);z-index:5}
[data-types][hidden],.pf-sec [hidden]{display:none!important}

/* ---------- respect reduced motion: everything visible, nothing moving ---------- */
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  html.mo-on .mo{opacity:1!important;transform:none!important}
  .app-content>*,.adm-main>*,.adm-main tbody tr,.app-bar,.app-side,.adm-side,.bottom-nav,.flash,.toast{animation:none!important}
}
