.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;
}

/* Custom Modal Styles */
.custom-modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    -webkit-animation-name: fadeIn;
    animation-name: fadeIn;
    -webkit-animation-duration: 0.4s;
    animation-duration: 0.4s;
}

.custom-modal-content {
    position: relative;
    background-color: #fefefe;
    margin: 10% auto;
    padding: 30px;
    border: none;
    border-radius: 10px;
    width: 85%;
    max-width: 700px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    -webkit-animation-name: slideIn;
    animation-name: slideIn;
    -webkit-animation-duration: 0.4s;
    animation-duration: 0.4s;
    color: #333;
    line-height: 1.6;
}

.custom-modal-content h1,
.custom-modal-content h2,
.custom-modal-content h3 {
    color: #1a1a1a;
    margin-top: 0;
}

.custom-modal-content p {
    margin-bottom: 1em;
}

.custom-modal-content a {
    color: #007bff;
    text-decoration: none;
}

.custom-modal-content a:hover {
    text-decoration: underline;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Animations */
@-webkit-keyframes fadeIn {
    from {opacity: 0} 
    to {opacity: 1}
}

@keyframes fadeIn {
    from {opacity: 0} 
    to {opacity: 1}
}

@-webkit-keyframes slideIn {
    from {top: -300px; opacity: 0}
    to {top: 0; opacity: 1}
}

@keyframes slideIn {
    from {margin-top: -5%; opacity: 0}
    to {margin-top: 10%; opacity: 1}
}
