.custom-elementor-widget {
    position: relative;
    text-align: center;
}

.custom-elementor-widget .media-container {
    position: relative;
    margin-bottom: 15px;
}

.custom-elementor-widget .media-container img,
.custom-elementor-widget .media-container i {
    max-width: 100%;
    height: auto;
}

.custom-elementor-widget .badge {
    position: absolute;
    background-color: #ff0000;
    color: #ffffff;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 3px;
}

.custom-elementor-widget .badge.top-left {
    top: 10px;
    left: 10px;
}

.custom-elementor-widget .badge.top-right {
    top: 10px;
    right: 10px;
}

.custom-elementor-widget .badge.bottom-left {
    bottom: 10px;
    left: 10px;
}

.custom-elementor-widget .badge.bottom-right {
    bottom: 10px;
    right: 10px;
}

.custom-elementor-widget .title {
    font-size: 18px;
    margin-bottom: 10px;
}

.custom-elementor-widget .info-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    border-radius: 50%;
    font-size: 12px;
    margin-left: 5px;
    cursor: help;
}

.custom-elementor-widget .subtitle {
    font-size: 14px;
    color: #666;
}

.custom-tooltip {
    position: absolute;
    background-color: #ffffff; /* Lighter background */
    color: #333333; /* Darker text for contrast */
    padding: 15px; /* More padding */
    border-radius: 8px; /* More rounded corners */
    font-size: 14px; /* Slightly larger font */
    line-height: 1.5; /* Better readability */
    z-index: 9999;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* Subtle shadow */
    max-width: 300px; /* Max width for desktop */
    width: 90%; /* Responsive width for smaller screens */
    left: 50%; /* Center horizontally */
    transform: translateX(-50%); /* Adjust for centering */
    box-sizing: border-box; /* Include padding in width */
    overflow-y: auto; /* Enable scroll for long content */
    max-height: 250px; /* Max height for scroll */
    opacity: 0; /* Start hidden */
    transition: opacity 0.2s ease-in-out; /* Smooth fade in/out */
}

/* Tooltip arrow */
.custom-tooltip::after {
    content: "";
    position: absolute;
    bottom: 100%; /* Position above the tooltip */
    left: 50%;
    margin-left: -10px; /* Center the arrow */
    border-width: 10px;
    border-style: solid;
    border-color: transparent transparent #ffffff transparent; /* Match background color */
}

/* Make tooltip visible when JavaScript sets display: block */
.custom-tooltip[style*="display: block"] {
    opacity: 1;
}

