/* XP League Store Locator Popup Styles */

/* Popup Overlay */
.xp-league-locator-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999999;
    align-items: center;
    justify-content: center;
}

.xp-league-locator-overlay.active {
    display: flex;
}

/* Popup Container */
.xp-league-locator-popup {
    position: relative;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    background: #003049;
    border-radius: 0;
    overflow-y: auto;
    padding: 40px 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Close Button */
.xp-league-locator-close {
    position: absolute;
    top: 20px;
    right: 5%;
    border: 1px solid #fff !important;
    font-family: Montserrat, Helvetica, Arial, Lucida, sans-serif;
    border-radius: 50%;
    height: 40px;
    width: 40px;
    opacity: 1;
    transition: opacity 0.3s;
    cursor: pointer;
    background: #fff !important;
    font-size: 35px !important;
    color: #003049 !important;
    line-height: 0px !important;
    padding: 0 0 !important;
}

.xp-league-locator-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

/* Header */
.xp-league-locator-header {
    margin-bottom: 30px;
}

.xp-league-locator-header h2 {
    display: inline-block;
    position: relative;
    margin: 0;
    padding-right: 0;
    text-align: left;
    font-size: 24px;
    color: #fff !important;
    font-weight: 500;
    padding-bottom: 0;
    line-height: 30px;
}

/* Search Form */
.xp-league-search-form {
    margin-bottom: 30px;
}

.xp-league-search-wrapper {
    display: flex;
    gap: 0;
}

.xp-league-search-input {
    display: inline-block;
    width: 100%;
    font-size: 13px;
    border: 0;
    padding: 16px;
    border-radius: 0;
    /* height: 49px; */
    vertical-align: top;
    box-shadow: none;
    outline: 0;
    color: #0a233e;
    font-family: Montserrat, Helvetica, Arial, Lucida, sans-serif;
    text-transform: uppercase;
    font-weight: 600;
}

.xp-league-search-input::placeholder {
    color: #999999;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.xp-league-search-button {
    width: 180px;
    transition: 0.3s;
    outline: 0;
    margin: 0;
    cursor: pointer;
    border-width: 0px !important;
    border-radius: 0;
    letter-spacing: .7px;
    font-size: 16px;
    font-family: "Montserrat", Helvetica, Arial, Lucida, sans-serif !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    background-color: #78bd43 !important;
    color: #0b233f !important;
    padding: 15px 20px !important;
}

.xp-league-search-button:hover {
    background: #66aa35;
}

/* Error Message */
.xp-league-error-message {
    display: none;
    color: #ff6b6b;
    font-size: 14px;
    margin-top: 10px;
    padding: 10px;
    background: rgba(255, 107, 107, 0.1);
    border-left: 3px solid #ff6b6b;
}

.xp-league-error-message.active {
    display: block;
}

/* Locations List */
.xp-league-locations-list {
    margin-bottom: 20px;
}

.xp-league-location-item {
    background: #ffffff;
    padding: 18px 20px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: none;
    transition: transform 0.2s ease;
}

.xp-league-location-item:hover {
    transform: translateX(3px);
}

/* Clickable location link styling */
a.xp-league-location-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

a.xp-league-location-link:hover {
    background: #f5f5f5;
}

.xp-league-location-item:last-child {
    margin-bottom: 0;
}

.xp-league-location-info {
    flex: 1;
}

.xp-league-location-name {
    color: #003049;
    font-size: 15px;
    font-weight: 400;
    margin: 0 0 0 0;
    line-height: 1.4;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.xp-league-location-address {
    color: #666666;
    font-size: 13px;
    margin: 0;
    display: none; /* Hide city, state as per the image */
}

.xp-league-location-distance {
    color: #003049;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    margin-left: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* No Results Message */
.xp-league-no-results {
    display: none;
    color: #ffffff;
    text-align: center;
    padding: 30px;
    font-size: 16px;
}

.xp-league-no-results.active {
    display: block;
}

/* View All Link */
.xp-league-view-all {
    text-align: left;
    margin-top: 25px;
    padding-top: 20px;
}

.xp-league-view-all a {
    color: #fff !important;
    float: left;
    text-transform: uppercase;
    font-weight: 500;
    font-size: 20px;
    letter-spacing: 1px;
}

.xp-league-view-all a:hover {
    opacity: 0.8;
    color: #ffffff !important;
}

/* Loading State */
.xp-league-loading {
    display: none;
    text-align: center;
    padding: 30px;
    color: #ffffff;
}

.xp-league-loading.active {
    display: block;
}

.xp-league-loading::after {
    content: "";
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #77C043;
    border-radius: 50%;
    animation: xp-spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes xp-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .xp-league-locator-popup {
        padding: 30px 20px;
        max-height: 95vh;
    }

    .xp-league-locator-header h2 {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .xp-league-search-wrapper {
        flex-direction: column;
    }

    .xp-league-search-button {
        padding: 12px 30px;
    }

    .xp-league-location-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .xp-league-location-distance {
        margin-left: 0;
        margin-top: 8px;
    }
}
