/* Tooltip System Styles */

/* The tooltip popup */
.tooltip-popup {
    background: var(--bg-tertiary, #2a2a2a);
    color: var(--text-primary, #ffffff);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.4;
    max-width: 280px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color, #404040);
    backdrop-filter: blur(10px);
}

/* Arrow pointing down (tooltip above) */
.tooltip-popup::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    background: var(--bg-tertiary, #2a2a2a);
    border-right: 1px solid var(--border-color, #404040);
    border-bottom: 1px solid var(--border-color, #404040);
    transform: translateX(-50%) rotate(45deg);
}

/* Arrow pointing up (tooltip below) */
.tooltip-popup.tooltip-below::after {
    bottom: auto;
    top: -5px;
    border-right: 1px solid var(--border-color, #404040);
    border-bottom: 1px solid var(--border-color, #404040);
    border-top: none;
    border-left: none;
    transform: translateX(-50%) rotate(-135deg);
}

/* Tooltip Icon Styles - used across all pages */
.tooltip-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    font-size: 13px;
    color: #6b7280;
    cursor: help;
    margin-left: 6px;
    vertical-align: middle;
    transition: color 0.2s ease;
    font-family: system-ui, -apple-system, sans-serif;
}

.tooltip-icon:hover {
    color: var(--primary-color, #3498db);
}

/* Style for labels with tooltips */
label .tooltip-icon {
    float: right;
    margin-right: 0;
    margin-left: 6px;
}

/* Help indicator - subtle info icon */
.help-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 6px;
    border-radius: 50%;
    background: var(--bg-secondary, #1a1a1a);
    border: 1px solid var(--border-color, #404040);
    color: var(--text-tertiary, #888);
    font-size: 10px;
    font-weight: bold;
    cursor: default;
    transition: all 0.2s ease;
    position: relative;
    vertical-align: middle;
}

.help-indicator:hover {
    background: var(--primary-color, #007bff);
    border-color: var(--primary-color, #007bff);
    color: white;
    transform: scale(1.1);
}

/* Alternative style - just an "i" */
.help-indicator.info-style::before {
    content: 'i';
    font-style: italic;
    font-family: Georgia, serif;
}

/* Alternative style - question mark */
.help-indicator.question-style::before {
    content: '?';
}

/* Make labels with help indicators flex containers */
label.has-tooltip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Dark theme adjustments */
.dark-theme .tooltip-popup {
    background: #333;
    border-color: #555;
    color: #f0f0f0;
}

.dark-theme .help-indicator {
    background: #2a2a2a;
    border-color: #444;
    color: #999;
}

.dark-theme .help-indicator:hover {
    background: var(--primary-color, #4a9eff);
    border-color: var(--primary-color, #4a9eff);
}