/*
|--------------------------------------------------------------------------
| Five Yellows Locations
|--------------------------------------------------------------------------
*/

.fygo-locations,
.fygo-single-location,
.fygo-nearest {
    box-sizing: border-box;
}

.fygo-locations *,
.fygo-single-location *,
.fygo-nearest * {
    box-sizing: border-box;
}


/*
|--------------------------------------------------------------------------
| Locations Grid
|--------------------------------------------------------------------------
*/

.fygo-locations {
    display: grid;
    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );
    gap: 22px;
    width: 100%;
}


/*
|--------------------------------------------------------------------------
| Location Card
|--------------------------------------------------------------------------
*/

.fygo-location-card {
    background: #ffffff;
    border: 1px solid #e7e7e7;
    border-radius: 14px;
    overflow: hidden;
    box-shadow:
        0 3px 14px
        rgba(0, 0, 0, 0.06);
    height: 100%;
    display: flex;
    flex-direction: column;
}


/*
|--------------------------------------------------------------------------
| Location Image
|--------------------------------------------------------------------------
*/

.fygo-location-image-wrap {
    width: 100%;
    aspect-ratio: 16 / 8;
    overflow: hidden;
    background: #f4f4f4;
}

.fygo-location-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/*
|--------------------------------------------------------------------------
| Card Body
|--------------------------------------------------------------------------
*/

.fygo-location-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.fygo-location-name {
    margin:
        0
        0
        9px;
    padding: 0;
    font-size: 21px;
    line-height: 1.2;
    font-weight: 800;
    color: #161616;
}

.fygo-location-address {
    font-size: 14px;
    line-height: 1.5;
    color: #555555;
    margin-bottom: 10px;
}

.fygo-location-phone {
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 700;
}

.fygo-location-phone a {
    color: #171717;
    text-decoration: none;
}

.fygo-location-phone a:hover {
    text-decoration: underline;
}


/*
|--------------------------------------------------------------------------
| Distance
|--------------------------------------------------------------------------
*/

.fygo-location-distance {
    display: inline-flex;
    align-self: flex-start;
    margin-bottom: 10px;
    padding:
        6px
        10px;
    border-radius: 999px;
    background: #eef5d9;
    color: #526b0a;
    font-size: 12px;
    line-height: 1;
    font-weight: 800;
}


/*
|--------------------------------------------------------------------------
| Buttons
|--------------------------------------------------------------------------
*/

.fygo-location-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: auto;
    padding-top: 7px;
}

.fygo-button,
.fygo-nearest-button {
    appearance: none;
    border: 0;
    border-radius: 8px;
    min-height: 42px;
    padding:
        10px
        16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition:
        transform 0.15s ease,
        opacity 0.15s ease,
        background-color 0.15s ease;
}

.fygo-button:hover,
.fygo-nearest-button:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.fygo-button-primary,
.fygo-nearest-button {
    background: #95b815;
    color: #ffffff;
}

.fygo-button-primary:hover,
.fygo-nearest-button:hover {
    background: #819f12;
    color: #ffffff;
}

.fygo-button-secondary {
    background: #f3f3f3;
    color: #171717;
}

.fygo-button-secondary:hover {
    background: #e7e7e7;
    color: #171717;
}


/*
|--------------------------------------------------------------------------
| Nearest Location Block
|--------------------------------------------------------------------------
*/

.fygo-nearest {
    width: 100%;
    max-width: 760px;
    margin:
        20px
        auto;
    padding: 28px;
    border: 1px solid #e6e6e6;
    border-radius: 16px;
    background: #ffffff;
}

.fygo-nearest-title {
    margin:
        0
        0
        8px;
    padding: 0;
    font-size: 26px;
    line-height: 1.2;
    font-weight: 800;
    color: #161616;
}

.fygo-nearest-description {
    margin:
        0
        0
        18px;
    color: #5a5a5a;
    line-height: 1.5;
}

.fygo-nearest-button {
    min-width: 190px;
}

.fygo-nearest-button:disabled {
    opacity: 0.55;
    cursor: wait;
    transform: none;
}


/*
|--------------------------------------------------------------------------
| Nearest Status
|--------------------------------------------------------------------------
*/

.fygo-nearest-status {
    min-height: 20px;
    margin-top: 13px;
    font-size: 13px;
    line-height: 1.45;
}

.fygo-nearest-status.is-loading {
    color: #666666;
}

.fygo-nearest-status.is-error {
    color: #b42318;
}

.fygo-nearest-status.is-success {
    color: #237a37;
}


/*
|--------------------------------------------------------------------------
| Nearest Result
|--------------------------------------------------------------------------
*/

.fygo-nearest-result {
    margin-top: 18px;
}

.fygo-nearest-card {
    max-width: 100%;
}


/*
|--------------------------------------------------------------------------
| Messages
|--------------------------------------------------------------------------
*/

.fygo-message {
    padding: 14px 16px;
    border-radius: 9px;
    font-size: 14px;
    line-height: 1.5;
}

.fygo-message-error {
    border: 1px solid #e5a4a4;
    background: #fff1f1;
    color: #8a2525;
}

.fygo-message-empty {
    border: 1px solid #dedede;
    background: #f7f7f7;
    color: #555555;
}


/*
|--------------------------------------------------------------------------
| Single Location
|--------------------------------------------------------------------------
*/

.fygo-single-location {
    max-width: 620px;
}

.fygo-single-location
.fygo-location-card {
    width: 100%;
}


/*
|--------------------------------------------------------------------------
| Tablet
|--------------------------------------------------------------------------
*/

@media (
    max-width: 980px
) {
    .fygo-locations {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }
}


/*
|--------------------------------------------------------------------------
| Mobile
|--------------------------------------------------------------------------
*/

@media (
    max-width: 640px
) {
    .fygo-locations {
        grid-template-columns:
            1fr;
        gap: 16px;
    }

    .fygo-location-body {
        padding: 17px;
    }

    .fygo-location-name {
        font-size: 19px;
    }

    .fygo-location-actions {
        flex-direction: column;
    }

    .fygo-button {
        width: 100%;
    }

    .fygo-nearest {
        padding: 20px;
        border-radius: 12px;
    }

    .fygo-nearest-title {
        font-size: 22px;
    }

    .fygo-nearest-button {
        width: 100%;
    }
}
