/* ===============================
   RAJASTHAN MAP TOOLTIP SYSTEM
   Production Version
================================= */

#tooltip {
    position: absolute;
    display: none;
    opacity: 0;
    z-index: 9999;
    max-width: 600px;
    object-fit: cover;
    font-family: Arial, sans-serif;
    font-size: 12px;
    transition: opacity 0.2s ease, transform 0.2s ease;
    border: 1px solid var(--primary);
    border-radius: 8px;
}

/* Tooltip Card */
.tooltip-card {
    display: flex;
    background: #f8f8f8;
    color: #000000;
    border-radius: 8px;
    padding: 8px;
    pointer-events: auto;
    max-height: 100%;
    overflow-y: 100%;
    object-fit: cover;
}

/* Image wrapper */
.tooltip-img-container {
    width: 200px;
    height: 130px;      /* fixed height for uniform layout */
    overflow: hidden;
    border-radius: 6px;
    flex-shrink: 0;
    margin-right: 1rem;
}

/* Image */
.tooltip-img {
    /* width: 250px;
    height: auto; */
    width: 100%;
    height: 100%;
    /* object-fit: contain; */
    object-fit: cover;
    display: block;
    border-radius: 4px;
    margin-right: 8px;
}

/* Content */
.tooltip-card h3 {
    margin: 0 0 5px 0;
    font-size: 1rem;
}

.tooltip-card p {
    margin: 3px 0;
    font-size: .75rem;
}

/* Button */
.tooltip-btn {
    display: inline-block;
    margin-top: 6px;
    padding: 4px 8px;
    background: #007bff;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-size: .75rem;
}

.tooltip-btn:hover {
    background: #0056b3;
}

.tooltip-btn:focus {
    outline: 2px solid yellow;
}

/* Arrow */
#tooltip-arrow {
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(0,0,0,0.92);
    position: absolute;
}

#tooltip a.tooltip-btn {
    pointer-events: auto; /* allow clicks on link */
    text-decoration: none;
    color: #fff;
    background: #007bff;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 5px;
}

/* Add focus style for keyboard navigation */
#tooltip a.tooltip-btn:focus {
    outline: 2px solid yellow;
    background: #0056b3;
}

/* Text Hoverable and color change */

/* Default text style */
.txtChange {
    fill: #054084 !important;
    font-size: 3rem;
    font-weight: 600;
    cursor: pointer;
    transition: fill 0.2s ease;
}

/* Hover color */
.txtChange:hover {
    fill: #000000 !important;
}


/* Mobile Responsive */
@media (max-width: 768px) {

    .tooltip-layout {
        flex-direction: column;
    }

    .tooltip-img-container {
        width: 100%;
        height: 180px;
    }

}