/*
 * HillHost Location + Country visual enhancements
 *
 * This does NOT modify the real WHMCS values.
 */

/* Hide only Location selects that have been successfully enhanced */
.hh-location-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    opacity: 0 !important;
}

.hh-location-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    gap: 10px;
    width: 100%;
    margin-top: 6px;
}

.hh-location-card {
    position: relative;

    display: flex;
    align-items: center;
    gap: 11px;

    min-height: 55px;
    padding: 9px 12px;

    border: 1px solid #dfe5ec;
    border-radius: 9px;

    background: #fff;
    color: #202632;

    text-align: left;
    cursor: pointer;

    transition:
        border-color .15s ease,
        box-shadow .15s ease,
        background-color .15s ease,
        transform .15s ease;
}

.hh-location-card:hover {
    border-color: #aab6c4;
    box-shadow: 0 4px 12px rgba(0,0,0,.055);
    transform: translateY(-1px);
}

.hh-location-card.is-selected {
    border-color: #0d6efd;
    background: rgba(13,110,253,.035);
    box-shadow: 0 0 0 2px rgba(13,110,253,.10);
}

.hh-location-flag {
    flex: 0 0 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;

    border-radius: 8px;
    background: #f6f8fa;

    font-size: 22px;
    line-height: 1;
}

.hh-location-label {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
}

.hh-location-check {
    position: absolute;
    top: 6px;
    right: 7px;

    display: none;
    align-items: center;
    justify-content: center;

    width: 18px;
    height: 18px;

    border-radius: 50%;
    background: #0d6efd;
    color: #fff;

    font-size: 10px;
    font-weight: 700;
}

.hh-location-card.is-selected .hh-location-check {
    display: flex;
}

@media (max-width: 600px) {
    .hh-location-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }
}

@media (max-width: 420px) {
    .hh-location-grid {
        grid-template-columns: 1fr;
    }
}
