/* =========================================================
   TINECO WARRANTY LOCATOR
   ========================================================= */

.tineco-warranty {
    --tineco-black: #00327d;
    --tineco-dark: #1d1d1d;
    --tineco-text: #222222;
    --tineco-gray: #666666;
    --tineco-light-gray: #999999;
    --tineco-border: #e6e6e6;
    --tineco-bg: #f7f7f7;
    --tineco-white: #ffffff;

    width: 100%;
    padding: 70px 0 100px;
    background: #ffffff;
    color: var(--tineco-text);
}


/* =========================================================
   HEADER
   ========================================================= */

.tineco-warranty__header {
    max-width: 1200px;
    margin: 0 auto 42px;
    padding: 0 24px;
    text-align: center;
}

.tineco-warranty__eyebrow {
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--tineco-gray);
}

.tineco-warranty__title {
    margin: 0;
    font-size: clamp(34px, 4vw, 54px);
    line-height: 1.1;
    font-weight: 600;
    letter-spacing: -1.5px;
    color: var(--tineco-black);
}

.tineco-warranty__desc {
    max-width: 600px;
    margin: 18px auto 0;
    font-size: 16px;
    line-height: 1.7;
    color: var(--tineco-gray);
}


/* =========================================================
   FILTER
   ========================================================= */

.tineco-warranty__filters {
    max-width: 1300px;
    margin: 0 auto 24px;
    padding: 0 24px;

    display: grid;
    grid-template-columns: 1fr 480px;
    gap: 12px;
}

.tineco-search,
.tineco-city-filter {
    position: relative;
}

.tineco-search input[type=search],
.tineco-city-filter select {
    width: 100%;
    height: 54px;
    padding: 0 18px 0 48px;

    border: 1px solid var(--tineco-border);
    border-radius: 0;

    background: #fff;
    color: var(--tineco-text);

    font-size: 14px;
    outline: none;

    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

.tineco-search input[type=search] {
    box-shadow: inset 0 -1.4em 1em 0 rgba(0, 0, 0, .02);
}

.tineco-search input:focus,
.tineco-city-filter select:focus {
    border-color: var(--tineco-black);
    box-shadow: 0 0 0 1px var(--tineco-black);
}

.tineco-search svg,
.tineco-city-filter svg {
    position: absolute;

    left: 17px;
    top: 40%;

    width: 18px;
    height: 18px;

    transform: translateY(-50%);

    fill: none;
    stroke: var(--tineco-gray);
    stroke-width: 2;

    pointer-events: none;
}

.tineco-city-filter select {
    appearance: none;
    cursor: pointer;
}


/* =========================================================
   MAIN
   ========================================================= */

.tineco-warranty__layout {
    max-width: 1300px;
    height: 680px;

    margin: 0 auto;
    padding: 0 24px;

    display: grid;

    grid-template-columns: 410px minmax(0, 1fr) !important;

    gap: 16px;

    min-height: 0;
}


/* =========================================================
   LIST
   ========================================================= */

.tineco-warranty__list {
    width: auto !important;

    min-width: 0 !important;
    min-height: 0 !important;

    height: 100%;

    display: flex !important;
    flex-direction: column;

    overflow: hidden;

    order: 0;
}

.tineco-warranty__list-top {
    min-height: 58px;

    padding: 0 20px;

    border-bottom: 1px solid var(--tineco-border);

    display: flex;
    align-items: center;
    justify-content: space-between;

    font-size: 13px;
    color: var(--tineco-gray);
}

.tineco-warranty__list-top strong {
    color: var(--tineco-black);
    font-weight: 600;
}


/* =========================================================
   ITEMS
   ========================================================= */

.tineco-warranty__items {
    flex: 1;

    overflow-y: auto;
    overflow-x: hidden;
}


/* =========================================================
   WARRANTY CARD
   ========================================================= */

.tineco-warranty-card {
    position: relative;

    padding: 22px 20px;

    border-bottom: 1px solid var(--tineco-border);

    cursor: pointer;

    transition:
        background .2s ease,
        padding-left .2s ease;
}

.tineco-warranty-card:hover {
    background: var(--tineco-bg);
}

.tineco-warranty-card.is-active {
    background: var(--tineco-bg);

    box-shadow:
        inset 3px 0 0 var(--tineco-black);
}


/* CARD TOP */

.tineco-warranty-card__top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}


/* NUMBER */

.tineco-warranty-card__number {
    flex: 0 0 28px;

    width: 28px;
    height: 28px;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--tineco-black);
    color: #fff;

    font-size: 11px;
    font-weight: 600;
}


/* NAME */

.tineco-warranty-card__name {
    margin: 2px 0 0;

    font-size: 16px;
    line-height: 1.4;

    font-weight: 600;

    color: var(--tineco-black);
}


/* INFO */

.tineco-warranty-card__info {
    margin: 15px 0 0 40px;
}


/* INFO ROW */

.tineco-warranty-card__row {
    display: flex;

    gap: 9px;

    margin-top: 9px;

    font-size: 13px;
    line-height: 1.55;

    color: var(--tineco-gray);
}

.tineco-warranty-card__row svg {
    flex: 0 0 16px;

    width: 16px;
    height: 16px;

    margin-top: 2px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
}


/* ACTIONS */

.tineco-warranty-card__actions {
    margin: 17px 0 0 40px;

    display: flex;

    gap: 8px;
}


/* BUTTON */

.tineco-warranty-card__button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 36px;

    padding: 0 14px;

    border: 1px solid var(--tineco-black);

    font-size: 12px;
    font-weight: 500;

    text-decoration: none !important;

    transition: all .2s ease;
}


/* CALL */

.tineco-warranty-card__button--call {
    background: var(--tineco-black);
    color: #fff !important;
}

.tineco-warranty-card__button--call:hover {
    background: #333;
}


/* DIRECTION */

.tineco-warranty-card__button--direction {
    background: #fff;
    color: var(--tineco-black) !important;
}

.tineco-warranty-card__button--direction:hover {
    background: var(--tineco-black);
    color: #fff !important;
}


/* =========================================================
   EMPTY
   ========================================================= */

.tineco-warranty__empty {
    margin-bottom: 600px;

    padding: 40px 20px;

    text-align: center;

    font-size: 14px;

    color: var(--tineco-gray);
}


/* =========================================================
   MAP
   ========================================================= */

.tineco-warranty__map-wrap {
    position: relative;

    min-width: 0;

    overflow: hidden;

    border: 1px solid var(--tineco-border);
}

.tineco-warranty__map {
    width: 100%;
    height: 100%;
}


/* MAP LABEL */

.tineco-warranty__map-label {
    position: absolute;

    z-index: 500;

    right: 18px;
    top: 18px;

    padding: 9px 13px;

    background: rgba(255, 255, 255, .94);

    border: 1px solid var(--tineco-border);

    font-size: 12px;
    font-weight: 500;

    box-shadow: 0 5px 20px rgba(0, 0, 0, .06);
}

.tineco-warranty__map-label span {
    display: inline-block;

    width: 7px;
    height: 7px;

    margin-right: 7px;

    border-radius: 50%;

    background: var(--tineco-black);
}


/* =========================================================
   MAP POPUP
   ========================================================= */

.tineco-map-popup {
    gap: 12px;

    width: 260px;

    display: flex;
    align-items: center;
}

.tineco-map-popup__image {
    display: block;

    width: 40px;
    height: 40px;

    object-fit: cover;
}

.tineco-map-popup__name {
    margin-bottom: 6px;

    font-size: 14px;
    line-height: 1.4;

    font-weight: 600;

    color: var(--tineco-black);
}

.tineco-map-popup__address {
    font-size: 12px;

    line-height: 1.5;

    color: var(--tineco-gray);
}


/* =========================================================
   LEAFLET
   ========================================================= */

.tineco-warranty .leaflet-container {
    font-family: inherit;
}

.tineco-warranty .leaflet-popup-content {
    margin: 16px;
}


/* POPUP TYPOGRAPHY */

.tineco-map-popup__name {
    margin-bottom: 7px;

    font-weight: 600;

    color: var(--tineco-black);
}

.tineco-map-popup__address {
    font-size: 12px;

    line-height: 1.5;

    color: var(--tineco-gray);
}


/* =========================================================
   CUSTOM MARKER
   ========================================================= */

.tineco-marker {
    width: 30px;
    height: 30px;

    border-radius: 50% 50% 50% 0;

    background: var(--tineco-black);

    border: 3px solid #fff;

    transform: rotate(-45deg);

    box-shadow: 0 4px 12px rgba(0, 0, 0, .22);
}

.tineco-marker::after {
    content: "";

    position: absolute;

    width: 7px;
    height: 7px;

    left: 50%;
    top: 50%;

    border-radius: 50%;

    background: #fff;

    transform: translate(-50%, -50%);
}


/* =========================================================
   SCROLLBAR
   ========================================================= */

.tineco-warranty__items::-webkit-scrollbar {
    width: 5px;
}

.tineco-warranty__items::-webkit-scrollbar-thumb {
    background: #cfcfcf;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 849px) {

    .tineco-warranty {
        padding: 50px 0 70px;
        overflow: visible;
    }

    .tineco-warranty__header {
        margin-bottom: 30px;
    }

    .tineco-warranty__title {
        font-size: 34px;
    }

    .tineco-warranty__filters {
        grid-template-columns: 1fr;
    }

    .tineco-warranty__layout {
        height: auto;

        grid-template-columns: 1fr !important;

        gap: 12px;

        display: grid !important;
    }


    /* MAP SAU LIST */

    .tineco-warranty__map-wrap {
        order: 2;

        width: 100%;

        height: 430px;

        min-height: 0;

        overflow: hidden;
    }


    /* LIST TRƯỚC MAP */

    .tineco-warranty__list {
        order: 1;

        width: 100%;

        height: auto;

        max-height: 620px;

        min-height: 0;

        overflow: hidden;
    }


    /* LIST SCROLL */

    .tineco-warranty__items {
        min-height: 0;

        overflow-y: auto;
        overflow-x: hidden;
    }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 549px) {

    .tineco-warranty__header,
    .tineco-warranty__filters,
    .tineco-warranty__layout {
        padding-left: 16px;
        padding-right: 16px;
    }

    .tineco-warranty__map-wrap {
        height: 360px;
    }

    .tineco-warranty-card {
        padding: 18px 15px;
    }

}