body.popupOpen{
    overflow:hidden;
}

.background_overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.48);
    backdrop-filter:blur(3px);
    -webkit-backdrop-filter:blur(3px);
    z-index:9998;
    display:none;
}

#overlay_form_tv{
    position:fixed;
    inset:0;
    z-index:9999;
    display:none;
    padding:20px;
    overflow-y:auto;
    overflow-x:hidden;
}

.pop_box{
    width:100%;
    min-height:100%;
    display:flex;
    align-items:center;
    justify-content:center;
}

.quotePopup{
    position:relative;
    width:100%;
    max-width:620px;
    background:#fff;
    border-radius:14px;
    overflow:hidden;
    box-shadow:
        0 20px 60px rgba(0,0,0,.18),
        0 5px 20px rgba(0,0,0,.08);
    animation:quotePopupShow .3s ease;
}

.quoteHeader{
    position:relative;
    display:flex;
    align-items:center;
    padding:26px 48px 22px 28px;
}

.quoteHeaderIcon{
    flex:0 0 48px;
    width:48px;
    height:48px;
    display:flex;
    align-items:center;
    justify-content:center;
    margin-right:14px;
    border-radius:50%;
    background:#0b7fc3;
    color:#fff;
    font-size:21px;
}


.quoteHeaderText{
    min-width:0;
}


.quoteHeaderText h2{
    margin:0 0 3px;
    color:#222;
    font-size:22px;
    line-height:1.3;
    font-weight:600;

}


.quoteHeaderText p{
    margin:0;
    color:#666;
    font-size:14px;
    line-height:1.5;
}

#close{
    position:absolute;
    top:19px;
    right:19px;
    width:28px;
    height:28px;
    border-radius:50%;
    background:transparent;
    cursor:pointer;
    transition:.25s;
}

#close:hover{
    background:#f2f2f2;
    transform:rotate(90deg);
}


#close:before,
#close:after{
    content:"";
    position:absolute;
    left:50%;
    top:50%;
    width:16px;
    height:2px;
    background:#555;
    border-radius:2px;
}


#close:before{

    transform:translate(-50%,-50%) rotate(45deg);

}


#close:after{

    transform:translate(-50%,-50%) rotate(-45deg);

}

.quoteForm{

    padding:0 28px 25px;

}

.customerField{

    margin-bottom:12px;

}


.fieldLabel{
    display:block;
    margin:0 0 9px;
    color:#333;
    font-size:16px;
    font-weight:500;

}

.fieldLabel span{
    color:#e53935;
    margin-left:2px;
}

.customerTypes{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:14px;

}


.customerType{

    display:block;

    position:relative;

    cursor:pointer;

}

.customerType > input{

    position:absolute;

    opacity:0;

    pointer-events:none;

}

.customerCard{

    position:relative;

    height:84px;

    display:flex;

    flex-direction:column;

    align-items:center;
    justify-content:center;

    background:#fff;

    border:1px solid #e2e2e2;

    border-radius:6px;

    transition:.25s;

}

.customerRadio{

    position:absolute;

    top:7px;
    right:7px;

    width:13px;
    height:13px;

    border:1px solid #d1d1d1;

    border-radius:50%;

    background:#fff;

}

.customerIcon{

    width:43px;
    height:43px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    margin-bottom:5px;
    color:#fff;
    font-size:20px;

}

.customerIconHome{

    background:#1689d0;

}

.customerIconArchitect{

    background:#58c999;

}

.customerIconContractor{

    background:#e99b2c;

}

.customerName{
    color:#222;
    font-size:15px;
    line-height:1;
    font-weight:600;

}

.customerType > input:checked + .customerCard{

    border-color:#1689d0;

    box-shadow:
        0 2px 0 #1689d0,
        0 4px 12px rgba(22,137,208,.10);

}


.customerType:nth-child(2) > input:checked + .customerCard{

    border-color:#58c999;

    box-shadow:
        0 2px 0 #58c999,
        0 4px 12px rgba(88,201,153,.10);

}


.customerType:nth-child(3) > input:checked + .customerCard{

    border-color:#e99b2c;

    box-shadow:
        0 2px 0 #e99b2c,
        0 4px 12px rgba(233,155,44,.10);

}


.customerType > input:checked + .customerCard .customerRadio{

    border-color:#1689d0;

    background:#1689d0;

}

.customerType > input:checked + .customerCard .customerRadio:after{

    content:"";

    position:absolute;

    width:5px;
    height:5px;

    top:3px;
    left:3px;

    border-radius:50%;

    background:#fff;

}

.customerTypeError{

    margin-top:5px;

    color:#e53935;

    font-size:11px;

}

.quoteFields{

    display:grid;

    grid-template-columns:repeat(3,1fr);

    gap:14px;

    margin-top:12px;

}


.quoteInput{

    position:relative;

    height:38px;

    display:flex;
    align-items:center;

    border:1px solid #ddd;

    border-radius:6px;

    background:#fff;

    transition:.25s;

}


.quoteInput > i{

    flex:0 0 32px;

    width:32px;

    text-align:center;

    color:#aaa;

    font-size:12px;

}


.quoteInput input,
.quoteInput select{
    width:100%;
    height:100%;
    padding:0 9px 0 0;
    border:0;
    outline:0;
    background:transparent;
    color:#555;
    font-size:12px;

}


.quoteInput input::placeholder{
    color:#999;
}
.quoteInput:focus-within{
    border-color:#1689d0;
    box-shadow:0 0 0 2px rgba(22,137,208,.08);
}

.quoteSelect select{

    appearance:none;
    -webkit-appearance:none;

    cursor:pointer;

    padding-right:20px;

}


.quoteSelect .selectArrow{

    position:absolute;

    right:10px;

    width:auto;

    color:#aaa;

    font-size:9px;

    pointer-events:none;

}

.quoteMessage{

    margin-top:11px;

}


.quoteMessage textarea{

    display:block;

    width:100%;

    height:72px;

    padding:13px 14px;

    resize:none;

    border:1px solid #ddd;

    border-radius:6px;

    outline:none;

    background:#fff;

    color:#555;

    font-family:inherit;

    font-size:12px;

    line-height:1.5;

    box-sizing:border-box;

    transition:.25s;

}


.quoteMessage textarea::placeholder{

    color:#999;

}


.quoteMessage textarea:focus{

    border-color:#1689d0;

    box-shadow:
        0 0 0 2px rgba(22,137,208,.08);

}

.quoteSubmit{

    position:relative;

    display:flex;

    justify-content:center;

    margin-top:19px;

}


#pop_sent{
    width:208px;
    height:38px;
    border:0;
    border-radius:22px;
    background:#c6c6c6;
    color:#fff;
    font-family:inherit;
    font-size:17px;
    font-weight:700;
    cursor:pointer;
    transition:.25s;
}


#pop_sent {
    background: #ccc;
    color: #fff;
    cursor: not-allowed;
    opacity: 0.8;
    transition: all 0.2s ease;
}

#pop_sent.is-ready {
    background: #28a745;
    color: #fff;
    cursor: pointer;
    opacity: 1;
}


#pop_sent:disabled{
    opacity:.7;
    cursor:wait;

}

.pop_fr input.error,
.pop_fr textarea.error,
.quoteInput.error{

    border-color:#e53935;

}


.inputError{

    margin:4px 0 8px;

    color:#e53935;

    font-size:11px;

}

.popupSuccess{

    padding:45px 25px;

    text-align:center;

}


.popupSuccessIcon{

    width:65px;
    height:65px;

    margin:0 auto 18px;

    display:flex;

    align-items:center;
    justify-content:center;

    border-radius:50%;

    background:#15b95c;

    color:#fff;

    font-size:32px;

    font-weight:700;

}


.popupSuccess h3{

    margin:0 0 10px;

    color:#222;

    font-size:22px;

}


.popupSuccess p{

    margin:0;

    color:#666;

    font-size:13px;

    line-height:1.7;

}


.popupCloseBtn{

    margin-top:22px;

    height:40px;

    padding:0 30px;

    border:0;

    border-radius:20px;

    background:#1689d0;

    color:#fff;

    cursor:pointer;

    font-size:12px;

    font-weight:600;

}

@keyframes quotePopupShow{

    from{

        opacity:0;

        transform:translateY(25px) scale(.97);

    }

    to{

        opacity:1;

        transform:translateY(0) scale(1);

    }

}

@media(max-width:700px){

    #overlay_form_tv{
        padding:15px;

    }


    .quotePopup{

        max-width:520px;

    }


    .quoteHeader{

        padding:22px 40px 18px 22px;

    }


    .quoteForm{

        padding:0 22px 22px;

    }

}

@media(max-width:560px){

    #overlay_form_tv{

        padding:10px;

    }


    .quoteHeader{

        padding:20px 38px 16px 18px;

    }


    .quoteHeaderIcon{

        width:42px;
        height:42px;

        flex-basis:42px;

        font-size:18px;

        margin-right:11px;

    }


    .quoteHeaderText h2{
        font-size:20px;
    }


    .quoteHeaderText p{
        font-size:13px;
    }


    .quoteForm{

        padding:0 18px 20px;

    }


    .customerTypes{

        grid-template-columns:repeat(3,1fr);

        gap:8px;

    }


    .customerCard{
        height:55px;
        flex-direction:row;
        justify-content:flex-start;
        padding-left:43px;

    }


    .customerIcon{
        position:absolute;
        left:5px;
        width:25px;
        height:25px;
        margin:0;
        font-size:12px;

    }


    .customerRadio{
        right:-4px;
        top:0%;
        transform:translateY(-50%);
    }
    .quoteFields{
        grid-template-columns:1fr;
        gap:8px;

    }


    .quoteInput{

        height:42px;

    }


    .quoteMessage textarea{

        height:90px;

    }


    #pop_sent{

        width:100%;

    }


    .quoteAvatar{

        display:none;

    }

}

@media(max-width:380px){
    .quoteHeaderText p{
        display:none;
    }
}

.quoteInput {
    position: relative;
}

.quoteInput.hasError input,
.quoteInput.hasError select {
    border-color: #e53935;
}

.quoteInput .fieldError {
    position: absolute;

    left: 40px;
    right: 10px;
    top: 50%;

    transform: translateY(-50%);

    color: #e53935;

    font-size: 12px;

    line-height: 1.3;

    background: #fff;

    pointer-events: none;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;

    z-index: 5;
}


.quoteInput.hasError input::placeholder {
    color: transparent;
}


.quoteInput.hasError select {
    color: #e53935;
}


/* Khi chưa chọn tỉnh */

.quoteInput.hasError select option:first-child {
    color: #e53935;
}

.customerTypes {
    position: relative;
}


.customerTypes.hasError {
    border-radius: 8px;
}

.customerTypeError {
    position: absolute;

    left: 0;
    bottom: -18px;

    color: #e53935;

    font-size: 12px;

    line-height: 16px;

    pointer-events: none;
}
@media (max-width: 767px) {

    .quoteInput input,
    .quoteInput select,
    .quoteMessage textarea {
        font-size: 16px !important;
        -webkit-text-size-adjust: 100%;
    }

    /* Không cho trình duyệt tự điều chỉnh kích thước chữ */
    #overlay_form_tv,
    #overlay_form_tv input,
    #overlay_form_tv select,
    #overlay_form_tv textarea {
        -webkit-text-size-adjust: 100%;
    }

    /* Tránh transform gây vấn đề viewport trên mobile */
    .quotePopup {
        animation: none;
        transform: none !important;
    }

}