/* Avoid exceeding the boundaries */
* {
  box-sizing: border-box;
}
.tip {
  display: inline;
  position: relative;
}
/* ==========================================================================
   Increase pointer-events successful area
   ========================================================================== */
.tip::after {
  content: '';
  cursor: inherit;
  min-height: calc(100% + 30px);
  min-width: calc(100% + 30px);
  pointer-events: none;
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
}
.tip:hover::after, .tip:focus::after { pointer-events: auto; }

/* ==========================================================================
   Common attributes for all tip-block
   ========================================================================== */
.tip .tip-bottom {
  display: inline-block;
  display: inline;
  background-color: #f7f7f7;
  border: 1px solid #999;
  border-radius: 6px;
  height: auto;
  max-width: 400px;
  max-width: fit-content;
  padding: 5px 8px;
  pointer-events: none;
  position: absolute;
  text-align: left;
  transition: opacity 0.5s, transform 0.5s;
  opacity: 0;  /* comment only when testing */
  z-index: 999999;
}
/* ==========================================================================
   Common attributes for all tip-arrow
   ========================================================================== */
.tip .tip-arrow::after {
  border: 12px solid transparent;
  border: 13px solid transparent;
  content: '';
  position: absolute;
  z-index: 999999;
}
.tip .tip-arrow::before {
  border: 16px solid transparent;
  content: '';
  position: absolute;
  z-index: 999999;
}
.tip .tip-left.tip-arrow::after,
.tip .tip-right.tip-arrow::after {
  border: 8px solid transparent;
  border: 10px solid red;
}
.tip .tip-left.tip-arrow::before,
.tip .tip-right.tip-arrow::before {
  border: 12px solid transparent;
  border: 10px solid red;
}
/* ==========================================================================
   Bottom tip-block
   ========================================================================== */
.tip .tip-bottom {
  margin: 10px -400px 0 0;
  margin: 0 -400px 0 0;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, 0.7));
}
.tip .tip-bottom.tip-arrow::after {
  border-bottom-color: #f7f7f7;
  bottom: 100%;
  left: 50%;
  margin-left: -12px;
}
.tip .tip-bottom.tip-arrow::before {
  border-bottom-color: #367abd;
  bottom: 100%;
  left: 50%;
  margin-left: -16px;
}
/* ==========================================================================
   .tip hover & focus events
   ========================================================================== */
.tip:hover .tip-bottom,
.tip:focus .tip-bottom {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 6px);
}
/* ==========================================================================
   Tip block max-width definition
   ========================================================================== */
.tip .tip-narrow { max-width: 260px; }
.tip .tip-wide { max-width: 860px; }

/*  links within tooltips */
.tip-link       {
    font:           12px Arial , helvetica, verdana, sans-serif;
    color:          #000;
    text-decoration: none;
}
.tip-link:hover { color: #e31837; text-decoration: none; }

/* ================================================================ */

.tip table, th, td {
    border: 0 !important;
    background-color: #f7f7f7;
}
.tip table {
    border-spacing: 0px;
}
.tip td  {
    padding: 0;
    vertical-align: top;
    white-space: nowrap;
    text-align: left;
}
.tip th {
/*  margin: 100px; ??? */
  padding: 0;
}
.tip th.th-male,
.tip th.th-female {
    font-weight: bold;
    font-size: 12px;
    color: #f7f7f7;
    text-align: center;
    padding: 3px 10px;
}
.tip th.th-male  {
  background-color: var(--v-blue);
}
.tip th.th-female {
  background-color: var(--v-red);
}
.tip a {
  vertical-align: top;
  white-space: nowrap;
  text-align: left;
}
/* ------------------------------------------------------------- */
.tv .tip-link {
  color: #000;
  text-decoration: none;
  margin: -5px;
}
.tv .tip-link:hover { color: #e31837; text-decoration: none; }
.tv table {
  border-spacing: 0;
  font-size: 12px;
}
.tv .tip .td-top  {
  text-align: center;
  padding: 10px;
}
.tv td  {
  padding: 2px 5px;

  line-height: 1.2rem;
  margin: 5px -15px -15px -10px;
  vertical-align: top;
  white-space: nowrap;
}
.tv .tip a {
  vertical-align: top;
  white-space: nowrap;
  text-align: left;
  margin: 0;
  padding: 0;
}
.tip a:hover { color: #e31837; text-decoration: none; }
