@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/Poppins-Regular.woff") format("woff");
}

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/Poppins-Bold.woff") format("woff");
}

/* General Styles */
.ymc-states-map {
    font-family: "Poppins";
    font-weight: 400;
    line-height: 1.3;
}

/* Map and SVG */
.ymc-states-map .states-map-entry svg {
    width: 100%;
    pointer-events: auto !important; /* Ensures clicks work */
}

.ymc-states-map .ymc-popup .btn:hover{
	background:#ff9800
}

.ymc-popup .open:hover {
    color: #fff; /* Invert text color on hover */
}

.ymc-popup .close:hover {
    color: #fff; /* Invert text color on hover */
    background-color: #666; /* Highlight background on hover */
    border-color: #000; /* Optional: change border color on hover */
}

/* Ensure small states are clickable */
.ymc-states-map .states-map-entry svg #NH_btn,
.ymc-states-map .states-map-entry svg #VT_btn,
.ymc-states-map .states-map-entry svg #RI_btn,
.ymc-states-map .states-map-entry svg #WV_btn,
.ymc-states-map .states-map-entry svg #MA_btn,
.ymc-states-map .states-map-entry svg #CT_btn,
.ymc-states-map .states-map-entry svg #MD_btn,
.ymc-states-map .states-map-entry svg #DE_btn,
.ymc-states-map .states-map-entry svg #NJ_btn,
.ymc-states-map .states-map-entry svg #HI_btn {
    cursor: pointer;
	fill: #fff !important;
}

/* Remove tooltip on mobile */
@media (max-width: 768px) {
    .ymc-states-map .states-map-entry .ymc-tooltip {
        display: none !important;
    }
}

/* Overlay */
.ymc-states-map .ymc-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 99998;
}

/* Popup Styling */
.ymc-states-map .ymc-popup {
    position: fixed;
    left: 50%;
    top: 25%;
    transform: translate(-50%, -50%);
    width: 50%;
    max-width: 600px;
    background: #fff;
    padding: 30px;
    display: block !important;
    opacity: 1;
    visibility: visible;
    background: #fff url("../images/bg_popup.png") no-repeat center center/cover;
    transition: opacity 0.3s ease-in-out, top 0.3s ease-in-out;
    z-index: 99999;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Open State */
.ymc-states-map .ymc-popup.open {
    top: 20% !important;
    opacity: 1;
	fill: #fff !important;
}

/* Popup Close Button */
.ymc-states-map .ymc-popup .close {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 18px;
    font-weight: bold;
    color: #fff !important;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #808080 !important;
}


/* Popup Content */
.ymc-states-map .ymc-popup .header {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    border-bottom: 2px solid #656565;
    padding-bottom: 10px;
    text-align: center;
}

.ymc-states-map .ymc-popup .text {
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
}

/* Popup Container */
.ymc-states-map .ymc-popup .container {
    text-align: left !important;
    max-height: auto;
}

/* CTA Button */
.ymc-states-map .ymc-popup .btn {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 15px;
    background: #098ab8;
    color: #fff;
    border: none;
    font-size: 16px;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

/* Mobile Popup Styling */
@media (max-width: 768px) {
    .ymc-popup {
        width: 90% !important;
        max-width: 95% !important;
        max-height: 95vh !important;
        height: auto !important;
        top: 50% !important;
        transform: translate(-50%, -50%);
        padding: 20px;
        border-radius: 8px;
    }

    .ymc-popup .text {
        font-size: 16px;
        line-height: 1.6;
    }

    .ymc-popup .close {
        font-size: 35px;
        right: 15px;
        top: 15px;
        width: 45px;
        height: 45px;
    }
}

/* Smallest Mobile Screens */
@media (max-width: 480px) {
    .ymc-popup {
        width: 95% !important;
        max-height: 98vh !important;
        height: auto !important;
        padding: 15px;
        top: 30% !important;
    }

    .ymc-popup .close {
        font-size: 40px;
        right: 10px;
        top: 10px;
        width: 50px;
        height: 50px;
    }
}

/* Re-enable hover effects for screens larger than 768px */
@media (min-width: 769px) {
    .ymc-states-map svg path {
        pointer-events: auto !important; /* Re-enable hover interactions */
    }

    .ymc-states-map .states-map-entry .ymc-tooltip {
        display: none; /* Default state */
        position: absolute;
        padding: 10px;
        background-color: rgba(0, 0, 0, 0.8);
        color: #fff;
        border-radius: 5px;
        font-size: 14px;
        z-index: 9999;
        white-space: nowrap;
        transition: opacity 0.3s ease-in-out;
        opacity: 0;
    }

    .ymc-states-map .states-map-entry svg path:hover + .ymc-tooltip,
    .ymc-states-map .states-map-entry svg rect:hover + .ymc-tooltip {
        display: block !important; /* Show tooltip on hover */
        opacity: 1;
    }
}