/*
 * Theme tweaks styles: hidden H1, Zalo contact popup, showroom / online contact popups.
 * Moved from Woodmart Theme Settings > Custom CSS (shoptest) into the plugin.
 */

/* Search icon in header: 30px (prod Theme Settings still says 42px) */
body .wd-info-box.search-icon {
	width: 30px;
	height: 30px;
}

.hidden-site-title {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
/* Chỉ item Zalo */
.zalo-contact-item {
    position: relative;
}


/* Popup mới - hoàn toàn độc lập với content gốc */
.zalo-hover-popup {
    position: absolute;

    right: calc(100% + 15px);
    top: 50%;

    width: 290px;
    padding: 12px;

    background: #fff;
    border-radius: 10px;

    box-shadow: 0 4px 15px rgba(0,0,0,.22);

    transform: translate(10px, -50%);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity .2s ease,
        transform .2s ease,
        visibility .2s;

    z-index: 99999;
}


/* Hover Zalo -> hiện popup */
.zalo-contact-item:hover .zalo-hover-popup {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transform: translate(0, -50%);
}


/* vùng nối giữa popup và item */
.zalo-hover-popup::after {
    content: "";
    position: absolute;

    top: 0;
    right: -20px;

    width: 20px;
    height: 100%;
}


/* mũi tên */
.zalo-hover-popup::before {
    content: "";
    position: absolute;

    right: -8px;
    top: 50%;

    transform: translateY(-50%);

    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 8px solid #fff;
}


/* 2 nút */
.zalo-popup-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.zalo-popup-btn {
    display: flex;
    align-items: center;

    min-height: 64px;
    padding: 8px 15px;

    border-radius: 9px;

    color: #fff !important;
    text-decoration: none !important;

    transition: transform .2s ease;
}


/* Cá nhân */
.zalo-personal {
    background: #ed1717;
}


/* Doanh nghiệp */
.zalo-business {
    background: #2949bd;
}


/* Zalo icon trong button */
.zalo-small-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;

    margin-right: 10px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #fff;
    border-radius: 50%;
}

.zalo-small-icon img {
    width: 30px !important;
    height: 30px !important;
    object-fit: contain;
}


/* Text */
.zalo-popup-text {
    flex: 1;
}

.zalo-popup-btn small {
    display: block;

    color: #fff;
    font-size: 13px;
    line-height: 1.2;
    text-align: center;
}

.zalo-popup-btn strong {
    display: block;

    color: #fff;
    font-size: 13px;
    line-height: 1.3;
    white-space: nowrap;
}


/* hover nút */
.zalo-popup-btn:hover {
    transform: translateX(-3px);
}
.custom-showroom-popup {
    position: fixed;
    inset: 0;
    z-index: 999999;

    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition: opacity .25s ease, visibility .25s ease;
}

.custom-showroom-popup.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Overlay */
.showroom-popup-overlay {
    position: absolute;
    inset: 0;

    background: rgba(0, 0, 0, .45);
}

/* Popup */
.showroom-popup-box {
    position: relative;
    z-index: 2;

    width: min(900px, calc(100% - 30px));

    background: #fff;
    border-radius: 12px;
    padding: 25px;

    transform: translateY(15px) scale(.98);
    transition: transform .25s ease;
}

.custom-showroom-popup.is-open .showroom-popup-box {
    transform: translateY(0) scale(1);
}

/* Close */
.showroom-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;

    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 50%;

    background: #eee;

    font-size: 24px;
    line-height: 1;

    cursor: pointer;

    z-index: 10;
}
.custom-online-contact-popup {
    position: fixed;
    inset: 0;
    z-index: 999999;

    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition: opacity .25s ease, visibility .25s ease;
}

.custom-online-contact-popup.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.online-contact-popup-overlay {
    position: absolute;
    inset: 0;

    background: rgba(0, 0, 0, .45);
}

.online-contact-popup-box {
    position: relative;
    z-index: 2;

    width: min(1000px, calc(100% - 30px));
    max-height: 85vh;
    overflow-y: auto;

    padding: 25px;

    background: #fff;
    border-radius: 12px;

    transform: translateY(15px) scale(.98);
    transition: transform .25s ease;
}

.custom-online-contact-popup.is-open .online-contact-popup-box {
    transform: translateY(0) scale(1);
}

.online-contact-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;

    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;
    border: 0;
    border-radius: 50%;

    background: #eee;

    font-size: 24px;
    line-height: 1;

    cursor: pointer;

    z-index: 20;
}
