/* =========================
   Base
========================= */

.tlh-pg, .tlh-pg * {
    box-sizing: border-box;
}

.tlh-pg-empty {
    padding: 16px;
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 10px;
    background: #fafafa;
}

/* =========================
   Layout
========================= */

.tlh-pg__wrap {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 18px;
    align-items: start;
}

/* =========================
   Thumbnails
========================= */

/* THUMBS COLUMN */
.tlh-pg__thumbs {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 2px;
    padding-right: 6px;

    overflow-y: auto;
    overflow-x: hidden;

    scroll-behavior: smooth;

    -ms-overflow-style: none;
    scrollbar-width: none;
}

.tlh-pg__thumbs::-webkit-scrollbar {
    display: none;
}

.tlh-pg__thumb {
    width: 100%;
    border: 0;
    padding: 0;
    background: transparent;

    cursor: pointer;
    outline: none;

    box-shadow: 0 0 0 1px rgba(0,0,0,.12);

    border-radius: 10px !important;
}

.tlh-pg__thumb.is-active {
    box-shadow: 0 0 0 2px rgb(194 32 53);
}

.tlh-pg__thumb img {
    display: block;
    width: 100%;
    height: 100% !important;
    object-fit: cover !important;

    border-radius: 10px;
}

/* =========================
   Main Stage
========================= */

.tlh-pg__stage {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: #f3f3f3;
    min-height: 700px;
    height: 700px;
}

.tlh-pg__image {
    width: 100%;
    height: 100%;
}

.tlh-pg__image img {
    display: block;
    width: 100%;
    height: 100%;
    border: 1px solid rgb(229, 229, 229);
    border-radius: 10px;
    object-fit: cover;
}
.tlh-pg__tourBtn img {
    border: none !important;
    width: 20px !important;
}

/* Arrows */
.tlh-pg__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;

    width: 40px;
    height: 40px;
    border-radius: 999px;

    border: 0;
    background: #fff;
    border: 1px solid #e4e4e4;

    cursor: pointer;

    display: grid;
    place-items: centre;
}

.tlh-pg__arrow span {
    font-size: 30px;
    line-height: 1;
}

.tlh-pg__arrow--prev { left: 16px; }
.tlh-pg__arrow--next { right: 16px; }

/* Zoom */
.tlh-pg__zoom {
    position: absolute;
    top: 16px;
    right: 16px;

    width: 40px;
    height: 40px;
    border-radius: 999px;

    border: 0;
    background: #fff;
    border: 1px solid #e4e4e4;

    cursor: pointer;

    display: grid;
    place-items: centre;

    font-size: 28px;
    line-height: 1;
    padding: 4px;
}

/* Counter */
.tlh-pg__counter {
    position: absolute;
    right: 16px;
    bottom: 16px;

    background: #fff;
    border: 1px solid #e4e4e4;

    font-weight: bold !important;
    padding: 10px 12px;
    border-radius: 10px;

    font-size: 16px;
    min-width: 80px;
    text-align: center;
}

/* =========================
   Modal
========================= */

.tlh-pg-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 999999;
}

.tlh-pg-modal.is-open {
    display: block;
}

.tlh-pg-modal__backdrop {
    position: absolute;
    inset: 0;
    background: #2B2B2B;
}

.tlh-pg-modal__content {
    position: relative;
    width: min(1200px, calc(100% - 56px));
    height: min(calc(100% - 56px));
    margin: 28px auto;

    display: grid;
    grid-template-rows: 1fr auto;
    gap: 12px;

    z-index: 2;
}

.tlh-pg-modal__image {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    display: block;
    place-items: centre;
}

.tlh-pg-modal__image img {
    height: 100%;
    object-fit: contain;

    display: block;
    border-radius: 10px;

    width: fit-content;
    margin: auto;
}

.tlh-pg-modal__close {
    position: absolute;
    top: 5px;
    right: 5px;

    width: 40px;
    height: 40px;
    border-radius: 999px;

    transform: translateX(-50%);

    border: 0;
    cursor: pointer;

    background: rgba(255, 255, 255, .92);

    font-size: 22px;
    line-height: 0;
    z-index: 5;

    padding-top: 0px;
}

/* Modal Arrows */
.tlh-pg-modal__arrow {
    position: absolute;
    top: 45%;
    transform: translateY(-50%);

    width: 40px;
    height: 40px;
    border-radius: 999px;

    border: 0;
    background: #fff;
    border: 1px solid #e4e4e4;

    cursor: pointer;

    display: grid;
    place-items: centre;

    z-index: 4;
}

.tlh-pg-modal__arrow span {
    font-size: 31px;
    line-height: 1;
}

.tlh-pg-modal__arrow--prev { left: 24px; }
.tlh-pg-modal__arrow--next { right: 24px; }

.tlh-pg-modal__counter {
    position: absolute;
    right: 16px;
    bottom: 86px;

    background: rgba(255,255,255,.9);
    padding: 10px 12px;
    border-radius: 10px;

    font-size: 16px;
    z-index: 4;
}

/* Modal Thumbs */
.tlh-pg-modal__thumbs {
    display: flex;
    gap: 10px;

    overflow-x: auto;

    padding: 10px 2px;
    justify-content: center;
}

.tlh-pg-modal__thumb {
    border: 0;
    padding: 0;
    background: transparent;

    border-radius: 10px;
    overflow: hidden;

    cursor: pointer;

    box-shadow: 0 0 0 1px rgba(255,255,255,.25);

    flex: 0 0 auto;
    width: 84px;
}

.tlh-pg-modal__thumb.is-active {
    box-shadow: 0 0 0 2px #C22035;
}

.tlh-pg-modal__thumb img {
    display: block;
    width: 100%;
    height: auto;
    background-color: #fff;
}

/* Hover states */
.tlh-pg-modal__arrow:hover > span, .tlh-pg-modal__close:hover > span, .tlh-pg__zoom:hover > span, .tlh-pg__arrow:hover > span {
    color: #fff;
}

.tlh-pg-modal__arrow:hover, .tlh-pg-modal__close:hover, .tlh-pg__zoom:hover, .tlh-pg__arrow:hover {
    background-color: #C22035;
    border-color: #9B0A21;
}

/* =========================
   Mobile
========================= */

@media (max-width: 860px) {
    .tlh-pg__wrap {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .tlh-pg__thumbs {
        order: 2;
        flex-direction: row;
        gap: 10px;

        overflow-x: auto;
        overflow-y: hidden;

        padding: 6px 2px;
        height: auto !important;
    }

    .tlh-pg__thumb {
        width: 90px;
        flex: 0 0 auto;
    }

    .tlh-pg__stage {
        min-height: 320px;
    }

    .tlh-pg__arrow {
        width: 46px;
        height: 46px;
    }

    .tlh-pg__zoom {
        width: 48px;
        height: 48px;
    }

    .tlh-pg-modal__content {
        width: calc(100% - 24px);
        height: calc(100% - 24px);
        margin: 12px auto;
    }

    .tlh-pg-modal__counter {
        bottom: 78px;
    }

    .tlh-pg__arrow span, .tlh-pg__zoom span {
        top: 3px !important;
        position: relative;
    }
}

/* =========================
   Desktop tweaks
========================= */

@media (min-width: 861px) {
    .tlh-pg__thumbs {
        --tlh-thumb-h: 86px;
        --tlh-thumb-gap: 12px;

        gap: var(--tlh-thumb-gap);

        overflow-y: auto;
        overflow-x: hidden;

        height: 700px !important;
        max-height: 700px !important;

        border-radius: 10px;
    }

    .tlh-pg__thumb img {
        width: 100%;
        height: 100% !important;
        object-fit: cover !important;
        display: block;
    }
}

/* =========================
   Scroll lock for modal
========================= */

html.tlh-pg-lock, body.tlh-pg-lock {
    overflow: hidden;
}

.tlh-pg__label {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10000;
    background-color: #F5D158;
    color: #000;
    border: 1px solid #D1AE37;
    border-radius: 6px;
    font-weight: bold;
    padding: 5px 10px;
    max-width: 200px;
    text-align: center;
}


.tlh-pg__image {
    position: relative;
}

/* =========================
   360 tour
========================= */

.tlh-pg__tourBtn {
    position: absolute;
    left: 20px;
    bottom: 20px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid #3d3d3d;
    border-radius: 10px;
    background: #222222;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.tlh-pg-tour-modal[hidden] {
    display: none !important;
}

.tlh-pg-tour-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
}

.tlh-pg-tour-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.tlh-pg-tour-modal__content {
    position: absolute;
    inset: 20px;
    background: #000;
    border-radius: 16px;
    max-height: 900px;
    max-width: 1300px;
    margin: auto;
    overflow: hidden;
}

.tlh-pg-tour-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.tlh-pg-tour-modal__frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
}

html.tlh-pg-tour-open,
body.tlh-pg-tour-open {
    overflow: hidden;
}

@media (max-width: 767px) {
    .tlh-pg__tourBtn {
        left: 12px;
        bottom: 12px;
        min-height: 40px;
        padding: 0 14px;
        font-size: 14px;
    }

    .tlh-pg-tour-modal__content {
        inset: 0;
        border-radius: 0;
    }
}