/* =====================================================================
 * Shortcode: [tnt_contact_branches]
 * Layout: list chi nhanh (left) + Google map (right) + email
 * ===================================================================== */

.tnt-contact-branches {
    --tnt-cb-orange: #fc7400;
    --tnt-cb-orange-soft: #fff3e6;
    --tnt-cb-text: #333;
    --tnt-cb-muted: #777;
    --tnt-cb-border: #f0e2d2;
    --tnt-cb-radius: 14px;
    --tnt-cb-gap: 24px;

    margin: 0 0 24px;
    color: var(--tnt-cb-text);
    font-family: inherit;
}

.tnt-contact-branches *,
.tnt-contact-branches *::before,
.tnt-contact-branches *::after {
    box-sizing: border-box;
}

.tnt-cb__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: var(--tnt-cb-gap);
    align-items: start;
}

.tnt-contact-branches.is-reverse .tnt-cb__inner {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
}

.tnt-contact-branches.is-reverse .tnt-cb__list {
    order: 2;
}

.tnt-contact-branches.is-reverse .tnt-cb__map {
    order: 1;
}

/* ----- Branch list ----- */
.tnt-cb__list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tnt-cb__item {
    border: 1.5px solid var(--tnt-cb-border);
    border-radius: var(--tnt-cb-radius);
    padding: 18px 22px;
    background: #fff;
    cursor: pointer;
    transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
    outline: none;
}

.tnt-cb__item:hover,
.tnt-cb__item:focus-visible {
    border-color: var(--tnt-cb-orange);
    box-shadow: 0 4px 14px rgba(252, 116, 0, .08);
}

.tnt-cb__item.is-active {
    border-color: var(--tnt-cb-orange);
    background: #fffaf3;
    box-shadow: 0 6px 18px rgba(252, 116, 0, .1);
}

.tnt-cb__title {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 700;
    color: var(--tnt-cb-orange);
    text-transform: uppercase;
    letter-spacing: .3px;
}

.tnt-cb__row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
    line-height: 1.5;
}

.tnt-cb__row:last-child {
    margin-bottom: 0;
}

.tnt-cb__icon {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--tnt-cb-orange);
    margin-top: 2px;
}

.tnt-cb__icon svg {
    width: 100%;
    height: 100%;
}

.tnt-cb__text {
    flex: 1 1 auto;
    font-size: 15px;
    color: var(--tnt-cb-text);
}

.tnt-cb__phones {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1 1 auto;
}

.tnt-cb__phones li {
    margin: 0 0 4px;
    font-size: 15px;
}

.tnt-cb__phones li:last-child {
    margin-bottom: 0;
}

.tnt-cb__phone {
    font-weight: 700;
    color: var(--tnt-cb-text);
    text-decoration: none;
    transition: color .2s ease;
}

.tnt-cb__phone:hover {
    color: var(--tnt-cb-orange);
}

.tnt-cb__note {
    color: var(--tnt-cb-muted);
    font-size: 14px;
    margin-left: 4px;
}

/* ----- Email ----- */
.tnt-cb__email {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 4px;
    margin-top: 4px;
    font-size: 15px;
}

.tnt-cb__email a {
    color: var(--tnt-cb-text);
    font-weight: 600;
    text-decoration: none;
    transition: color .2s ease;
}

.tnt-cb__email a:hover {
    color: var(--tnt-cb-orange);
}

/* ----- Map ----- */
.tnt-cb__map {
    width: 100%;
    min-height: 320px;
    height: 100%;
    border-radius: var(--tnt-cb-radius);
    overflow: hidden;
    background: #f4f4f4;
    border: 1px solid #e6e6e6;
    position: relative;
}

.tnt-cb__map iframe {
    width: 100%;
    height: 100%;
    min-height: 320px;
    border: 0;
    display: block;
}

/* Hide template element completely (cross-browser safety) */
.tnt-cb__map-source {
    display: none !important;
}

/* ----- Responsive ----- */
@media (max-width: 991px) {
    .tnt-cb__inner,
    .tnt-contact-branches.is-reverse .tnt-cb__inner {
        grid-template-columns: 1fr;
    }

    .tnt-contact-branches.is-reverse .tnt-cb__list,
    .tnt-contact-branches.is-reverse .tnt-cb__map {
        order: initial;
    }

    .tnt-cb__map {
        min-height: 280px;
        order: 2;
    }

    .tnt-cb__list {
        order: 1;
    }
}

@media (max-width: 575px) {
    .tnt-cb__item {
        padding: 14px 16px;
    }

    .tnt-cb__title {
        font-size: 16px;
    }

    .tnt-cb__text,
    .tnt-cb__phones li,
    .tnt-cb__email {
        font-size: 14px;
    }

    .tnt-cb__map,
    .tnt-cb__map iframe {
        min-height: 240px;
    }
}
