/* Tách từ templates/base.html — giữ nguyên thứ tự cascade qua <link> tại vị trí cũ. */
.test-drive-modal{
    position:fixed;
    inset:0;
    z-index:9999;
    display:none;
    align-items:center;
    justify-content:center;
    padding:18px;
}
.test-drive-modal.is-open{display:flex;}
.test-drive-modal-backdrop{
    position:absolute;
    inset:0;
    background:rgba(12,18,28,.58);
    backdrop-filter:blur(3px);
    -webkit-backdrop-filter:blur(3px);
}
.test-drive-modal-dialog{
    position:relative;
    z-index:1;
    width:min(800px,100%);
    max-height:min(92vh,900px);
    overflow:auto;
    background:#fff;
    border-radius:18px;
    box-shadow:0 24px 70px rgba(0,0,0,.24);
    -webkit-overflow-scrolling:touch;
}
.test-drive-modal-close{
    position:absolute;
    z-index:4;
    top:16px;
    right:16px;
    width:42px;
    height:42px;
    border:1px solid rgba(255,255,255,.8);
    border-radius:50%;
    background:rgba(0,0,0,.26);
    color:#fff;
    font-size:32px;
    line-height:36px;
    cursor:pointer;
}
.test-drive-modal-hero{
    position:relative;
    width:100%;
    overflow:hidden;
    background:#17334d;
}
.test-drive-modal-hero img{
    display:block;
    width:100%;
    height:auto;
    object-fit:contain;
}
.test-drive-modal-hero::after{
    content:"";
    position:absolute;
    inset:0;
    background:linear-gradient(180deg,rgba(0,0,0,.08),rgba(0,0,0,.62));
}
.test-drive-modal-hero-overlay{
    position:absolute;
    z-index:2;
    left:8%;
    right:8%;
    bottom:34px;
    display:flex;
    flex-direction:column;
    gap:9px;
    color:#fff;
    text-align:center;
}
.test-drive-modal-hero-overlay strong{
    font-size:clamp(25px,4vw,42px);
    line-height:1.05;
    font-weight:800;
}
.test-drive-modal-hero-overlay span{
    font-size:17px;
    line-height:1.4;
}
.test-drive-modal-body{
    padding:34px 38px 30px;
}
.test-drive-modal-body h2{
    margin:0 0 24px;
    color:#00529c;
    font-size:30px;
    line-height:1.1;
    text-align:center;
    font-weight:800;
}
.test-drive-modal-form{display:grid;gap:0;}
.test-drive-modal-field{
    position:relative;
    display:flex;
    align-items:center;
    min-height:62px;
    border-bottom:1px solid #cfd3d8;
}
.test-drive-modal-icon{
    flex:0 0 42px;
    width:42px;
    height:42px;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#00529c;
    font-size:24px;
    text-align:center;
}
.test-drive-modal-icon svg{width:24px;height:24px;display:block;}
.test-drive-modal-car-icon img{
    display:block;
    width:42px;
    height:27px;
    object-fit:contain;
}
.test-drive-modal-field input,
.test-drive-modal-field select,
.test-drive-modal-field textarea{
    width:100%;
    min-width:0;
    border:0;
    outline:0;
    background:transparent;
    color:#1c2025;
    font:inherit;
    font-size:17px;
}
.test-drive-modal-field input,
.test-drive-modal-field select{height:60px;}
.test-drive-modal-field textarea{
    min-height:82px;
    padding:16px 0 10px;
    resize:vertical;
}
.test-drive-modal-field select{appearance:auto;}
.test-drive-modal-consent{
    display:flex;
    align-items:flex-start;
    gap:10px;
    margin:24px 0 22px;
    color:#5d6672;
    font-size:13px;
    line-height:1.55;
    cursor:pointer;
}
.test-drive-modal-consent input{
    flex:0 0 auto;
    width:20px;
    height:20px;
    margin:1px 0 0;
    accent-color:#00529c;
}
.test-drive-modal-consent strong{color:#00529c;}
.test-drive-modal-submit{
    width:100%;
    min-height:58px;
    border:0;
    border-radius:10px;
    background:#00529c;
    color:#fff;
    font-size:17px;
    font-weight:800;
    cursor:pointer;
    box-shadow:0 8px 20px rgba(0,82,156,.18);
}
.test-drive-modal-submit span{font-size:28px;vertical-align:-2px;margin-left:8px;}
.test-drive-modal-submit:hover{background:#00529c;}

.test-drive-modal-success{
    text-align:center;
    padding:18px 6px 4px;
}
.test-drive-modal-success[hidden]{display:none;}
.test-drive-modal-success h2{
    margin:0 0 9px;color:#00529c;font-size:26px;line-height:1.15;font-weight:800;
}
.test-drive-modal-success p{margin:0 0 6px;color:#4f5965;font-size:15px;line-height:1.5;}
.test-drive-modal-success strong{display:block;color:#1c2025;font-size:15px;line-height:1.5;}
.test-drive-modal-success-close{
    margin-top:20px;min-width:130px;min-height:44px;border:0;border-radius:7px;
    background:#00529c;color:#fff;font-size:13px;font-weight:800;cursor:pointer;
}
body.test-drive-modal-open{overflow:hidden;}

@media(max-width:767px){
    .test-drive-modal{padding:16px;}
    .test-drive-modal-dialog{
        width:100%;
        max-height:94vh;
        border-radius:16px;
    }
    .test-drive-modal-close{
        top:10px;
        right:10px;
        width:38px;
        height:38px;
        font-size:29px;
        line-height:32px;
    }
    .test-drive-modal-hero{height:auto;}
    .test-drive-modal-hero-overlay{
        left:18px;
        right:18px;
        bottom:22px;
        gap:7px;
    }
    .test-drive-modal-hero-overlay strong{font-size:18px;white-space:nowrap;letter-spacing:-.02em;}
    .test-drive-modal-hero-overlay span{font-size:14px;line-height:1.35;}
    .test-drive-modal-body{padding:26px 18px 20px;}
    .test-drive-modal-body h2{font-size:26px;margin-bottom:18px;}
    .test-drive-modal-field{min-height:56px;}
    .test-drive-modal-icon{flex-basis:38px;width:38px;height:38px;font-size:21px;}
    .test-drive-modal-icon svg{width:22px;height:22px;}
    .test-drive-modal-field input,
    .test-drive-modal-field select{height:54px;font-size:16px;}
    .test-drive-modal-field textarea{font-size:16px;min-height:72px;}
    .test-drive-modal-consent{font-size:12px;margin:20px 0 18px;}
    .test-drive-modal-submit{min-height:54px;font-size:15px;}
}

@media(max-width:399px){
    .test-drive-modal{padding:8px;}
    .test-drive-modal-dialog{max-height:96vh;border-radius:13px;}
    .test-drive-modal-hero{height:auto;}
    .test-drive-modal-hero-overlay strong{font-size:16px;white-space:nowrap;letter-spacing:-.025em;}
    .test-drive-modal-hero-overlay span{font-size:12px;}
    .test-drive-modal-body{padding:22px 14px 16px;}
    .test-drive-modal-body h2{font-size:23px;}
    .test-drive-modal-field input,
    .test-drive-modal-field select,
    .test-drive-modal-field textarea{font-size:15px;}
    .test-drive-modal-consent{font-size:11px;}
    .test-drive-modal-submit{font-size:14px;}
}
