/* TSR Prices - Apple Modular Grid + Floating + Modal — FULL CSS CONTROL v1.8.2 */
:root{--tsr-radius:22px;--tsr-gap:12px;--tsr-card-bg:rgba(255,255,255,0.82);--tsr-card-border:rgba(0,0,0,0.07);--tsr-card-shadow:0 8px 24px rgba(0,0,0,0.08),0 1px 3px rgba(0,0,0,0.06);--tsr-card-padding:14px;--tsr-blur:16px;--tsr-text:#1d1d1f;--tsr-muted:#6e6e73;--tsr-price-size:17px;--tsr-unit-size:11px;--tsr-unit-weight:500;--tsr-unit-color:var(--tsr-muted);--tsr-accent:#007aff;--tsr-icon-bg:rgba(0,122,255,0.1);--tsr-icon-radius:10px;--tsr-modal-bg:rgba(255,255,255,0.92);--tsr-modal-border:rgba(0,0,0,0.08);--tsr-modal-radius:28px;--tsr-modal-padding:18px;--tsr-modal-shadow:0 24px 64px rgba(0,0,0,0.22);--tsr-modal-backdrop:rgba(0,0,0,0.38);--tsr-modal-title-size:15px;--tsr-float-btn-size:20px;--tsr-updated-size:10.5px;--tsr-collapsed-size:12.5px}
.tsr-prices{--tsr-radius:22px;--tsr-gap:12px;--tsr-card-bg:rgba(255,255,255,0.82);--tsr-card-border:rgba(0,0,0,0.07);--tsr-card-shadow:0 8px 24px rgba(0,0,0,0.08),0 1px 3px rgba(0,0,0,0.06);--tsr-card-padding:14px;--tsr-blur:16px;--tsr-text:#1d1d1f;--tsr-muted:#6e6e73;--tsr-price-size:17px;--tsr-unit-size:11px;--tsr-unit-weight:500;--tsr-unit-color:var(--tsr-muted);--tsr-accent:#007aff;--tsr-icon-bg:rgba(0,122,255,0.1);--tsr-icon-radius:10px;--tsr-float-btn-size:20px;--tsr-updated-size:10.5px;--tsr-collapsed-size:12.5px;direction:rtl}
@media(prefers-color-scheme:dark){
  .tsr-prices:not(.tsr-light){--tsr-card-bg:rgba(44,44,46,0.82);--tsr-card-border:rgba(255,255,255,0.09);--tsr-card-shadow:0 8px 24px rgba(0,0,0,0.35);--tsr-text:#f5f5f7;--tsr-muted:#a1a1a6;--tsr-modal-bg:rgba(32,32,34,0.92);--tsr-modal-border:rgba(255,255,255,0.08)}
}
.tsr-prices.tsr-dark{--tsr-card-bg:rgba(44,44,46,0.85);--tsr-card-border:rgba(255,255,255,0.1);--tsr-text:#f5f5f7;--tsr-muted:#a1a1a6;--tsr-modal-bg:rgba(32,32,34,0.92);--tsr-modal-border:rgba(255,255,255,0.08)}
.tsr-prices__grid{display:grid;gap:var(--tsr-gap);grid-template-columns:repeat(auto-fill,minmax(155px,1fr))}
@media(min-width:768px){.tsr-prices__grid{grid-template-columns:repeat(auto-fill,minmax(175px,1fr))}}
@media(min-width:1024px){.tsr-prices__grid{grid-template-columns:repeat(auto-fill,minmax(190px,1fr))}}
.tsr-prices--cols-2 .tsr-prices__grid{grid-template-columns:repeat(2,1fr)}
.tsr-prices--cols-3 .tsr-prices__grid{grid-template-columns:repeat(3,1fr)}
.tsr-prices--cols-4 .tsr-prices__grid{grid-template-columns:repeat(4,1fr)}
.tsr-price-card{position:relative;background:var(--tsr-card-bg);border:1px solid var(--tsr-card-border);border-radius:var(--tsr-radius);padding:var(--tsr-card-padding);backdrop-filter:blur(var(--tsr-blur)) saturate(1.4);-webkit-backdrop-filter:blur(var(--tsr-blur)) saturate(1.4);box-shadow:var(--tsr-card-shadow);cursor:pointer;transition:transform .25s cubic-bezier(.34,1.56,.64,1),box-shadow .25s,background .2s;overflow:hidden;user-select:none}
.tsr-price-card:hover{transform:translateY(-3px) scale(1.015);box-shadow:0 14px 32px rgba(0,0,0,0.12),0 2px 8px rgba(0,0,0,0.06)}
.tsr-price-card:active{transform:scale(0.98)}
.tsr-price-card__top{display:flex;align-items:center;gap:8px;margin-bottom:10px}
.tsr-price-card__icon{width:34px;height:34px;display:flex;align-items:center;justify-content:center;font-size:19px;background:var(--tsr-icon-bg);border-radius:var(--tsr-icon-radius);flex-shrink:0}
.tsr-price-card__name{font-size:12.5px;font-weight:600;color:var(--tsr-text);line-height:1.3;flex:1}
.tsr-price-card__price{font-size:var(--tsr-price-size);font-weight:800;color:var(--tsr-text);letter-spacing:-0.02em;line-height:1}
.tsr-price-card__unit-inline{font-size:var(--tsr-unit-size);font-weight:var(--tsr-unit-weight);color:var(--tsr-unit-color);margin-inline-start:5px;letter-spacing:0}
.tsr-price-card__meta{font-size:11px;color:var(--tsr-muted);margin-top:4px;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.tsr-price-card__change{display:inline-flex;align-items:center;gap:3px;font-size:11px;font-weight:700;padding:2px 6px;border-radius:999px}
.tsr-price-card__change--up{background:rgba(52,199,89,0.14);color:#1d8127}
.tsr-price-card__change--down{background:rgba(255,59,48,0.12);color:#c81e1e}
.tsr-price-card__change--flat{background:rgba(120,120,128,0.12);color:var(--tsr-muted)}
/* floating — unified continuous card | 8 positions — no flash: hidden until inline script decides */
.tsr-prices--floating{position:fixed;z-index:9998;width:340px;max-width:calc(100vw - 16px);min-width:140px;pointer-events:auto;background:var(--tsr-card-bg);border:1px solid var(--tsr-card-border);border-radius:var(--tsr-radius);padding:10px;backdrop-filter:blur(var(--tsr-blur)) saturate(1.4);-webkit-backdrop-filter:blur(var(--tsr-blur)) saturate(1.4);box-shadow:var(--tsr-card-shadow);transition:transform .42s cubic-bezier(.34,1.56,.64,1),width .35s,box-shadow .25s;overflow:hidden;visibility:hidden}
.tsr-prices--floating.tsr-floating--bl{bottom:12px;left:12px}
.tsr-prices--floating.tsr-floating--br{bottom:12px;right:12px}
.tsr-prices--floating.tsr-floating--tl{top:12px;left:12px}
.tsr-prices--floating.tsr-floating--tr{top:12px;right:12px}
.tsr-prices--floating.tsr-floating--lc{left:12px;top:50%;bottom:auto;transform:translateY(-50%)}
.tsr-prices--floating.tsr-floating--rc{right:12px;left:auto;top:50%;bottom:auto;transform:translateY(-50%)}
.tsr-prices--floating.tsr-floating--tc{top:12px;left:50%;right:auto;bottom:auto;transform:translateX(-50%)}
.tsr-prices--floating.tsr-floating--bc{bottom:12px;left:50%;top:auto;transform:translateX(-50%)}
.tsr-prices--floating .tsr-prices__grid{grid-template-columns:repeat(auto-fill,minmax(120px,1fr))}
@media(max-width:360px){.tsr-prices--floating .tsr-prices__grid{grid-template-columns:1fr}}
@media(max-width:767px){
  .tsr-prices--floating.tsr-floating--mobile-bl{bottom:12px!important;left:12px!important;right:auto!important;top:auto!important;transform:none!important}
  .tsr-prices--floating.tsr-floating--mobile-br{bottom:12px!important;right:12px!important;left:auto!important;top:auto!important;transform:none!important}
  .tsr-prices--floating.tsr-floating--mobile-tl{top:12px!important;left:12px!important;right:auto!important;bottom:auto!important;transform:none!important}
  .tsr-prices--floating.tsr-floating--mobile-tr{top:12px!important;right:12px!important;left:auto!important;bottom:auto!important;transform:none!important}
  .tsr-prices--floating.tsr-floating--mobile-lc{left:8px!important;top:50%!important;right:auto!important;bottom:auto!important;transform:translateY(-50%)!important}
  .tsr-prices--floating.tsr-floating--mobile-rc{right:8px!important;left:auto!important;top:50%!important;bottom:auto!important;transform:translateY(-50%)!important}
  .tsr-prices--floating.tsr-floating--mobile-tc{top:8px!important;left:50%!important;right:auto!important;bottom:auto!important;transform:translateX(-50%)!important}
  .tsr-prices--floating.tsr-floating--mobile-bc{bottom:8px!important;left:50%!important;right:auto!important;top:auto!important;transform:translateX(-50%)!important}
}
.tsr-prices__float-head{display:flex;align-items:center;justify-content:flex-end;padding:0 0 8px;margin:0 0 8px;border-bottom:1px solid var(--tsr-card-border);gap:5px}
.tsr-prices__updated-badge{display:flex;align-items:center;justify-content:center;gap:5px;font-size:var(--tsr-updated-size);font-weight:500;color:var(--tsr-muted);background:transparent;border:none;padding:0;margin:8px 0 0;text-align:center;letter-spacing:0.2px}
.tsr-prices__updated-badge::before{content:'';width:6px;height:6px;border-radius:50%;background:#34c759;box-shadow:0 0 0 3px rgba(52,199,89,0.18);animation:tsrPulse 2s infinite;flex-shrink:0}
@keyframes tsrPulse{0%,100%{opacity:1}50%{opacity:.5}}
.tsr-prices__collapsed-label{display:none;align-items:center;gap:6px;font-size:var(--tsr-collapsed-size);font-weight:700;color:var(--tsr-text);white-space:nowrap}
.tsr-collapsed-dot{width:7px;height:7px;border-radius:50%;background:#34c759;box-shadow:0 0 0 3px rgba(52,199,89,0.22);flex-shrink:0}
/* bar — for Homan Zar AI tools bar (horizontal inline) */
.tsr-prices--bar{background:var(--tsr-card-bg);border:1px solid var(--tsr-card-border);border-radius:12px;padding:8px;display:flex;align-items:center;gap:8px;overflow-x:auto;scrollbar-width:thin}
.tsr-prices--bar .tsr-prices__grid{display:flex;gap:8px;overflow:visible;flex:1}
.tsr-prices--bar .tsr-price-card{flex:0 0 auto;min-width:132px;padding:8px 10px}
.tsr-prices--bar .tsr-price-card__icon{width:26px;height:26px;font-size:15px}
.tsr-prices--bar .tsr-price-card__name{font-size:11px}
.tsr-prices--bar .tsr-price-card__price{font-size:13px}
.tsr-prices--bar .tsr-prices__updated-badge{margin:0 8px 0 0;flex-shrink:0}
/* carousel */
.tsr-prices--carousel .tsr-prices__grid{display:block;position:relative;overflow:hidden;min-height:92px}
.tsr-prices--carousel .tsr-price-card{position:absolute;inset:0;opacity:0;pointer-events:none;transform:translateX(14px) scale(0.98);margin:0}
.tsr-prices--carousel .tsr-price-card.is-active{opacity:1;pointer-events:auto;position:relative;transform:none}
.tsr-carousel--slide .tsr-price-card{transition:transform .45s cubic-bezier(.4,0,.2,1),opacity .35s}
.tsr-carousel--slide .tsr-price-card.is-exit{transform:translateX(-14px) scale(0.98);opacity:0}
.tsr-carousel--fade .tsr-price-card{transform:none;transition:opacity .45s}
.tsr-carousel--fade .tsr-price-card.is-exit{opacity:0}
.tsr-carousel--flip .tsr-price-card{transform:perspective(600px) rotateY(10deg) scale(0.97);transition:transform .5s cubic-bezier(.34,1.56,.64,1),opacity .35s}
.tsr-carousel--flip .tsr-price-card.is-active{transform:perspective(600px) rotateY(0) scale(1)}
.tsr-prices__carousel-dots{display:flex;gap:5px;justify-content:center;margin-top:8px}
.tsr-prices__dot{width:6px;height:6px;border-radius:50%;background:rgba(120,120,128,0.3);transition:.3s;cursor:pointer}
.tsr-prices__dot.is-active{background:var(--tsr-accent);width:16px;border-radius:999px}
.tsr-prices__float-actions{display:flex;gap:5px;align-items:center}
.tsr-prices__float-btn{width:var(--tsr-float-btn-size);height:var(--tsr-float-btn-size);border-radius:50%;border:1px solid var(--tsr-card-border);background:rgba(120,120,128,0.14);cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:calc(var(--tsr-float-btn-size) * 0.45);color:var(--tsr-muted);transition:.2s;flex-shrink:0;line-height:1}
.tsr-prices__float-btn:hover{background:rgba(0,0,0,0.08);transform:scale(1.08)}
.tsr-prices__float-btn--drag{cursor:grab;background:rgba(0,122,255,0.1);color:var(--tsr-accent);border-color:rgba(0,122,255,0.15)}
.tsr-prices__float-btn--drag:active{cursor:grabbing}
.tsr-prices--floating.is-collapsed{width:auto!important;height:auto!important;min-width:0!important;min-height:0!important;border-radius:12px!important;padding:8px 14px!important;display:flex!important;align-items:center;justify-content:center;cursor:pointer;overflow:hidden}
.tsr-prices--floating.tsr-floating--bl.is-collapsed{bottom:12px!important;left:12px!important;right:auto!important;top:auto!important;transform:none!important}
.tsr-prices--floating.tsr-floating--br.is-collapsed{bottom:12px!important;right:12px!important;left:auto!important;top:auto!important;transform:none!important}
.tsr-prices--floating.tsr-floating--tr.is-collapsed{top:12px!important;right:12px!important;left:auto!important;bottom:auto!important;transform:none!important}
.tsr-prices--floating.tsr-floating--tl.is-collapsed{top:12px!important;left:12px!important;right:auto!important;bottom:auto!important;transform:none!important}
.tsr-prices--floating.tsr-floating--lc.is-collapsed{left:12px!important;top:50%!important;right:auto!important;bottom:auto!important;transform:translateY(-50%)!important}
.tsr-prices--floating.tsr-floating--rc.is-collapsed{right:12px!important;left:auto!important;top:50%!important;bottom:auto!important;transform:translateY(-50%)!important}
.tsr-prices--floating.tsr-floating--tc.is-collapsed{left:50%!important;right:auto!important;top:12px!important;bottom:auto!important;transform:translateX(-50%)!important}
.tsr-prices--floating.tsr-floating--bc.is-collapsed{left:50%!important;right:auto!important;bottom:12px!important;top:auto!important;transform:translateX(-50%)!important}
.tsr-prices--floating.is-collapsed .tsr-prices__grid,.tsr-prices--floating.is-collapsed .tsr-prices__updated-badge,.tsr-prices--floating.is-collapsed .tsr-prices__float-head,.tsr-prices--floating.is-collapsed .tsr-prices__carousel-dots{display:none!important}
.tsr-prices--floating.is-collapsed .tsr-prices__collapsed-label{display:flex!important}
.tsr-prices--floating:not(.is-collapsed) .tsr-prices__collapsed-label{display:none!important}
.tsr-prices--floating.is-collapsed:hover{transform:translateY(-50%) scale(1.03)}
.tsr-prices--floating.is-collapsed.tsr-floating--tc:hover,.tsr-prices--floating.is-collapsed.tsr-floating--bc:hover{transform:translateX(-50%) scale(1.03)}
/* modal */
.tsr-prices-modal{position:fixed;inset:0;z-index:10000;display:none;align-items:center;justify-content:center;padding:16px}
.tsr-prices-modal.is-open{display:flex}
.tsr-prices-modal__backdrop{position:absolute;inset:0;background:var(--tsr-modal-backdrop);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);opacity:0;transition:opacity .3s}
.tsr-prices-modal.is-open .tsr-prices-modal__backdrop{opacity:1}
.tsr-prices-modal__panel{position:relative;background:var(--tsr-modal-bg);border:1px solid var(--tsr-modal-border);border-radius:var(--tsr-modal-radius);backdrop-filter:blur(24px) saturate(1.4);-webkit-backdrop-filter:blur(24px) saturate(1.4);box-shadow:var(--tsr-modal-shadow);width:min(720px,95vw);max-height:85vh;overflow:auto;padding:var(--tsr-modal-padding);transform:translateY(14px) scale(0.97);opacity:0;transition:transform .42s cubic-bezier(.34,1.56,.64,1),opacity .3s}
.tsr-prices-modal.is-open .tsr-prices-modal__panel{transform:none;opacity:1}
.tsr-prices-modal__header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;position:sticky;top:0;background:var(--tsr-modal-bg);backdrop-filter:blur(12px);padding:4px 0 8px;z-index:1;border-radius:12px}
.tsr-prices-modal__title{font-size:var(--tsr-modal-title-size);font-weight:800;color:var(--tsr-text)}
.tsr-prices-modal__close{width:28px;height:28px;border-radius:50%;border:none;background:#ff3b30;color:#fff;cursor:pointer;font-size:13px;font-weight:300;line-height:1;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 8px rgba(255,59,48,0.35);transition:transform .2s,background .2s}
.tsr-prices-modal__close:hover{background:#e0342a;transform:scale(1.08)}
.tsr-prices-modal__grid{display:grid;gap:var(--tsr-gap);grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}
.tsr-prices-modal__updated{font-size:13.5px;font-weight:600;letter-spacing:0.2px;word-spacing:1px;color:var(--tsr-text);text-align:center;margin-top:14px;padding-top:12px;border-top:1px solid var(--tsr-modal-border);background:rgba(120,120,128,0.08);border-radius:10px;padding:8px 12px}
.tsr-price-card.tsr-card--up{--tsr-card-bg:rgba(52,199,89,0.07);--tsr-card-border:rgba(52,199,89,0.14)}
.tsr-price-card.tsr-card--down{--tsr-card-bg:rgba(255,59,48,0.06);--tsr-card-border:rgba(255,59,48,0.12)}
.tsr-price-card.tsr-card--flat{--tsr-card-bg:rgba(120,120,128,0.06);--tsr-card-border:rgba(120,120,128,0.10)}
.tsr-prices-modal__actions{display:flex;gap:10px;justify-content:center;margin-top:14px;flex-wrap:wrap}
.tsr-prices-modal__actions.tsr-layout--column{flex-direction:column}
.tsr-prices-modal__actions.tsr-layout--grid{display:grid;grid-template-columns:repeat(var(--tsr-btn-cols,2),1fr);gap:10px}
@media(max-width:767px){
  .tsr-prices-modal__actions.tsr-layout--row{flex-direction:column}
  .tsr-prices-modal__actions.tsr-layout--grid{grid-template-columns:1fr}
  .tsr-modal-btn{width:100%}
}
.tsr-modal-btn{flex:1;min-width:140px;text-align:center;padding:10px 18px;border-radius:999px;border:1px solid transparent;text-decoration:none;font-weight:700;font-size:13px;transition:opacity .35s ease, background .35s ease, transform .2s, box-shadow .2s;display:inline-flex;align-items:center;justify-content:center;gap:6px;opacity:1}
.tsr-modal-btn:hover{opacity:0.88}
.tsr-modal-btn--telegram{background:#229ED9;color:#fff;box-shadow:0 4px 12px rgba(34,158,217,0.3)}
.tsr-modal-btn--telegram:hover{background:#1c8ec2;transform:translateY(-1px)}
.tsr-modal-btn--instagram{background:linear-gradient(45deg,#feda75,#fa7e1e,#d62976,#962fbf,#4f5bd5);color:#fff;box-shadow:0 4px 12px rgba(214,41,118,0.3)}
.tsr-modal-btn--instagram:hover{opacity:0.92;transform:translateY(-1px)}
.tsr-prices-modal .tsr-price-card{cursor:default}
.tsr-prices-modal .tsr-price-card:hover{transform:none;box-shadow:var(--tsr-card-shadow)}
@keyframes tsrIn{from{opacity:0;transform:translateY(8px) scale(0.98)}to{opacity:1;transform:none}}
.tsr-prices-modal.is-open .tsr-price-card{animation:tsrIn .4s both}
.tsr-prices-modal.is-open .tsr-price-card:nth-child(1){animation-delay:.03s}
.tsr-prices-modal.is-open .tsr-price-card:nth-child(2){animation-delay:.06s}
.tsr-prices-modal.is-open .tsr-price-card:nth-child(3){animation-delay:.09s}
.tsr-prices-modal.is-open .tsr-price-card:nth-child(4){animation-delay:.12s}
.tsr-prices-modal.is-open .tsr-price-card:nth-child(5){animation-delay:.15s}
.tsr-prices-modal.is-open .tsr-price-card:nth-child(6){animation-delay:.18s}
.tsr-prices-modal.is-open .tsr-price-card:nth-child(7){animation-delay:.21s}
.tsr-prices-modal.is-open .tsr-price-card:nth-child(8){animation-delay:.24s}
@media(max-width:480px){.tsr-prices__grid{grid-template-columns:repeat(2,1fr)}.tsr-prices-modal__grid{grid-template-columns:repeat(2,1fr)}}
