/* ── Утилита скрытия ──────────────────────────────────────────── */
.grampus-timer > .hidden {
  opacity: 0 !important;
  pointer-events: none;
} 
/* ── Обёртка ──────────────────────────────────────────────────── */
.grampus-timer {
  transition: all .3s linear;
  position: fixed;
  left: 45px;
  bottom: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border-radius: var(--borrad30);
  background-color: var(--accent-color-1);
  display: block;
  z-index: 20;
  width: 195px;
  overflow: hidden;
  transition: max-height 0.3s;
}
.grampus-timer.hidden {
  opacity: 0 !important;
  pointer-events: none;
}
.grampus-timer .btn{
  color: var(--accent-color-1);
  background-color: var(--black);
}
.grampus-timer .btn:hover{
  background-color: var(--black-80);
  color: var(--accent-color-1);
  
}
/* ════════════════════════════════════════════════════════════════
   АКТИВНОЕ СОСТОЯНИЕ
   ════════════════════════════════════════════════════════════════ */
.grampus-timer .grampus-timer__active {
  overflow: hidden;
  transition: max-height .35s ease, opacity .1s linear;
  z-index: 99;
  opacity: 1;
  cursor: pointer;
  max-height: 165px;
}
.grampus-timer .grampus-timer__active * {
  cursor: pointer;
}
.grampus-timer .grampus-timer__active-caption {
  margin: 5px 0 0;
  font-size: 11px;
  opacity: 0;
  color: var(--black-60);
  max-height: 0;
  text-align: center;
  transform: translateY(8px);
  overflow: hidden;
  transition: opacity .3s ease, transform .3s ease, max-height .3s ease;
}
 .grampus-timer .grampus-timer__active-time span {
  display: inline-block;
  min-width: 8ch;
  text-align: center;
}
.grampus-timer .grampus-timer__active-percent {
  position: relative;
  width: 126px;
  height: 126px;
}
.grampus-timer .grampus-timer__active-percent-bar {
  display: none;
}
.grampus-timer .grampus-timer__active-bar {
  display: none;
  width: 100%;
}
.grampus-timer .grampus-timer__active-percent-circle {
  width: 100%;
  height: 100%;
  display: block;
  transform: rotate(-90deg);
}

.grampus-timer .grampus-timer__active-percent-bar-progress {
  background: var(--black, #000);
  height: 100%;
  width: 0%;
  border-radius: 0 999px 999px 0; /* слева плоско, справа скругление */
  transition: width .2s linear;
}



.grampus-timer .grampus-timer__active-percent-bg,
.grampus-timer .grampus-timer__active-percent-progress {
  fill: none;
  stroke-width: 6;
}
.grampus-timer .grampus-timer__active-percent-bg {
  stroke: var(--white, #fff);
}
.grampus-timer .grampus-timer__active-percent-progress {
  stroke: var(--black, #000);
  stroke-linecap: round;
  transition: stroke-dashoffset .2s linear;
}
.grampus-timer .grampus-timer__active-percent-label {
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  line-height: 1.1;
  color: var(--black);
  text-align: center;
  pointer-events: none;
}
.grampus-timer .grampus-timer__active-percent-label span {
  font-size: 18px;
  line-height: 1;
}
.grampus-timer .grampus-timer__active-container {
  display: flex;
  align-items: center;
  flex-direction: column;
  text-align: center;
  gap: 9px;
  font-weight: 500;
}
.grampus-timer .grampus-timer__active-container p{
  font-size: 12px;
  line-height: 1.2;
}
.grampus-timer .grampus-timer__active-container span {
  font-weight: 700;
  font-size: 18px;
  display: block;
  color: var(--black);
  transition: all .3s linear;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: 1px;
}
/* Hover-эффекты активного блока */
.grampus-timer .grampus-timer__active .btn {
  opacity: 0;
  max-height: 0;
  transform: translateY(8px);
  pointer-events: none;
  margin-top: 0;
  overflow: hidden;
  transition: all .3s ease;
  display: none;
}
@media (min-width: 768px)  {
  .grampus-timer:hover .grampus-timer__active {
    max-height: 280px;
  }
  .grampus-timer:hover .grampus-timer__active .btn {
    opacity: 1;
    max-height: none;
    transform: translateY(0);
    pointer-events: auto;
    margin-top: 6px;
    display: block;
  }
  .grampus-timer:hover .grampus-timer__active .grampus-timer__active-caption {
    opacity: 1;
    max-height: 48px;
    transform: translateY(0);
  } 
}
@media (max-width: 768px) {
  .grampus-timer br{
    display: none;
  }
  .grampus-timer .grampus-timer__active-container {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "time percent"
      "bar bar"
      "btn btn";
    align-items: center;
    gap: 10px 12px;
  }

  .grampus-timer .grampus-timer__active-time {
    grid-area: time;
    text-align: left;
  }
  .grampus-timer .grampus-timer__active-time span {
    min-width: 0;
    text-align: left;
  }

  .grampus-timer .grampus-timer__active-percent {
    grid-area: percent;
    width: auto;
    height: auto;
    justify-self: end;
  }
  .grampus-timer .grampus-timer__active-percent-circle {
    display: none;
  }
  .grampus-timer .grampus-timer__active-percent-label {
    position: static;
    display: block;
    text-align: right;
  }
  .grampus-timer .grampus-timer__active-bar {
    grid-area: bar;
    display: block;
  }
  .grampus-timer .grampus-timer__active-percent-bar {
    display: block;
    width: 100%;
    height: 12px;
    background: var(--white, #fff);
    border-radius: 999px;
    overflow: hidden;
  }


  /* раскрытие по тапу */
  .grampus-timer .grampus-timer__active .btn{
    grid-area: btn;
  }

  .grampus-timer .grampus-timer__active .btn,
  .grampus-timer .grampus-timer__active-caption {
    opacity: 0;
    max-height: 0;
    transform: translateY(8px);
    pointer-events: none;
    margin-top: 0;
    width: 100%;
  }
  .grampus-timer.is-expanded .grampus-timer__active .btn {
    opacity: 1;
    max-height: 46px;
    transform: translateY(0);
    pointer-events: auto;
    margin-top: 10px;
    display: block;
  }
  .grampus-timer.is-expanded .grampus-timer__active-caption {
    opacity: 1;
    max-height: 80px;
    transform: translateY(0);
    margin-top: 6px;
  }
  
}
/* ════════════════════════════════════════════════════════════════
   НЕАКТИВНОЕ СОСТОЯНИЕ
   ════════════════════════════════════════════════════════════════ */
.grampus-timer .grampus-timer__noactive {
  overflow: hidden;
  transition: all .3s linear;
  z-index: 99;
  opacity: 1;
  cursor: pointer;
}
.grampus-timer .grampus-timer__noactive * {
  cursor: pointer;
}
.grampus-timer .grampus-timer__noactive-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 141px;
  transition: all .3s linear;
  gap: 10px;
}
.grampus-timer .grampus-timer__noactive svg, .grampus-timer__final-wrap svg {
  width: 29px;
  height: 29px;
} 
.grampus-timer .grampus-timer__noactive-text, .grampus-timer__final-text {
  font-weight: 500;
  font-size: 12px;
  line-height: normal;
  text-align: center;
} 
/* Процент со зачёркиванием */
.grampus-timer__final-persent, .grampus-timer .grampus-timer__noactive-persent{
  font-weight: 700;
  font-size: 18px;
  line-height: normal;
  text-align: center;
}
.grampus-timer .grampus-timer__noactive-persent {  
  text-decoration: line-through;  
}
/* ════════════════════════════════════════════════════════════════
   ФИНАЛЬНОЕ СОСТОЯНИЕ
   ════════════════════════════════════════════════════════════════ */
.grampus-timer .grampus-timer__final {
  z-index: 99;
  opacity: 1;
  cursor: pointer;
}
.grampus-timer .grampus-timer__final * {
  cursor: pointer;
} 
.grampus-timer .grampus-timer__final-wrap {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
}
.grampus-timer .grampus-timer__final .grampus-timer__final-btn {
  opacity: 0;
  max-height: 0;
  transform: translateY(8px);
  pointer-events: none;
  margin-top: 0;
  overflow: hidden;
  transition: all .3s ease;
}
.grampus-timer:hover .grampus-timer__final .grampus-timer__final-btn {
  opacity: 1;
  max-height: none;
  transform: translateY(0);
  pointer-events: auto;
  margin-top: 6px;
}

 @media(max-width:767px){
  .grampus-timer{
    left: 16px;
    bottom: 16px;
    width: calc(100% - 32px);
  }
  .grampus-timer:before{
    content: "";
    position: absolute;
    left: 50%;
    top: 8px;
    width: 34px;
    height: 2px;
    border-radius: 20px;
    background-color: var(--accent-color-330);
    transform: translate(-50%, -50%);
  }
  .grampus-timer .grampus-timer__active-container{
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: wrap;
  }
  .grampus-timer .grampus-timer__active .btn{
    width: 100%!important;
  }
  .grampus-timer .grampus-timer__active-caption br{
    display: none;
  }
  .grampus-timer .grampus-timer__final-wrap{
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
  }
  .grampus-timer .grampus-timer__final .grampus-timer__final-btn {
    opacity: 1;
    max-height: none;
    transform: translateY(0px);
    pointer-events: none;
    margin-top: 0 !important;
    overflow: hidden;
    transition: all .3s ease;
    margin-left: auto;
  }
  .grampus-timer .grampus-timer__noactive-wrap{
    flex-direction: row;
    height: auto;
    justify-content: space-between;
  }

}
 @media(max-width:400px){
  .grampus-timer .grampus-timer__final-wrap{
    justify-content: center;
  }
  .grampus-timer .grampus-timer__final .grampus-timer__final-btn{
    margin-left: 0;
    width: 100%;
  }
  .grampus-timer .grampus-timer__final .grampus-timer__final-btn .btn{
    width: 100%;
  }
}