/**
 * RSD Tooltip Plugin Styles
 * Frontend CSS for tooltip functionality with red glass effect
 */

/* Main tooltip wrapper - General appearance for indices */
.rsd-tooltip-wrapper {
    position: relative;
    display: inline-block;
    cursor: help;
    color: #E1682B; /* Red color for numbers */
    font-weight: bold;
    font-size: 0.9em;
}

/* Tooltip text element - Style for number links */
.rsd-tooltip-text {
    position: relative;
    display: inline-block;
    color: #E1682B !important; /* Red color */
    text-decoration: none !important; /* Remove underline */
    font-weight: bold;
    transition: all 0.3s ease;
}

.rsd-tooltip-text:hover {
    color: #E1682B !important; /* Dark red on hover */
}

/* Tooltip content container - Glass effect red tooltip */
.rsd-tooltip-content {
    visibility: hidden;
    opacity: 0;
    width: max-content;
    max-width: 280px;
    background: rgba(225, 104, 43, 0.95); /* Glass red background */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff; /* White text */
    text-align: right;
    border-radius: 10px;
    padding: 12px 15px;
    position: absolute;
    z-index: 999;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 13px;
    line-height: 1.6;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    text-shadow: none; /* No text shadow */
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: translateY(10px) scale(0.9);
    pointer-events: none;
}

/* Tooltip arrow */
.rsd-tooltip-content::after {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

/* Top position tooltip */
.rsd-tooltip-top {
    bottom: 125%; /* Position above text */
    right: 0;
    transform: translateY(10px) scale(0.9);
}

.rsd-tooltip-top::after {
    top: 100%;
    right: 12px;
    border-width: 6px;
    border-color: rgba(225, 104, 43, 0.95) transparent transparent transparent;
}

.rsd-tooltip-sub {
    bottom: 0.30em;
    padding: 2px;
    font-size: 95%;
}

/* Bottom position tooltip */
.rsd-tooltip-bottom {
    top: 125%; /* Position below text */
    right: 0;
    transform: translateY(-10px) scale(0.9);
}

.rsd-tooltip-bottom::after {
    bottom: 100%;
    right: 12px;
    border-width: 6px;
    border-color: transparent transparent rgba(225, 104, 43, 0.95) transparent;
}

/* Left position tooltip */
.rsd-tooltip-left {
    right: 100%;
    top: 50%;
    transform: translateY(-50%) translateX(10px) scale(0.9);
    margin-right: 8px;
}

.rsd-tooltip-left::after {
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px;
    border-color: transparent transparent transparent rgba(197, 48, 48, 0.95);
}

/* Right position tooltip */
.rsd-tooltip-right {
    left: 100%;
    top: 50%;
    transform: translateY(-50%) translateX(-10px) scale(0.9);
    margin-left: 8px;
}

.rsd-tooltip-right::after {
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px;
    border-color: transparent rgba(197, 48, 48, 0.95) transparent transparent;
}

/* Beautiful animation on hover */
.rsd-tooltip-wrapper:hover .rsd-tooltip-content {
    visibility: visible;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.rsd-tooltip-wrapper:hover .rsd-tooltip-top {
    transform: translateY(0) scale(1);
}

.rsd-tooltip-wrapper:hover .rsd-tooltip-bottom {
    transform: translateY(0) scale(1);
}

.rsd-tooltip-wrapper:hover .rsd-tooltip-left {
    transform: translateY(-50%) translateX(0) scale(1);
}

.rsd-tooltip-wrapper:hover .rsd-tooltip-right {
    transform: translateY(-50%) translateX(0) scale(1);
}

/* Link styling within tooltip */
.rsd-tooltip-link {
    color: #E1682B !important; /* Red color */
    text-decoration: none !important; /* Remove underline */
    font-weight: bold;
}

.rsd-tooltip-link:hover {
    color: #E1682B !important; /* Dark red on hover */
    text-decoration: none;
}

/* Style for links inside tooltip */
.rsd-tooltip-content a {
    color: #fff !important;
    text-decoration: none !important;
    display: inline-block;
    margin-top: 8px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 12px;
}

.rsd-tooltip-content a:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* References section */
.rsd-references {
    margin-top: 40px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-right: 4px solid #e63946;
}

.rsd-references h3 {
    margin-top: 0;
    color: #2d3748;
}

.rsd-references ol {
    padding-right: 20px;
}

.rsd-references li {
    margin-bottom: 10px;
    padding: 8px;
    background: white;
    border-radius: 5px;
    transition: all 0.2s ease;
}

.rsd-references li:hover {
    background: #fff5f5;
}

.rsd-references a {
    color: #2d3748;
    text-decoration: none;
}

.rsd-references a:hover {
    color: #E1682B;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .rsd-tooltip-content {
        max-width: 200px;
        font-size: 12px;
        padding: 10px 12px;
    }
    
    .rsd-tooltip-content::after {
        border-width: 5px;
    }
    
    .rsd-tooltip-top::after {
        border-width: 5px;
        border-color: rgba(225, 104, 43, 0.95) transparent transparent transparent;
    }
    
    .rsd-tooltip-bottom::after {
        border-width: 5px;
        border-color: transparent transparent rgba(225, 104, 43, 0.95) transparent;
    }
    
    .rsd-tooltip-left::after {
        border-width: 5px;
        border-color: transparent transparent transparent rgba(225, 104, 43, 0.95);
    }
    
    .rsd-tooltip-right::after {
        border-width: 5px;
        border-color: transparent rgba(225, 104, 43, 0.95) transparent transparent;
    }
    
    .rsd-references {
        margin: 20px;
        padding: 15px;
    }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .rsd-tooltip-text {
        color: #ff6b7a !important;
    }
    
    .rsd-tooltip-text:hover {
        color: #ff8a94 !important;
    }
    
    .rsd-tooltip-link {
        color: #ff6b7a !important;
    }
    
    .rsd-tooltip-link:hover {
        color: #ff8a94 !important;
    }
    
    .rsd-references {
        background: #2d3748;
        border-right-color: #ff6b7a;
    }
    
    .rsd-references h3 {
        color: #f7fafc;
    }
    
    .rsd-references li {
        background: #4a5568;
    }
    
    .rsd-references li:hover {
        background: #553c4e;
    }
    
    .rsd-references a {
        color: #e2e8f0;
    }
    
    .rsd-references a:hover {
        color: #ff6b7a;
    }
}