/* Floating CTA: consistent dimensions, alignment and spacing. */
.ttgfc-floating{
    position:fixed!important;
    z-index:99990;
    left:50%!important;
    right:auto!important;
    bottom:var(--ttgfc-bottom,12px)!important;
    transform:translateX(-50%)!important;
    display:flex!important;
    flex-flow:row nowrap!important;
    align-items:stretch!important;
    justify-content:center!important;
    gap:var(--ttgfc-gap,8px)!important;
    width:max-content;
    max-width:calc(100vw - 20px);
    margin:0!important;
    padding:0!important;
    box-sizing:border-box;
}
.ttgfc-floating .ttgfc-btn{
    appearance:none;
    box-sizing:border-box!important;
    border:0!important;
    border-radius:10px 10px 0 0!important;
    width:var(--ttgfc-width,132px)!important;
    min-width:var(--ttgfc-width,132px)!important;
    max-width:var(--ttgfc-width,132px)!important;
    min-height:var(--ttgfc-height,44px)!important;
    height:var(--ttgfc-height,44px)!important;
    margin:0!important;
    padding:0 12px!important;
    display:inline-flex!important;
    flex:0 0 var(--ttgfc-width,132px)!important;
    align-items:center!important;
    justify-content:center!important;
    gap:7px!important;
    background:var(--ttgfc-price)!important;
    color:var(--ttgfc-text)!important;
    font:700 var(--ttgfc-font,14px)/1.1 Arial,sans-serif!important;
    text-decoration:none!important;
    text-align:center!important;
    white-space:nowrap;
    line-height:1.1!important;
    box-shadow:0 3px 12px rgba(0,0,0,.24);
    cursor:pointer;
    vertical-align:middle!important;
    transition:transform .18s ease,filter .18s ease,box-shadow .18s ease;
}
.ttgfc-floating .ttgfc-btn:hover{transform:translateY(-2px);filter:brightness(1.06);box-shadow:0 5px 16px rgba(0,0,0,.28);color:var(--ttgfc-text)!important}
.ttgfc-floating .ttgfc-price{background:var(--ttgfc-price)!important}
.ttgfc-floating .ttgfc-zalo{background:var(--ttgfc-zalo)!important}
.ttgfc-floating .ttgfc-call{background:var(--ttgfc-call)!important}
.ttgfc-icon-box{width:20px!important;height:20px!important;min-width:20px!important;max-width:20px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;flex:0 0 20px!important;line-height:1!important;font-size:17px;font-weight:800;overflow:hidden}
.ttgfc-custom-icon{display:block!important;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;object-position:center!important;margin:0!important;padding:0!important;border:0!important;box-shadow:none!important}
.ttgfc-icon-fallback{font-family:Arial,sans-serif}
.ttgfc-overlay{position:fixed;inset:0;z-index:999999;background:rgba(0,0,0,.72);display:none;align-items:center;justify-content:center;padding:18px;box-sizing:border-box;overflow-y:auto}
.ttgfc-overlay.is-open{display:flex}
.ttgfc-modal{position:relative;background:#fff;color:#222;width:100%;max-width:var(--ttgfc-popup-width,460px);max-height:calc(100vh - 36px);overflow-y:auto;box-sizing:border-box;padding:24px 22px 26px;border-radius:20px;box-shadow:0 12px 40px rgba(0,0,0,.3)}
/* Close button is anchored to the popup form (modal), not to the banner image.
   Reset theme button styles so the X stays exactly centered in its black circle. */
.ttgfc-modal{position:relative!important}
.ttgfc-modal > .ttgfc-close{
    position:absolute!important;
    top:5px!important;
    right:5px!important;
    left:auto!important;
    bottom:auto!important;
    transform:none!important;
    box-sizing:border-box!important;
    appearance:none!important;
    -webkit-appearance:none!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:39px!important;
    height:39px!important;
    min-width:39px!important;
    min-height:39px!important;
    max-width:39px!important;
    max-height:39px!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:20px!important;
    background:#171717!important;
    color:#fff!important;
    font-family:Arial,sans-serif!important;
    font-size:27px!important;
    font-weight:400!important;
    line-height:1!important;
    text-align:center!important;
    text-indent:0!important;
    box-shadow:none!important;
    cursor:pointer!important;
    z-index:20!important;
}
.ttgfc-banner{margin:-24px -22px 18px}
.ttgfc-banner img{display:block;width:100%;height:auto}
.ttgfc-modal h2{text-align:center;font-size:18px;line-height:1.35;margin:0 0 18px;font-weight:700;color:#315465}
.ttgfc-form-wrap .wpcf7 form{margin:0}
.ttgfc-form-wrap .wpcf7 p{margin:0 0 12px}
.ttgfc-form-wrap .wpcf7 input:not([type=submit]):not([type=checkbox]),.ttgfc-form-wrap .wpcf7 select,.ttgfc-form-wrap .wpcf7 textarea{width:100%;max-width:100%;box-sizing:border-box;min-height:42px;padding:10px 12px;border:1px solid #aeb7bf;border-radius:3px;background:#fff;color:#333}
.ttgfc-form-wrap .wpcf7 input[type=submit]{width:100%;min-height:44px;border:0;border-radius:4px;background:#bd1115;color:#fff;font-weight:700;cursor:pointer}
.ttgfc-form-wrap .wpcf7 .wpcf7-spinner{display:block;margin:8px auto}
.ttgfc-form-wrap .wpcf7 .wpcf7-response-output{margin:12px 0 0;padding:10px;font-size:13px}
.ttgfc-no-scroll{overflow:hidden!important}
@media(max-width:600px){
    .ttgfc-floating{bottom:var(--ttgfc-mobile-bottom,12px)!important;gap:var(--ttgfc-gap,8px)!important;width:max-content!important;max-width:calc(100vw - 16px)!important}
    /* Keep the admin-configured width, height and font size on mobile too.
       Buttons shrink equally only when the configured total width exceeds the viewport. */
    .ttgfc-floating .ttgfc-btn{flex:1 1 var(--ttgfc-width,132px)!important;min-width:0!important;max-width:var(--ttgfc-width,132px)!important;height:var(--ttgfc-height,44px)!important;min-height:var(--ttgfc-height,44px)!important;padding:0 5px!important;font-size:var(--ttgfc-font,14px)!important;gap:5px!important}
    .ttgfc-modal{padding:20px 16px 22px;max-height:calc(100vh - 24px);border-radius:20px}
    .ttgfc-banner{margin:-20px -16px 15px}
    .ttgfc-modal h2{font-size:16px}
}
@media(prefers-reduced-motion:reduce){.ttgfc-floating .ttgfc-btn{transition:none}}
