/*
Theme Name: Flatsome Child
Description: This is a child theme for Flatsome Theme
Author: UX Themes
Template: flatsome
Version: 3.0
*/

/*************** ADD CUSTOM CSS HERE.   ***************/


/* ==========================================
   THUẬN PHÁT - POPUP BÁO GIÁ CAO CẤP
   Version 2.0
========================================== */

html .tpq-dialog {
    position: fixed !important;
    inset: 0 !important;
    box-sizing: border-box !important;
    width: min(94vw, 680px) !important;
    max-width: 680px !important;
    min-width: 0 !important;
    max-height: min(90dvh, 850px) !important;
    height: auto !important;
    margin: auto !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 18px !important;
    background: #fff !important;
    color: #202b46;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    box-shadow: 0 24px 80px rgba(8, 20, 50, .25) !important;
    z-index: 999999 !important;
}

html .tpq-dialog:not([open]) {
    display: none !important;
}

html .tpq-dialog::backdrop {
    background: rgba(10, 20, 45, .7);
    backdrop-filter: blur(4px);
}

/* Header */
.tpq-dialog > .tpq__head {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 23px 28px 18px;
    background: #fff;
    border-bottom: 1px solid #e9edf5;
}

.tpq-dialog .tpq__head h2 {
    font-size: 23px;
    font-weight: 800;
    line-height: 1.3;
    color: #192d71;
    margin: 0;
}

.tpq-dialog .tpq__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f0f2f7;
    color: #34405b;
    font-size: 25px;
    font-weight: 400;
    cursor: pointer;
    box-shadow: none;
}

.tpq-dialog .tpq__close:hover {
    background: #fce8ea;
    color: #d91f2b;
}

/* Danh sách sản phẩm */
.tpq-dialog > .tpq__count {
    margin: 20px 28px 12px;
    padding: 0;
    font-size: 14px;
    font-weight: 700;
    color: #273a70;
}

.tpq-dialog > .tpq__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0 28px 22px !important;
    padding: 0 !important;
    list-style: none !important;
}

.tpq-dialog .tpq__item {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px;
    width: 100%;
    min-height: 60px;
    margin: 0 !important;
    padding: 13px 16px !important;
    background: #f5f7fc;
    border: 1px solid #e5eaf5;
    border-radius: 10px;
    box-sizing: border-box;
}

.tpq-dialog .tpq__item a {
    flex: 1 1 auto;
    min-width: 0;
    width: auto !important;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 650;
    color: #20377d !important;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.tpq-dialog .tpq__remove {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: auto !important;
    min-height: 34px;
    margin: 0;
    padding: 6px 12px !important;
    background: #fff;
    border: 1px solid #f2cdd2;
    border-radius: 7px;
    color: #d52030;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    cursor: pointer;
    box-shadow: none;
}

.tpq-dialog .tpq__remove:hover {
    background: #d91f2b;
    color: #fff;
}

/* Form */
.tpq-dialog #tpq-form-source {
    display: block !important;
    margin: 0;
    padding: 22px 28px 28px;
    border-top: 1px solid #edf0f6;
}

.tpq-dialog .wpcf7,
.tpq-dialog .wpcf7 form {
    width: 100%;
    max-width: 100%;
    margin: 0;
}

.tpq-dialog .tpq-cf7-fields {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    column-gap: 16px;
    row-gap: 14px;
}

.tpq-dialog .tpq__field {
    min-width: 0;
    margin: 0 !important;
}

.tpq-dialog .tpq__field label {
    display: block;
    margin: 0 0 7px;
    color: #26334f;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
}

.tpq-dialog .tpq__field .wpcf7-form-control-wrap {
    display: block;
    width: 100%;
}

/* Trường sản phẩm vẫn gửi dữ liệu CF7 nhưng không chiếm chỗ */
.tpq-dialog .tpq__field:has([name="tp-products"]) {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip-path: inset(50%) !important;
    white-space: nowrap;
}

/* Ghi chú chiếm cả 2 cột */
.tpq-dialog .tpq__field:has([name="your-message"]) {
    grid-column: 1 / -1;
}

.tpq-dialog input[type="text"],
.tpq-dialog input[type="email"],
.tpq-dialog input[type="tel"],
.tpq-dialog textarea {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 11px 13px !important;
    border: 1px solid #dfe5f0 !important;
    border-radius: 9px !important;
    background: #fff !important;
    color: #202b46 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    box-shadow: none !important;
    outline: none;
}

.tpq-dialog input[type="text"],
.tpq-dialog input[type="email"],
.tpq-dialog input[type="tel"] {
    height: 44px !important;
    min-height: 44px !important;
}

.tpq-dialog textarea[name="your-message"] {
    height: 90px !important;
    min-height: 90px !important;
    resize: vertical;
}

.tpq-dialog input:focus,
.tpq-dialog textarea:focus {
    border-color: #2949ad !important;
    box-shadow: 0 0 0 3px rgba(41,73,173,.09) !important;
}

.tpq-dialog input::placeholder,
.tpq-dialog textarea::placeholder {
    color: #99a3b6;
}

/* Submit */
.tpq-dialog .tpq__submit {
    grid-column: 1 / -1;
    margin-top: 5px;
}

.tpq-dialog .tpq__submit input[type="submit"] {
    display: block;
    width: 100% !important;
    min-height: 48px;
    margin: 0;
    padding: 13px 20px;
    border: 0;
    border-radius: 10px;
    background: #d91f2b;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.4;
    text-align: center;
    cursor: pointer;
    box-shadow: none;
    transition: background .2s ease;
}

.tpq-dialog .tpq__submit input[type="submit"]:hover {
    background: #b91824;
}

.tpq-dialog .tpq__submit input[type="submit"]:disabled {
    opacity: .55;
    cursor: not-allowed;
}

/* Thông báo CF7 */
.tpq-dialog .wpcf7-response-output {
    margin: 15px 0 0 !important;
    padding: 12px !important;
    border-radius: 8px;
    font-size: 13px;
}

.tpq-dialog .wpcf7-not-valid-tip {
    margin-top: 5px;
    font-size: 12px;
}

/* Mobile */
@media (max-width: 600px) {
    html .tpq-dialog {
        width: calc(100vw - 20px) !important;
        max-height: 92dvh !important;
        border-radius: 14px !important;
    }

    .tpq-dialog > .tpq__head {
        padding: 17px 18px;
    }

    .tpq-dialog .tpq__head h2 {
        font-size: 19px;
    }

    .tpq-dialog > .tpq__count {
        margin: 16px 18px 10px;
    }

    .tpq-dialog > .tpq__list {
        margin: 0 18px 18px !important;
    }

    .tpq-dialog #tpq-form-source {
        padding: 18px;
    }

    .tpq-dialog .tpq-cf7-fields {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .tpq-dialog .tpq__field:has([name="your-message"]),
    .tpq-dialog .tpq__submit {
        grid-column: 1;
    }
}


@media only screen and (max-width: 48em) {
	/*************** ADD MOBILE ONLY CSS HERE  ***************/


}