/* /public/assets/styles/rank_tracker.css */

.rank-tracker-page .hero__inner{
  padding-bottom: 52px;
}

.rtk-hero{
  min-height: calc(100vh - 120px);
}

.rtk-hero__inner{
  display:grid;
  gap: 28px;
}

.rtk-hero__copy{
  max-width: 860px;
  margin: 0 auto;
}

.rtk-hero__eyebrow{
  display:inline-flex;
  align-items:center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(34,108,224,.08);
  color: var(--blue-700);
  font-size: .88rem;
  font-weight: 700;
}

.rtk-search{
  max-width: 720px;
}

.rtk-textarea{
  min-height: 116px;
  padding: 16px 18px;
  resize: vertical;
}

.rtk-search.is-picked #rtk-video{
  background: #fff !important;
  color: transparent;
  caret-color: transparent;
  text-shadow: none;
}

.rtk-search.is-picked #rtk-video::placeholder{
  color: transparent;
}

.rtk-search.is-picked .rc-row--video{
  min-height: 86px;
}

.rtk-search.is-picked #rtk-video{
  height: 86px;
}

.rtk-controls{
  display:grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: 10px;
}

.rtk-submit.is-busy{
  opacity: .72;
  pointer-events:none;
}

.rtk-banner{
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,.82);
  box-shadow: var(--shadow-sm);
}

.rtk-banner--error{
  background: rgba(255,232,232,.94);
}

.rtk-banner__title{
  color: var(--yt-red-700);
  font-size: .98rem;
  font-weight: 800;
}

.rtk-banner__desc{
  margin-top: 4px;
  color: var(--muted);
  font-size: .94rem;
}

.rtk-library{
  width: min(100%, 1080px);
  margin: 0 auto;
  text-align: left;
}

.rtk-library__head{
  display:flex;
  justify-content:space-between;
  align-items:end;
  gap: 16px;
  margin-bottom: 18px;
}

.rtk-library__title{
  margin: 0;
  font-size: clamp(1.5rem, 1.14rem + 1vw, 2rem);
  font-weight: 800;
}

.rtk-library__subtitle{
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.rtk-emptyCard{
  display:grid;
  justify-items:start;
  gap: 12px;
  padding: 24px;
  border-radius: 16px;
  background: #fff;
}

.rtk-emptyCard__title{
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
}

.rtk-emptyCard__text{
  margin: 0;
  color: var(--muted);
  font-size: .98rem;
  line-height: 1.6;
}

.rtk-tracks{
  min-height: 24px;
}

.rtk-card{
  position: relative;
  padding-bottom: 16px;
  transition: opacity .22s ease, transform .22s ease;
}

.rtk-card.is-removing{
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

.rtk-card .rc-card__top{
  padding-right: 44px;
}

.rtk-deleteBtn{
  position: absolute;
  top: 14px;
  right: 14px;
  width:36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  opacity: .66;
  cursor: pointer;
  transition: background .16s ease, opacity .16s ease, transform .16s ease;
}

.rtk-deleteBtn:hover{
  background: rgba(15,19,32,.06);
  opacity: 1;
}

.rtk-deleteBtn:active{
  transform: translateY(1px);
}

.rtk-deleteBtn img{
  display: block;
  width: 32px;
  height: 32px;
}

.rtk-section{
  margin-top: 28px;
}

.rtk-section__header{
  width: 100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.rtk-section__title{
  font-size: 1rem;
  font-weight: 600;
}

.rtk-section__chevron{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color: var(--muted-2);
  transition: transform .22s ease, color .16s ease;
}

.rtk-section__header:hover .rtk-section__chevron{
  color: var(--text);
}

.rtk-section.is-collapsed .rtk-section__chevron{
  transform: rotate(-90deg);
}

.rtk-section__viewport{
  overflow:hidden;
  height:auto;
  opacity: 1;
  transition: height .28s cubic-bezier(.22,1,.36,1), opacity .2s ease;
}

.rtk-section.is-collapsed .rtk-section__viewport{
  opacity: 0;
}

.rtk-section__content{
  padding-top: 12px;
}

.rtk-chartShell{
  padding: 14px 14px 10px;
  border-radius: var(--r-sm);
  background: var(--bg);
}

.rtk-chartShell__body{
  min-height: 320px;
}

.rtk-table{
  margin-top: 0;
  border-radius: var(--r-sm);
  background: var(--bg);
  
}

.rtk-table thead th:first-child,
.rtk-table tbody td:first-child{
  width: 48px;
}

.rtk-colToggle{
  width: 32px;
}

.rtk-colCurrent,
.rtk-colChange{
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.rtk-colAction{
  width: 88px;
  text-align: center;
}

.rtk-toggle{
  position: relative;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  width: 32px;
  height: 24px;
  padding-left: 4px;
  box-sizing: border-box;
  cursor:pointer;
}

.rtk-toggle__input{
  position:absolute;
  inset: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  opacity:0;
  cursor:pointer;
}

.rtk-toggle__box{
  position: relative;
  width: 24px;
  height: 24px;
  display:block;
  border-radius: var(--r-sm);
  border: 1.5px solid rgba(15,19,32,.16);
  background: #fff;
  box-shadow: inset 0 0 0 0 var(--rtk-keyword-color, var(--blue-500));
  transition: box-shadow .16s ease, border-color .16s ease, transform .16s ease, background .16s ease, opacity .16s ease;
}

.rtk-toggle.is-checked .rtk-toggle__box,
.rtk-toggle__input:checked + .rtk-toggle__box,
.rtk-toggle__box.is-checked{
  border-color: transparent;
  box-shadow: inset 0 0 0 12px var(--rtk-keyword-color, var(--blue-500));
  background: var(--rtk-keyword-color, var(--blue-500));
}

.rtk-toggle.is-checked .rtk-toggle__box,
.rtk-toggle__input:checked + .rtk-toggle__box,
.rtk-toggle:hover .rtk-toggle__box{
  transform: translateY(-1px);
}

.rtk-toggle.is-unchecked .rtk-toggle__box{
  border-color: rgba(15,19,32,.18);
  background: #fff;
  box-shadow: inset 0 0 0 0 var(--rtk-keyword-color, var(--blue-500));
}

.rtk-toggle:focus-within .rtk-toggle__box{
  box-shadow: 0 0 0 4px rgba(34,108,224,.12), inset 0 0 0 0 var(--rtk-keyword-color, var(--blue-500));
}

.rtk-toggle.is-checked:focus-within .rtk-toggle__box,
.rtk-toggle__input:checked:focus-visible + .rtk-toggle__box{
  box-shadow: 0 0 0 4px rgba(34,108,224,.12), inset 0 0 0 12px var(--rtk-keyword-color, var(--blue-500));
}

.rtk-keywordText{
  color: var(--text);
  font-weight: 500;
}

.rtk-change{
  display:inline-flex;
  align-items:center;
  justify-content: center;
  min-width: 42px;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 700;
}

.rtk-change--up{
  color: var(--green-700);
  background: rgba(16,185,129,.12);
}

.rtk-change--down{
  color: var(--yt-red-700);
  background: rgba(227,0,0,.10);
}

.rtk-change--muted{
  color: var(--muted-2);
  background: rgba(15,19,32,.06);
}

.rtk-linkBtn{
  border: 0;
  background: transparent;
  color: var(--muted-2);
  font: inherit;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
}

.rtk-linkBtn:hover{
  color: var(--text);
}

.rtk-rowDelete{
  width: 36px;
  height: 36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  opacity: .66;
  cursor: pointer;
  transition: background .16s ease, opacity .16s ease, transform .16s ease;
}

.rtk-rowDelete:hover{
  background: rgba(15,19,32,.06);
  opacity: 1;
}

.rtk-rowDelete:active{
  transform: translateY(1px);
}

.rtk-rowDelete img{
  width: 26px;
  height: 26px;
  display:block;
}

.rtk-addRow td{
  padding: 14px 0 0;
  border-top: 1px solid rgba(15,19,32,.08);
}

.rtk-addRow__form{
  padding: 0px 10px 0px 10px;
  display:grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 10px;
  align-items:center;
}

.rtk-addRow__label{
  color: var(--muted-2);
  font-size: .92rem;
  font-weight: 600;
}

.rtk-addRow__input{
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: box-shadow .14s ease, background .14s ease;
}

.rtk-addRow__input:focus{
  background: #fff;
  box-shadow: 0 0 0 5px rgba(34,108,224,.16);
}

.rtk-addRow__button{
  min-width: 92px;
  height: 46px;
}

.rtk-disclaimer{
  width: min(100%, 960px);
  margin: 24px auto 0;
}

.rtk-card--skeleton{
  pointer-events:none;
}

.rtk-sk{
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(15,19,32,.05), rgba(15,19,32,.10), rgba(15,19,32,.05));
  background-size: 220% 100%;
  animation: rtkShimmer 1.05s ease-in-out infinite;
}

.rtk-sk--chart{
  width: 100%;
  height: 320px;
}

.rtk-sk--row{
  width: 100%;
  height: 44px;
  margin-top: 10px;
}

@keyframes rtkShimmer{
  0%{ background-position: 200% 0; }
  100%{ background-position: -20% 0; }
}

.rhc{
  display:grid;
  gap: 10px;
}

.rhc__toolbar{
  display:grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items:start;
  gap: 12px;
}

.rhc__toolbarSide{
  display:grid;
  gap: 10px;
}

.rhc__ranges{
  display:flex;
  flex-wrap:wrap;
  gap: 8px;
}

.rhc__range{
  min-height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(15,19,32,.06);
  color: var(--muted);
  font: inherit;
  font-size: .76rem;
  font-weight: 600;
  cursor:pointer;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}

.rhc__range:hover{
  transform: translateY(-1px);
}

.rhc__range.is-active{
  background: rgb(255 0 0 / 21%);
  color: var(--yt-red-500);
}

.rhc__custom{
  display:flex;
  flex-wrap:wrap;
  gap: 8px;
  align-items:end;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: max-height .24s cubic-bezier(.22,1,.36,1), opacity .18s ease, transform .18s ease;
}

.rhc__custom.is-open{
  max-height: 180px;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.rhc__dateField{
  display:grid;
  gap: 4px;
}

.rhc__dateField span{
  color: var(--muted-2);
  font-size: .74rem;
  font-weight: 600;
}

.rhc__dateField input{
  min-width: 142px;
  height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--r-sm);
  font-size: 0.8rem;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.rhc__customBtn{
  height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--r-sm);
  background: rgb(255 0 0 / 21%);
  color: var(--yt-red-500);
  font: inherit;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
}

.rhc__customBtn--ghost{
  background: rgba(15,19,32,.06);
  color: var(--muted);
}

.rhc__meta{
  display:grid;
  gap: 4px;
  justify-items:end;
  text-align:right;
}

.rhc__metaPrimary{
  color: var(--muted-2);
  font-size: .84rem;
  font-weight: 600;
}

.rhc__metaSecondary{
  color: var(--muted-2);
  font-size: .8rem;
  font-weight: 600;
}

.rhc__frame{
  position:relative;
  overflow:hidden;
  min-height: 288px;
}

.rhc__canvas{
  display:block;
  width:100%;
}

.rhc__tooltip{
  position:absolute;
  min-width: 186px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15,19,32,.96);
  color: #fff;
  box-shadow: var(--shadow-sm);
  pointer-events:none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .16s ease, transform .16s ease;
}

.rhc__tooltip:not([hidden]){
  opacity: 1;
  transform: translateY(0);
}

.rhc__tooltipDate{
  color: rgba(255,255,255,.72);
  font-size: .75rem;
  font-weight: 600;
}

.rhc__tooltipKeyword{
  margin-top: 6px;
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.35;
}

.rhc__tooltipValue{
  margin-top: 8px;
  display:inline-flex;
  align-items:center;
  gap: 8px;
  font-size: .84rem;
  font-weight: 700;
}

.rhc__tooltipDot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--rhc-color, var(--blue-500));
}

.rhc__empty{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  text-align:center;
  padding: 24px;
  pointer-events: none;
}

.rhc__empty[hidden]{
  display:none !important;
}

.rhc__emptyTitle{
  color: var(--text);
  font-size: .96rem;
  font-weight: 700;
}

.rhc__emptyText{
  margin-top: 6px;
  color: var(--muted-2);
  font-size: .84rem;
  line-height: 1.5;
  max-width: 320px;
}

@media (max-width: 960px){
  .rhc__toolbar{
    grid-template-columns: 1fr;
  }

  .rhc__meta{
    justify-items:start;
    text-align:left;
  }
}

@media (max-width: 720px){
  .rtk-hero__copy{
    margin: 0;
  }

  .rtk-controls{
    grid-template-columns: 1fr;
  }

  .rtk-addRow__form{
    grid-template-columns: 1fr;
    align-items:stretch;
  }

  .rtk-addRow__label{
    margin-bottom: -2px;
  }

  .rtk-table thead{
    display:none;
  }

  .rtk-table,
  .rtk-table tbody,
  .rtk-table tr,
  .rtk-table td{
    display:block;
    width:100%;
  }

  .rtk-table tbody td{
    padding: 0px 0;
    border-top: 0;
  }

  .rtk-keywordRow{
    position:relative;
    padding: 12px 0;
    border-top: 1px solid rgba(15,19,32,.08);
  }

  .rtk-keywordRow .rtk-colToggle,
  .rtk-keywordRow .rtk-colKeyword{
    display:inline-block;
    vertical-align:middle;
  }

  .rtk-colToggle{
    width: 32px;
  }

  .rtk-colCurrent,
  .rtk-colChange,
  .rtk-colAction{
    padding-left: 28px !important;
  }

  .rtk-colAction{
    text-align:left;
  }

  .rhc__dateField{
    width: 100%;
  }

  .rhc__dateField input{
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 560px){
  .rtk-search{
    max-width: 100%;
  }

  .rtk-search.is-picked .rc-row--video{
    min-height: 78px;
  }

  .rtk-search.is-picked #rtk-video{
    height: 78px;
  }

  .rtk-chartShell{
    padding: 12px 10px 8px;
  }

  .rhc__tooltip{
    min-width: 164px;
  }
}
