/**
 * LiteTheme Tooltip System - Based on working standalone test
 */

/* Tooltip keyword styling */
.litetheme-tooltip-keyword {
    color: inherit;
    border-bottom: 1px dotted #0073aa;
    cursor: help;
    position: relative;
    text-decoration: none;
}

.litetheme-tooltip-keyword:hover {
    background-color: rgba(0, 115, 170, 0.1);
}

/* Tooltip container */
#litetheme-tooltip-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    pointer-events: none;
}

.litetheme-tooltip {
    position: fixed;
    z-index: 1000000;
    pointer-events: none;
}

/* Main tooltip box */
.tooltip-box {
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    max-width: 500px;
    font-size: 14px;
    overflow: hidden;
}

/* Tooltip header */
.tooltip-header {
    background: #2c3e50;
    color: #ffffff;
    padding: 12px 16px;
}

.tooltip-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.tooltip-subtitle {
    font-size: 13px;
    font-weight: 500;
    margin: 0;
    opacity: 0.85;
    line-height: 1.2;
}

/* Tooltip body */
.tooltip-body {
    background: #ffffff;
    padding: 16px;
    max-height: 300px;
    overflow-y: auto;
}

.tooltip-content {
    color: #333333;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.tooltip-content p {
    margin: 0 0 12px 0;
}

.tooltip-content p:last-child {
    margin-bottom: 0;
}

/* Event Modal Styles - Extended tooltip system */
.litetheme-event-modal {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 1000000 !important;
}

/* Force scrollbar to be visible and styled on tooltip body */
.litetheme-event-modal .tooltip-body {
    scrollbar-width: auto !important;
    -webkit-overflow-scrolling: touch !important;
    outline: none; /* Remove focus outline */
}

.litetheme-event-modal .tooltip-body::-webkit-scrollbar {
    width: 12px !important;
    background: rgba(0,0,0,0.1) !important;
}

.litetheme-event-modal .tooltip-body::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.4) !important;
    border-radius: 6px !important;
}

.litetheme-event-modal .tooltip-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.6) !important;
}

.litetheme-event-modal .tooltip-box {
    width: 800px !important;
    max-width: 90vw !important;
    overflow: visible !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25) !important;
}

/* Modal overlay when container is used as backdrop */
#litetheme-tooltip-container.modal-backdrop {
    background: rgba(0, 0, 0, 0.7) !important;
    pointer-events: auto !important;
}

/* Close button hover effect */
.litetheme-event-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Enhanced content styling for event modals */
.litetheme-event-modal .tooltip-content h1,
.litetheme-event-modal .tooltip-content h2,
.litetheme-event-modal .tooltip-content h3,
.litetheme-event-modal .tooltip-content h4,
.litetheme-event-modal .tooltip-content h5,
.litetheme-event-modal .tooltip-content h6 {
    margin-top: 0;
    margin-bottom: 16px;
    line-height: 1.3;
}

.litetheme-event-modal .tooltip-content p {
    margin-bottom: 16px;
    line-height: 1.6;
}

.litetheme-event-modal .tooltip-content p:last-child {
    margin-bottom: 0;
}

.litetheme-event-modal .tooltip-content ul,
.litetheme-event-modal .tooltip-content ol {
    margin-left: 20px;
    margin-bottom: 16px;
}

.litetheme-event-modal .tooltip-content blockquote {
    border-left: 4px solid #ddd;
    padding-left: 16px;
    margin: 16px 0;
    font-style: italic;
}

.litetheme-event-modal .tooltip-content a {
    color: #0073aa;
    text-decoration: underline;
}

.litetheme-event-modal .tooltip-content a:hover {
    text-decoration: none;
}

/* Responsive design for modals */
@media (max-width: 768px) {
    .litetheme-event-modal .tooltip-box {
        width: 95vw !important;
        max-height: 85vh !important;
        margin: 20px !important;
    }
    
    .litetheme-event-modal {
        top: 20px !important;
        transform: translateX(-50%) !important;
    }
}

/* Arrow and responsive styling removed - using inline styles for tooltips */