/* KVANTYRA TRENDS QUICK REPEAT V126 FIXED BARS START */

/*
  V126 separates the two controls from the scroll flow:
  - the navigation bar is fixed below Telegram's own controls;
  - the generation button is fixed above the bottom safe area;
  - the content receives matching top/bottom reserves, so neither bar
    overlaps the cover, title, fields, prompt or admin actions.
*/
#kvTrendsV125QuickRepeat{
  --kv-trends-v126-top-offset:72px;
  --kv-trends-v126-bottom-offset:10px;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  padding:0 12px!important;
  scroll-padding-top:calc(var(--kv-trends-v126-top-offset) + 74px);
  scroll-padding-bottom:112px;
  -webkit-overflow-scrolling:touch;
}

#kvTrendsV125QuickRepeat .kv-trends-v125-shell{
  width:min(100%,720px)!important;
  min-height:100%;
  margin:0 auto!important;
  padding-top:calc(var(--kv-trends-v126-top-offset) + 76px)!important;
  padding-bottom:calc(104px + var(--kv-trends-v126-bottom-offset) + env(safe-area-inset-bottom,0px))!important;
  display:grid!important;
  align-content:start;
  gap:14px!important;
}

#kvTrendsV125QuickRepeat .kv-trends-v125-top{
  position:fixed!important;
  z-index:13090!important;
  top:var(--kv-trends-v126-top-offset)!important;
  left:50%!important;
  right:auto!important;
  width:min(calc(100% - 24px),720px)!important;
  min-height:62px!important;
  margin:0!important;
  padding:8px 0!important;
  transform:translateX(-50%)!important;
  display:grid!important;
  grid-template-columns:minmax(104px,1fr) auto minmax(104px,1fr)!important;
  align-items:center!important;
  gap:10px!important;
  border:1px solid rgba(181,156,255,.16);
  border-radius:22px;
  background:
    radial-gradient(circle at 50% 0%,rgba(107,73,255,.14),transparent 58%),
    linear-gradient(180deg,rgba(9,10,28,.985),rgba(7,8,23,.97))!important;
  box-shadow:
    0 18px 42px rgba(0,0,0,.38),
    0 0 0 1px rgba(255,255,255,.025) inset,
    0 0 28px rgba(105,63,255,.10);
  backdrop-filter:blur(22px) saturate(1.18)!important;
  -webkit-backdrop-filter:blur(22px) saturate(1.18)!important;
}

#kvTrendsV125QuickRepeat .kv-trends-v125-back{
  justify-self:start!important;
  min-width:104px;
  min-height:46px!important;
  margin-left:7px;
  padding:0 13px!important;
  border-radius:16px!important;
}

#kvTrendsV125QuickRepeat .kv-trends-v125-brand{
  justify-self:center!important;
  justify-content:center!important;
  width:max-content;
  max-width:190px;
  margin:0!important;
  text-align:center;
  transform:none!important;
}

#kvTrendsV125QuickRepeat .kv-trends-v125-brand img{
  width:34px!important;
  height:34px!important;
  flex:0 0 34px!important;
}

#kvTrendsV125QuickRepeat .kv-trends-v125-share{
  justify-self:end!important;
  width:46px!important;
  height:46px!important;
  margin-right:7px;
  border-radius:16px!important;
}

#kvTrendsV125QuickRepeat .kv-trends-v125-submit{
  position:fixed!important;
  z-index:13095!important;
  left:50%!important;
  right:auto!important;
  bottom:calc(var(--kv-trends-v126-bottom-offset) + env(safe-area-inset-bottom,0px))!important;
  width:min(calc(100% - 24px),720px)!important;
  min-height:62px!important;
  margin:0!important;
  transform:translateX(-50%)!important;
  border-radius:21px!important;
  box-shadow:
    0 20px 52px rgba(78,48,210,.42),
    0 0 38px rgba(160,61,255,.20),
    0 -16px 38px rgba(3,4,12,.72),
    inset 0 1px 0 rgba(255,255,255,.21)!important;
}

/* A soft footer plate keeps the action readable over every card or field. */
#kvTrendsV125QuickRepeat:after{
  content:"";
  position:fixed;
  z-index:13080;
  left:0;
  right:0;
  bottom:0;
  height:calc(92px + var(--kv-trends-v126-bottom-offset) + env(safe-area-inset-bottom,0px));
  pointer-events:none;
  background:linear-gradient(180deg,transparent 0%,rgba(3,4,13,.84) 42%,rgba(3,4,12,.98) 100%);
}

/* Prevent the fixed action from hiding the last admin controls. */
#kvTrendsV125QuickRepeat .kv-trends-v125-admin{
  margin-bottom:8px;
}

@media(max-width:430px){
  #kvTrendsV125QuickRepeat{
    padding-left:9px!important;
    padding-right:9px!important;
  }

  #kvTrendsV125QuickRepeat .kv-trends-v125-top{
    width:calc(100% - 18px)!important;
    grid-template-columns:minmax(92px,1fr) auto minmax(92px,1fr)!important;
    min-height:60px!important;
    border-radius:20px!important;
  }

  #kvTrendsV125QuickRepeat .kv-trends-v125-back{
    min-width:92px;
    margin-left:5px;
    padding:0 10px!important;
    font-size:12px!important;
  }

  #kvTrendsV125QuickRepeat .kv-trends-v125-brand{
    max-width:148px;
    gap:7px!important;
    font-size:10px!important;
    letter-spacing:.11em!important;
  }

  #kvTrendsV125QuickRepeat .kv-trends-v125-brand img{
    width:31px!important;
    height:31px!important;
    flex-basis:31px!important;
  }

  #kvTrendsV125QuickRepeat .kv-trends-v125-share{
    width:44px!important;
    height:44px!important;
    margin-right:5px;
  }

  #kvTrendsV125QuickRepeat .kv-trends-v125-submit{
    width:calc(100% - 18px)!important;
    min-height:58px!important;
    border-radius:19px!important;
  }

  #kvTrendsV125QuickRepeat .kv-trends-v125-shell{
    padding-top:calc(var(--kv-trends-v126-top-offset) + 72px)!important;
    padding-bottom:calc(100px + var(--kv-trends-v126-bottom-offset) + env(safe-area-inset-bottom,0px))!important;
  }
}

@media(max-width:360px){
  #kvTrendsV125QuickRepeat .kv-trends-v125-top{
    grid-template-columns:88px minmax(0,1fr) 88px!important;
  }

  #kvTrendsV125QuickRepeat .kv-trends-v125-brand span{
    display:none;
  }

  #kvTrendsV125QuickRepeat .kv-trends-v125-back{
    min-width:84px;
  }
}

/* KVANTYRA TRENDS QUICK REPEAT V126 FIXED BARS END */
