/* ============================================
   PHILOSOPHER TOOLTIPS
   ============================================ */

/* Linked philosopher names */
.philosopher-link {
    color: #2d5016;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-decoration-thickness: 1px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.philosopher-link:hover {
    color: #3a6b1c;
    text-decoration-style: solid;
    text-decoration-thickness: 2px;
}

/* Tooltip container */
.philosopher-tooltip {
    position: fixed;
    z-index: 10000;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 320px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    border: 2px solid #2d5016;
}

.philosopher-tooltip.active {
    opacity: 1;
    pointer-events: auto;
}

/* Tooltip header */
.philosopher-tooltip-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid #e9ecef;
}

.philosopher-tooltip-portrait {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #2d5016;
}

.philosopher-tooltip-portrait-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2d5016, #3a6b1c);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    font-weight: bold;
}

.philosopher-tooltip-info {
    flex: 1;
    min-width: 0;
}

.philosopher-tooltip-name {
    font-size: 16px;
    font-weight: 600;
    color: #212529;
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.philosopher-tooltip-dates {
    font-size: 13px;
    color: #6c757d;
    margin: 0;
}

/* Tooltip content */
.philosopher-tooltip-content {
    padding: 16px;
}

.philosopher-tooltip-nutshell {
    font-size: 14px;
    line-height: 1.6;
    color: #495057;
    margin: 0;
}

/* Tooltip footer */
.philosopher-tooltip-footer {
    padding: 12px 16px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    border-radius: 0 0 6px 6px;
}

.philosopher-tooltip-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #2d5016;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.philosopher-tooltip-link:hover {
    background: #3a6b1c;
    transform: translateX(2px);
    color: white;
}

.philosopher-tooltip-arrow {
    font-size: 16px;
    transition: transform 0.2s ease;
}

.philosopher-tooltip-link:hover .philosopher-tooltip-arrow {
    transform: translateX(4px);
}

/* Loading state */
.philosopher-tooltip.loading .philosopher-tooltip-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

.philosopher-tooltip-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e9ecef;
    border-top-color: #2d5016;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .philosopher-tooltip {
        width: 90vw;
        max-width: 320px;
    }
}