/* [1.5.1077] Distribuição › “Configurações” em Material 3 Expressive (includes/admin/admin-distribution-settings.php),
   por cima das peças dos Royalties (royalties-m3.css). Tudo começa por “.dst”.
   A cor diz o assunto: verde é a parte do artista e violeta a da 1MZ, azul os lançamentos, vermelho as retiradas e
   âmbar os alertas. “!important” nos campos por causa do estilo comum dos separadores da Distribuição (.rmbz-rd2). */

body.rmbz-m3 .dst .dst-alerts{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,420px),1fr));gap:14px;margin:0 0 14px}
body.rmbz-m3 #wpbody-content .dst .dst-alerts .roy-alert{align-items:flex-start;margin:0}
body.rmbz-m3 .dst .dst-go{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
body.rmbz-m3 #wpbody-content .dst .dst-go .roy-btn{max-width:100%;background:var(--m3-card);white-space:normal}
body.rmbz-m3 #wpbody-content .dst .roy-card-head{align-items:flex-start}
body.rmbz-m3 #wpbody-content .dst .roy-two>.roy-card{display:flex;flex-direction:column;gap:12px}
body.rmbz-m3 #wpbody-content .dst .roy-two>.roy-card>.roy-card-head{margin:0}
body.rmbz-m3 .dst .dst-say{color:var(--m3-t2);font-size:13.5px;line-height:1.45;text-align:center}
body.rmbz-m3 .dst .dst-err{padding:10px 14px;border-radius:14px;background:var(--m3-danger-soft);color:var(--m3-danger-ink);font-size:13px;font-weight:700;line-height:1.4}

/* ============ Os números grandes ============ */
body.rmbz-m3 .dst .dst-big{display:flex;align-items:baseline;justify-content:center;gap:8px;min-width:0;color:var(--m3-t1);cursor:text}
body.rmbz-m3 #wpbody-content .dst .dst-big input[type=text]{width:calc(var(--len,3)*.69em + 4px);max-width:calc(100% - 44px);min-width:0;min-height:72px;margin:0;padding:0;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;color:inherit;font:850 54px/72px var(--m3-font);font-variation-settings:'wdth' 108;font-variant-numeric:tabular-nums;letter-spacing:-1px;text-align:right}
body.rmbz-m3 .dst .dst-big b{font-size:17px;font-weight:800}

/* ============ Os royalties ============ */
body.rmbz-m3 .dst .dst-royalties{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr) minmax(0,1fr);gap:12px}
body.rmbz-m3 .dst .dst-rule{display:flex;flex-direction:column;gap:10px;min-width:0;padding:16px;border-radius:26px;background:var(--m3-brand-soft);color:var(--m3-brand-ink);font-size:13.5px;line-height:1.45}
body.rmbz-m3 .dst .dst-switch{position:relative;display:flex;align-items:center;gap:14px;min-height:56px;cursor:pointer}
body.rmbz-m3 #wpbody-content .dst .dst-switch input{position:absolute;inset:0;width:100%;height:100%;margin:0;border:0;opacity:0;cursor:pointer}
body.rmbz-m3 .dst .dst-switch-track{position:relative;flex:none;display:block;width:64px;height:38px;border-radius:19px;background:var(--m3-s4);box-shadow:inset 0 0 0 2px var(--m3-t3);transition:background .25s,box-shadow .25s}
body.rmbz-m3 .dst .dst-switch-track i{position:absolute;top:10px;left:10px;width:18px;height:18px;border-radius:50%;background:var(--m3-t3);transition:transform .45s var(--m3-spring),width .3s var(--m3-spring),height .3s var(--m3-spring),top .3s var(--m3-spring),left .3s var(--m3-spring),background .25s}
body.rmbz-m3 .dst .dst-switch input:checked+.dst-switch-track{background:var(--m3-success);box-shadow:inset 0 0 0 2px var(--m3-success)}
body.rmbz-m3 .dst .dst-switch input:checked+.dst-switch-track i{top:5px;left:5px;width:28px;height:28px;background:#fff;transform:translateX(26px)}
body.rmbz-m3 .dst .dst-switch input:focus-visible+.dst-switch-track{outline:2px solid var(--m3-pri);outline-offset:2px}
body.rmbz-m3 .dst .dst-switch-text{display:grid;gap:1px}
body.rmbz-m3 .dst .dst-switch-text strong{color:var(--m3-t1);font-size:18px;font-weight:820;line-height:1.25}
body.rmbz-m3 .dst .dst-switch-text span{font-weight:700}
body.rmbz-m3 .dst .dst-share{display:flex;flex-direction:column;gap:10px;min-width:0;padding:16px;border-radius:26px;background:var(--m3-success-soft);color:var(--m3-success-ink);transition:opacity .25s}
body.rmbz-m3 #wpbody-content .dst .dst-share h4{color:var(--m3-t1);font:800 15.5px/1.3 var(--m3-font);text-align:center}
body.rmbz-m3 .dst .dst-share .dst-big{padding:0 14px;border-radius:22px;background:var(--m3-card);box-shadow:inset 0 0 0 1.5px var(--m3-olv);transition:box-shadow .2s,border-radius .35s var(--m3-spring-soft)}
body.rmbz-m3 .dst .dst-share .dst-big b{font-size:30px}
body.rmbz-m3 .dst :is(.dst-share .dst-big,.dst-count):focus-within{border-radius:14px;box-shadow:inset 0 0 0 2px var(--m3-pri)}
body.rmbz-m3 .dst :is(.dst-share .dst-big,.dst-count).is-bad{background:var(--m3-danger-soft);box-shadow:inset 0 0 0 2px var(--m3-danger)}
body.rmbz-m3 .dst .dst-bar{display:flex;gap:3px;height:18px}
body.rmbz-m3 .dst .dst-bar i{flex:var(--w,1) 1 0;min-width:0;border-radius:5px;background:var(--m3-success);transition:flex-grow .45s var(--m3-spring-soft)}
body.rmbz-m3 .dst .dst-bar i+i{background:var(--m3-violet)}
body.rmbz-m3 .dst .dst-bar i:first-child{border-radius:9px 5px 5px 9px}
body.rmbz-m3 .dst .dst-bar i:last-child{border-radius:5px 9px 9px 5px}
body.rmbz-m3 .dst .dst-bar i:has(+[hidden]){border-radius:9px}
body.rmbz-m3 .dst .dst-legend{display:flex;flex-wrap:wrap;justify-content:space-between;gap:2px 10px;font-size:13px;font-weight:650;font-variant-numeric:tabular-nums}
body.rmbz-m3 .dst .dst-legend span+span{color:var(--m3-violet-ink)}
body.rmbz-m3 .dst .dst-royalties.is-off [data-dst-share=with]{opacity:.45}
body.rmbz-m3 #wpbody-content .dst .dst-example{justify-content:center;margin-top:12px;text-align:center}

/* ============ Menos e mais ============ */
body.rmbz-m3 .dst .dst-count{display:grid;grid-template-columns:64px minmax(0,1fr) 64px;align-items:center;gap:8px;margin-top:auto;padding:8px;border-radius:28px;background:var(--tone-soft);transition:box-shadow .2s,border-radius .35s var(--m3-spring-soft)}
body.rmbz-m3 #wpbody-content .dst .dst-step{display:grid;place-items:center;width:64px;height:64px;margin:0;padding:0;border:0;border-radius:32px;background:var(--tone);color:var(--tone-on);cursor:pointer;transition:border-radius .4s var(--m3-spring),background .2s,transform .2s var(--m3-spring),opacity .2s}
body.rmbz-m3 #wpbody-content .dst .dst-step:hover:not(:disabled){border-radius:20px;background:var(--tone-ink);color:#fff}
body.rmbz-m3 #wpbody-content .dst .dst-step:active:not(:disabled){transform:scale(.94)}
body.rmbz-m3 #wpbody-content .dst .dst-step:disabled{opacity:.35;cursor:default}
body.rmbz-m3 .dst .dst-step .ms{font-size:30px}

/* ============ Os códigos: cada parte na sua cor ============ */
body.rmbz-m3 .dst :is(.dst-cell,.dst-list){display:flex;flex-direction:column;gap:10px;min-width:0}
body.rmbz-m3 .dst .dst-cells{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.6fr);gap:10px}
body.rmbz-m3 #wpbody-content .dst .dst-cell input[type=text]{min-height:60px;font-size:24px;font-weight:820;font-variant-numeric:tabular-nums;letter-spacing:2px;text-align:center;text-transform:uppercase}
body.rmbz-m3 .dst .dst-parts{display:flex;gap:4px;margin-top:auto;padding:8px;border-radius:24px;background:var(--m3-s2)}
body.rmbz-m3 .dst .dst-parts span{display:grid;flex:1 1 auto;gap:3px;min-width:0;padding:11px 8px;border-radius:10px;background:var(--m3-s4);color:var(--m3-t1);text-align:center}
body.rmbz-m3 .dst .dst-parts span:first-child{border-radius:18px 10px 10px 18px}
body.rmbz-m3 .dst .dst-parts span:last-child{border-radius:10px 18px 18px 10px}
body.rmbz-m3 .dst .dst-parts b{overflow:hidden;font-size:18px;font-weight:850;letter-spacing:1px;text-overflow:ellipsis;font-variant-numeric:tabular-nums;white-space:nowrap}
body.rmbz-m3 .dst .dst-parts small{font-size:12px;font-weight:650}
body.rmbz-m3 .dst .dst-parts :is([data-part=prefix],[data-part=registrant]){background:var(--m3-violet);color:#fff}
body.rmbz-m3 .dst .dst-parts [data-part=country]{background:var(--m3-violet-soft);color:var(--m3-violet-ink)}

/* ============ As listas ============ */
body.rmbz-m3 #wpbody-content .dst .roy-two>.roy-card>.dst-list{flex:1}
body.rmbz-m3 .dst .dst-add{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;border-radius:20px}
body.rmbz-m3 #wpbody-content .dst .dst-add .roy-btn{min-height:52px}
body.rmbz-m3 #wpbody-content .dst .dst-add.is-bad input[type=text]{background:var(--m3-danger-soft);box-shadow:inset 0 0 0 2px var(--m3-danger)!important}
body.rmbz-m3 .dst .dst-chips{display:flex;flex-wrap:wrap;align-content:flex-start;gap:6px;max-height:264px;overflow-y:auto;overscroll-behavior:contain}
body.rmbz-m3 .dst .dst-chips:empty{display:none}
body.rmbz-m3 .dst .dst-chips li{display:inline-flex;align-items:center;gap:4px;max-width:100%;min-height:40px;padding:0 4px 0 14px;border-radius:20px;background:var(--m3-warning-soft);color:var(--m3-warning-ink);font-size:14px;font-weight:750;line-height:1.3}
body.rmbz-m3 .dst .dst-chips li>span{min-width:0;padding:4px 0;overflow-wrap:anywhere}
body.rmbz-m3 .dst .dst-chips li.is-new{background:var(--m3-success);color:#fff;animation:royIn .4s var(--m3-enter)}
body.rmbz-m3 #wpbody-content .dst .dst-chips button{display:grid;place-items:center;flex:none;width:32px;height:32px;margin:0;padding:0;border:0;border-radius:16px;background:transparent;color:inherit;cursor:pointer;transition:border-radius .35s var(--m3-spring),background .2s,color .2s}
body.rmbz-m3 #wpbody-content .dst .dst-chips button:hover{border-radius:10px;background:var(--m3-danger);color:#fff}
body.rmbz-m3 .dst .dst-chips .ms{font-size:18px}
body.rmbz-m3 .dst .dst-none{padding:20px 16px;border-radius:20px;background:var(--m3-s2);color:var(--m3-t2);font-size:14px;font-weight:650;text-align:center}
body.rmbz-m3 .dst .dst-list-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-top:auto;color:var(--m3-t2);font-size:13px;font-weight:700}

/* ============ As últimas mudanças ============ */
body.rmbz-m3 #wpbody-content .dst .dst-log{grid-template-columns:auto minmax(0,1fr) 190px 150px}
body.rmbz-m3 .dst .dst-log .roy-feed-who{justify-self:start;max-width:100%}
body.rmbz-m3 #wpbody-content .dst .dst-log .roy-feed-when{grid-column:auto;text-align:right}

/* ============ A barra de guardar: sempre à vista, e na cor da marca quando há mudanças ============ */
body.rmbz-m3 .dst :is(.roy-empty,.dst-log){margin:0}
body.rmbz-m3 .dst .roy-empty{margin:0 0 14px}
body.rmbz-m3 .dst .dst-save{position:sticky;z-index:20;bottom:14px;display:flex;align-items:center;gap:10px;padding:10px 10px 10px 22px;border-radius:36px;background:var(--m3-t1);color:#fff;box-shadow:0 18px 40px -18px rgba(31,27,19,.7);transition:border-radius .45s var(--m3-spring-soft)}
body.rmbz-m3 .dst .dst-save.is-on{border-radius:24px}
body.rmbz-m3 .dst .dst-save-text{display:grid;flex:1 1 200px;gap:1px;min-width:0;font-size:13px;line-height:1.35}
body.rmbz-m3 .dst .dst-save-text strong{font-size:17px;font-weight:820}
body.rmbz-m3 .dst .dst-save.is-on .dst-save-text strong{color:var(--m3-brand)}
body.rmbz-m3 #wpbody-content .dst .dst-save .roy-btn{min-height:56px;border-radius:28px}
body.rmbz-m3 #wpbody-content .dst .dst-save .roy-btn:hover:not(:disabled){border-radius:16px}
body.rmbz-m3 #wpbody-content .dst .dst-save .roy-btn--main{min-width:190px}
body.rmbz-m3 #wpbody-content .dst .dst-save .roy-btn--main:disabled{background:rgba(255,255,255,.16);color:#fff;box-shadow:none;opacity:.75}
body.rmbz-m3 .dst .dst-save .is-busy .ms{animation:dstSpin .9s linear infinite}
@keyframes dstSpin{to{transform:rotate(360deg)}}

@container roy (max-width:900px){
  body.rmbz-m3 .dst .dst-royalties{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.rmbz-m3 .dst .dst-rule{grid-column:1/-1}
}
@container roy (max-width:760px){
  body.rmbz-m3 .dst .roy-two{grid-template-columns:minmax(0,1fr)}
  body.rmbz-m3 #wpbody-content .dst .dst-log{grid-template-columns:auto minmax(0,1fr) auto}
  body.rmbz-m3 #wpbody-content .dst .dst-log .roy-feed-text{grid-column:2/-1}
  body.rmbz-m3 #wpbody-content .dst .dst-log .roy-feed-who{grid-row:2;grid-column:2}
  body.rmbz-m3 #wpbody-content .dst .dst-log .roy-feed-when{grid-row:2;grid-column:3;align-self:center}
}
@container roy (max-width:520px){
  body.rmbz-m3 .dst .dst-royalties{grid-template-columns:minmax(0,1fr)}
  body.rmbz-m3 #wpbody-content .dst .dst-add .roy-btn{padding:0 14px 0 10px}
  body.rmbz-m3 .dst .dst-parts b{font-size:15px;letter-spacing:0}
  body.rmbz-m3 .dst .dst-parts small{font-size:11.5px}
  body.rmbz-m3 .dst .dst-save{flex-wrap:wrap;padding:14px}
  body.rmbz-m3 .dst .dst-save-text{flex:1 1 100%;text-align:center}
  body.rmbz-m3 #wpbody-content .dst .dst-save .roy-btn{flex:1;min-width:0}
}
@media (prefers-reduced-motion:reduce){
  body.rmbz-m3 .dst *{animation:none!important;transition:none!important}
}
