/* Custom themes for Tippy.js tooltips */

.tippy-box[data-theme~='light-border'] {
  background-color: #fff;
  color: #333;
  border: 1px solid #ccc;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tippy-box[data-theme~='light-border'][data-placement^='top'] > .tippy-arrow::before {
  border-top-color: #ccc;
}
.tippy-box[data-theme~='light-border'][data-placement^='bottom'] > .tippy-arrow::before {
  border-bottom-color: #ccc;
}
.tippy-box[data-theme~='light-border'][data-placement^='left'] > .tippy-arrow::before {
  border-left-color: #ccc;
}
.tippy-box[data-theme~='light-border'][data-placement^='right'] > .tippy-arrow::before {
  border-right-color: #ccc;
}

/* Substance Tooltip Styles */
.substance-tooltip-content {
    padding: 8px;
    text-align: center;
}

.substance-tooltip-image {
    max-width: 200px;
    max-height: 200px;
    display: block;
    margin: 0 auto;
}

.substance-tooltip-info {
    padding-top: 4px;
}

.substance-tooltip-image + .substance-tooltip-info {
    margin-top: 8px;
    border-top: 1px solid #eee;
}

.substance-tooltip-name {
    font-weight: bold;
    font-size: 0.9rem;
    color: #000;
}

.substance-tooltip-iupac {
    font-style: italic;
    font-size: 0.85rem;
    color: #555;
}

.substance-tooltip-loading {
    padding: 20px;
    font-style: italic;
    color: #666;
}

/* Standard Tooltip Styles (Bootstrap replacement) */
.tippy-box[data-theme~='bootstrap-like'] {
    background-color: rgba(0, 0, 0, 0.9);
    color: #fff;
    border-radius: 4px;
    font-size: 0.875rem;
    padding: 2px 4px;
    text-align: justify;
    text-align-last: left;
    max-width: 360px;
    line-height: 1.4;
    white-space: normal;
    hyphens: auto;
    overflow-wrap: break-word;
}

/* Justified theme for explanation tooltips */
.tippy-box[data-theme~='justified'] {
    text-align: justify;
    text-align-last: left;
    max-width: 360px;
    line-height: 1.4;
    white-space: normal;
    hyphens: auto;
    overflow-wrap: break-word;
    min-width: 200px;
    padding: 5px 10px;
}
