/* Tooltips */

.tool {
    position: relative;
}

.tool::before,
.tool::after {
    left: 50%;
    opacity: 0;
    position: absolute;
    z-index: -100;
}

.tool:hover::before,
.tool:focus::before,
.tool:hover::after,
.tool:focus::after {
    opacity: 1;
    transform: scale(1) translateY(0);
    z-index: 100; 
}

.tool::before {
    border-style: solid;
    border-width: 1em 0.75em 0 0.75em;
    border-color: #187dfa transparent transparent transparent;
    bottom: 100%;
    content: "";
    margin-left: -0.5em;
    transition: all .65s cubic-bezier(.84,-0.18,.31,1.26), opacity .65s .5s;
    transform:  scale(.6) translateY(-90%);
} 

.tool:hover::before,
.tool:focus::before {
    transition: all .65s cubic-bezier(.84,-0.18,.31,1.26) .2s;
}

.tool::after {
    background: #187dfa;
    border-radius: .25em;
    bottom: 180%;
    color: #EDEFF0;
    content: attr(data-tip);
    margin-left: -8.75em;
    padding: 1em;
    transition: all .65s cubic-bezier(.84,-0.18,.31,1.26) .2s;
    transform:  scale(.6) translateY(50%);  
    width: 17.5em;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
}

.tool:hover::after,
.tool:focus::after  {
    transition: all .65s cubic-bezier(.84,-0.18,.31,1.26);
}

@media (max-width: 820px) {
  .tool::after { 
        font-size: 14px;
        margin-left: -6em;
        width: 170px; 
  }
}

/* Hints */

.hint {
  position: relative;
}

.hint .hint_text {
  visibility: hidden;
  width: 105px;
  background-color: #177efa;
  color: #fff;
  text-align: center;
  border-radius: .25em;
  padding: 6px;
  position: absolute;
  z-index: 1;
  top: 100%;
  left: 50%;
  margin-left: -45px;
  font-size: 0.8em;
  font-weight: bold;
}

.hint:hover .hint_text {
  visibility: visible;
}

.hint_wider .hint_text_wider {
  width: 220px;
}

/* Simple tooltip - appears below, no animation */
.simple-tooltip {
  position: relative;
  border-bottom: 1px dotted #666;
}

.simple-tooltip::after {
  content: attr(data-tip);
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 8px;
  padding: 8px 12px;
  background: #333;
  color: #fff;
  font-size: 15px;
  font-weight: normal;
  line-height: 1.4;
  border-radius: 4px;
  white-space: normal;
  width: max-content;
  max-width: 300px;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.simple-tooltip:hover::after {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 600px) {
  .simple-tooltip::after {
    max-width: 200px;
    left: 0;
    transform: none;
  }
}