/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}
* {
    -webkit-tap-highlight-color: transparent;
}

/* Animation variables */
:root {
    --primaryTypeface: "DM Sans", sans-serif;
    --secondaryTypeface: "system-ui";
    --animate-duration: 0.5s; /* Reduced from 0.8s (25% faster) */
    --animate-delay: 0.05s; /* Reduced from 0.2s (25% faster) */

    /* Surface color variables */
   
    --surface-primary-1: #fff;
    --surface-primary-2: #F4F6F9;
    --surface-accent-1: #0499FD;
    --surface-tertiary-1: #E4F5FE;
    --surface-tertiary-2: #0763D3;
    --surface-tertiary-4: #05317B;
    --surface-secondary-3: #000049;
    

   /* functional colors */
    --functional-red: #DC1D34;
    --functional-blue: #04A3FD;

    /* stroke color variables */
    --stroke-secondary-1: #D8DBDE;
    --stroke-secondary-2: #79828D;
    
    /* Text color variables */
    --text-primary: #0d1722;
    --text-midtone:  #5E6976;
    --text-secondary: #fff;
    --text-action-error: #DC1D34;

    /* Herbie */
    --text-accent-blue-2: #83C7EE;
    --text-primary-inverse: #fff;
    --text-action-link: #04a3fd;
    --text-tertiary: #04a3fd;

    
    /* Spacing variables */
    --spacing-4: 4px;
    --spacing-8: 8px;
    --spacing-12: 12px;
    --spacing-16: 16px;
    --spacing-20: 20px;
    --spacing-24: 24px;
    --spacing-32: 32px;
    --spacing-36: 36px;
    --spacing-40: 40px;
    --spacing-48: 48px;
    --spacing-60: 60px;
    --spacing-64: 64px;
    --spacing-80: 80px;
    --spacing-96: 96px;
    
    /* Border radius variables */
    --radius-4: 4px;
    --radius-8: 8px;
    --radius-12: 12px;
    --radius-16: 16px;
    --radius-24: 24px;
    --radius-40: 40px;

    color: var(--Text-White, var(--text-primary-inverse, #FFF));
    
    --text-heading-h1-font-line-height: 120%;

/* Heading/H3 */
/* Heading H3 variables */
    --text-heading-h3-font-family: var(--primaryTypeface);
    --text-heading-h3-font-size: 32px;
    --text-heading-h3-font-weight: 600;
    --text-heading-h3-font-line-height: 36px;
    --text-heading-h3-font-letter-spacing: 0.3px;

    /* Heading H4 variables */
    --text-heading-h4-font-family: var(--primaryTypeface);
    --text-heading-h4-font-size: 22px;
    --text-heading-h4-font-weight: 700;
    --text-heading-h4-font-line-height: 24px;
    --text-heading-h4-font-letter-spacing: -0.2px;
    
    /* Heading H5 variables */
    --text-heading-h5-font-family: var(--primaryTypeface);
    --text-heading-h5-font-size: 20px;
    --text-heading-h5-font-weight: 700;
    --text-heading-h5-font-line-height: 24px;
    --text-heading-h5-font-letter-spacing: -0.2px;

 /* Body SM variables */
    --text-body-sm-font-family: var(--secondaryTypeface);
    --text-body-sm-font-size: .75rem;
    --text-body-sm-font-style: normal;
    --text-body-sm-font-weight: 400;
    --text-body-sm-font-line-height: 1rem;
    
   /* Text MD variables */
    --text-md-font-family:  var(--secondaryTypeface);
    --text-md-font-size: .875rem;
    --text-md-font-weight: 400;
    --text-md-font-line-height: 1.25rem;
    --text-md-font-letter-spacing: 0.2px;

    /* Text LG variables */
    --text-lg-font-family: var(--secondaryTypeface);
    --text-lg-font-size: 1rem;
    --text-lg-font-weight: 400;
    --text-lg-font-line-height: 1.5rem;
    --text-lg-font-letter-spacing: 0.2px;

    /* Dp 1 */
    --dp-1-box-shadow: 0px 3.2px 7.2px 0px rgba(0, 0, 0, 0.10);
    --dp-2-box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.15);


body {
    font-family: 'DM Sans', sans-serif;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    min-height: 100vh;
    height: 100%;
    overflow: auto;
    width: 100%;
    padding:0;
    margin:0;
    background: radial-gradient(184.89% 207.08% at 50% 50%, rgba(239, 57, 69, 0.00) 25%, #EF3945 100%), radial-gradient(99.77% 134.41% at 55.23% 52.68%, rgba(40, 178, 255, 0.24) 13.94%, rgba(239, 57, 69, 0.06) 100%), linear-gradient(90deg, rgba(40, 178, 255, 0.24) 21.91%, rgba(239, 57, 69, 0.24) 85.31%), #000049;   
    scroll-behavior: smooth;
    display:flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100vw;
    margin: 0 auto;
    



}

main {
    position: relative;
    /* min-height: 100vh; */
    height: auto;
    width: 100vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    flex: 1 1 auto;
    box-sizing: border-box;
    
}


.mapimage {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    height: 100%;
    background: url('/img/map.webp') center center/cover no-repeat;
    mix-blend-mode: multiply;
    opacity: 1;
    z-index: -1;
    overflow: hidden;
    
}
dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    border: none;
    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-width: none;
    max-height: none;
    display: none;
}

dialog[open] {
    display: flex;
    align-items: center;
    justify-content: center;
}

dialog::backdrop {
    background-color: rgba(0, 0, 79, 0.8);
}

dialog h4 {
    text-align: center;
    padding: var(--spacing-60) var(--spacing-16) var(--spacing-16) var(--spacing-24);
}
dialog .modal-content {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    align-items: center;
    box-sizing: border-box;
    padding: 0 var(--spacing-16);
    justify-content: center;
    h2 {
        text-align: center;
    }
}
.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width:40px;
    height:40px;
    border-radius: 50%;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    font-size: 2rem;
    color:var(--text-primary-inverse);
    background-color: var(--surface-primary-1);
    cursor: pointer;
    z-index: 1;
}

dialog .modal-actions {
    display: flex;
    gap: var(--spacing-12);
    justify-content: center;
    padding: 0 var(--spacing-16) var(--spacing-32) var(--spacing-16);
}

dialog .modal-actions .btn {
    min-width:160px;
}

dialog .startWrapper #services-options {
    width: 440px;
    max-width: 440px;
   
}
dialog .start, dialog .services-options {
    width: 480px;
    max-width: 480px;
    border-radius: var(--radius-24);
    text-align: left;
    min-height: 48px;
    
}

.start .combobox-toggle{
    right:16px;
}

/* maps page */
#mapsWrap {
    display: flex;
    flex-direction: row;
    gap: var(--spacing-16);
}
#results, #map {
    display: flex;
    flex-direction: column;
    flex: 1 0 0;
    width: 70%;
    height: 500px;
}

/* Header styles for all headings h1-h6 */
h1, h2, h3, h4, h5, h6 {
    font-family: "DM Sans", sans-serif;
    font-weight: 700;
    color: var(--text-primary-inverse);
}
a.link {
    color: var(--text-action-link);
}
.body-sm {
    font-family: var(--text-body-sm-font-family);
    font-size: var(--text-body-sm-font-size);
    font-style: var(--text-body-sm-font-style);
    font-weight: var(--text-body-sm-font-weight);
    line-height: var(--text-body-sm-font-line-height);
}

.body-md {
    font-family: var(--text-md-font-family);
    font-size: var(--text-md-font-size);
    font-style: var(--text-md-font-style);
    font-weight: var(--text-md-font-weight);
    line-height: var(--text-md-font-line-height);
}

.body-lg {
    font-family: var(--text-lg-font-family);
    font-size: var(--text-lg-font-size);
    font-style: var(--text-lg-font-style);
    font-weight: var(--text-lg-font-weight);
    line-height: var(--text-lg-font-line-height);
}
.text-left {
    text-align: left;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-primary {
    color: var(--text-primary);
}
.text-midtone {
    color: var(--text-midtone);
}
.text-secondary {
    color: var(--text-secondary);
}
#app {
    height:100%;
  
}


#logo {

   
    width: 100%;
    display: flex;
    justify-content: center;
    padding: var(--spacing-48) var(--spacing-16) var(--spacing-16) var(--spacing-16);

    img {
        height: 24px;
        width: auto;
    }
}

h1 {
    text-align: center;
    font-size: 3rem;
    font-style: normal;
    line-height: var(--text-heading-h1-font-line-height, 72px); /* 120% */
    letter-spacing:0;
    font-weight: 600;
}


h4 {
    font-family: var(--text-heading-h4-font-family, "DM Sans");
    font-size: var(--text-heading-h4-font-size, 22px);
    font-style: normal;
    font-weight: 700;
    line-height: var(--text-heading-h4-font-line-height, 24px); /* 116.667% */
    letter-spacing: var(--text-heading-h4-font-letter-spacing, -0.2px);
}
   

h5 {
    font-family: var(--text-heading-h5-font-family, "DM Sans");
    font-size: var(--text-heading-h5-font-size, 24px);
    font-style: normal;
    font-weight: 700;
    line-height: var(--text-heading-h5-font-line-height, 28px); /* 116.667% */
    letter-spacing: var(--text-heading-h5-font-letter-spacing, -0.2px);
  
}
a  {
    color: var(--text-primary);
}


#services {
    padding:1rem;
    margin:.5rem;
    border: 1px solid white;
}





.hero {
    text-align: center;
    padding: 0 var(--spacing-16) var(--spacing-24) var(--spacing-16);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-primary-inverse);
    
}



.subtitle {

    padding: var(--spacing-16) var(--spacing-16) var(--spacing-32) var(--spacing-16);
    max-width:80ch;
    text-wrap: wrap!important;
}



/* for start page */

.hero h1, .hero .dealer-info, .hero .terms {
    margin-bottom: 0;
}
.hero h1 span {
    color:var(--text-accent-blue-2);
    text-transform: lowercase;

}
.services {
    margin-bottom: var(--spacing-16);
}
.legal {
    margin-top: var(--spacing-16);
    padding: var(--spacing-4) var(--spacing-16) var(--spacing-32) var(--spacing-16);
    text-align: center;
}

/* Progress bar styles */
.progress-bar {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-4);
    width: 104px;
    flex-wrap: wrap;
}

.progress-container {
    display: flex;
    flex: 1 0 auto;
    background-color: var(--stroke-secondary-1);
    border-radius: var(--radius-24);
    overflow: hidden;
}

.progress-bar .progress-step {
    width: 33.3%;
    height: 8px;
    
    transition: background-color 0.3s ease;
}

.progress-bar .progress-step.active {
    background-color: var(--surface-accent-1);
}



.progress-text {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: var(--spacing-4);
}

@media (min-width: 768px) {
    .progress-bar {
        
    }
    .progress-bar .progress-step {
       
    }
}

/* Services combobox on index page */
.services-combobox-wrapper {
    max-width: 400px;
    width: 100%;
    margin: var(--spacing-16) auto var(--spacing-24) auto;
    position: relative;
}

.services-combobox-wrapper .combobox-input {
    background-color: transparent;
    border: 2px solid var(--surface-accent-1);
    color: var(--text-primary-inverse);
}

.services-combobox-wrapper .combobox-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.services-combobox-wrapper .combobox-input:focus {
    border-color: var(--text-accent-blue-2);
    box-shadow: 0 0 0 2px rgba(131, 199, 238, 0.25);
}

.services-combobox-wrapper .combobox-toggle {
    color: var(--text-primary-inverse);
}

.services-combobox-wrapper .combobox-toggle svg {
    stroke: var(--text-primary-inverse);
}

.services-combobox-wrapper .combobox-options {
    background-color: var(--surface-primary-1);
    border: 1px solid var(--stroke-secondary-2);
    border-radius: var(--radius-8);
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    margin-top: 4px;
    padding: 8px 0;
    list-style: none;
    max-height: 320px;
    overflow-y: auto;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    /* Initially hidden */
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: opacity .1s ease-in-out, max-height .1s ease-in-out;
}

.services-combobox-wrapper .combobox-options.show {
    /* Show with fade-in */
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.services-combobox-wrapper .combobox-options li[role="option"] {
    padding: 10px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    color: var(--text-primary);
}

.services-combobox-wrapper .combobox-options li[role="option"]:hover {
    background-color: var(--surface-primary-2);
}

/* general forms */

.form-row  {
    display: flex;
    flex-direction: row;
    gap:.75rem;
}

label {
    padding-bottom:var(--spacing-8);
    color: var(--text-primary);
}
select, input {
    width: 100%;
    padding: var(--spacing-12) var(--spacing-16);
    border-radius: var(--radius-8);
    border: 1px solid var(--stroke-secondary-2);
    --stroke-secondary-2: #79828D;
    background-color: white;
    height: 44px;
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    appearance: none;
    transition: border-color 0.2s ease;
}

/* Form validation error styles */
.form-group.error input,
.form-group.error .combobox-input {
    border-color: var(--text-action-error);
}

.form-group.error label {
    color: var(--text-action-error);
}

.error-message {
    color: var(--text-action-error);
    font-size: 14px;
    margin-top: var(--spacing-4);
    display: none;
}

.form-group.error .error-message {
    display: block;
}

/* Card styles */
.option-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    justify-content: center;
    align-items: center;
    max-width: 640px;
    width: 100%;
    padding: 0 var(--spacing-24);
    gap: var(--spacing-12);
    margin-bottom: var(--spacing-40);
    box-sizing: border-box;

    /* overflow: hidden; */
}

.card {
    background: var(--surface-primary-1, #FFF);
    border-radius: var(--radius-24);
    border: 1px solid var(--stroke-secondary-2, #79828D);
    box-shadow: 0 0 0 0 var(--functional-blue), var(--dp-2-box-shadow);
    gap: var(--spacing-16);
    padding: var(--spacing-24) var(--spacing-8) var(--spacing-32) var(--spacing-8);
    max-width: 202px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    text-align: center;

    h4 {
        color: var(--text-primary);
    }

   a {
    text-decoration: none;
    
   }
    
}
.card-content p {
padding-top: var(--spacing-4);

    
}



.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 0 2px var(--functional-blue), var(--dp-2-box-shadow);
}

.card-icon {
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
}


/* primary cta styles */
.btn {
    padding: var(--spacing-8) var(--spacing-24);
    border-radius: var(--radius-40);
    font-weight: 600;
    letter-spacing: .2px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 1.125rem;
    min-width: 120px;
    height: auto;
    line-height: 2rem;
    border: 0;
    font-family: 'DM Sans', sans-serif!important;

   
}
.btn img{ 
    margin-right: var(--spacing-8);
}

.btn-primary {
    background-color: var(--surface-tertiary-2);
    color: white;
    flex: 1;
    border: 0;
    box-shadow: 0 0 0 0px var(--functional-blue), var(--dp-1-box-shadow);
}

.btn-primary:focus-visible {
    outline-color: var(--surface-tertiary-2);
    outline-offset: 3px;
}

.btn-primary:hover, .btn-ghost:hover{
    
    transform: scale(1.02);
    box-shadow:0 0 0 2px var(--functional-blue), var(--dp-1-box-shadow);
    border-color: var(--functional-blue);
    transition: all .25s ease-in-out;
    
}
.btn-primary:active {
    background-color: var(--surface-tertiary-2);
    transform: scale(.98);
}
.btn-primary:disabled {
    background-color: var(--color-livid-500);
    cursor: not-allowed;
    opacity: 0.7;
}

.btn-secondary {
    background-color: white;
    color: var(--color-livid-900);
    border: 2px solid var(--color-livid-900);
}
.btn-tertiary {
    background-color: white;
    color: var(--color-livid-900);
    text-wrap: nowrap;
    max-height: 48px;
}

.btn-ghost {
    border: 1px solid var(--functional-blue);
    color: var(--text-primary-inverse);
    background-color: transparent;
    font-weight:400;
}
.btn-transparent {
    background-color:   transparent;
    color: var(--text-primary-inverse);
    text-wrap: nowrap;
    max-height: 48px;
}

.btn-secondary:hover {
    background-color: var(--surface-primary-2);
}
.btn:focus-visible {
    box-shadow: 0 0 0 2px var(--color-blue-500), 0 0 0 4px var(--color-blue-100);
}

/* step styles */


.step {
    display: flex;
    gap: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    
    
}
.errorImg {
    margin:var(--spacing-8);
}
#step-2 fieldset, #step-3 fieldset {
    background: var(--surface-primary-2);
    border-radius: var(--radius-24);
    border:none;
    max-width: 480px;
    width: calc(100% - 32px);
    padding:  var(--spacing-24) var(--spacing-32) var(--spacing-36);
    display: flex;
    gap: 12px;
    flex-direction: column;
    box-shadow: var(--dp-1-box-shadow);
    transition: all .2s ease-in-out;
}

.footer-cta {
    display: flex;
    padding-top:var(--spacing-36);
    gap: .5rem;
    width:320px;
    flex-direction: column;
    justify-content: center;
}



@media (max-width: 600px) {
    .details-form {
        padding-top:var(--spacing-4);
    }
    
}

@media (max-width: 800px) {

    main {
        height: auto; 
    }

    .hero  {
        padding:0 var(--spacing-16) var(--spacing-24) var(--spacing-16);
        justify-content: space-between;
    }
    #logo {

        padding: var(--spacing-32) var(--spacing-16) var(--spacing-8) var(--spacing-16);
    }
    .subtitle {
        padding: 0 0 var(--spacing-16) 0;
        text-wrap: balance;
    }
    .option-cards {
        grid-template-columns: repeat(2, 1fr);
        width: 100%;
        gap: var(--spacing-8);
        padding: 0 var(--spacing-16);
    }
    .option-cards .card-icon {
        margin-bottom: var(--spacing-4);
    }
    .option-cards img {
        width: 44px;
        height: 44px;
    }
    .card {
        padding: var(--spacing-16) var(--spacing-8) var(--spacing-24) var(--spacing-8);
    }

    #step-2 fieldset, #step-3 fieldset {
        padding: var(--spacing-16) var(--spacing-24) var(--spacing-24);
    }

    h1 {
  
        font-size: var(--text-heading-h1-font-size, 40px);
        line-height: var(--text-heading-h1-font-line-height, 44px);
        text-wrap: balance;
        padding-bottom: var(--spacing-8);
    }
    .card-content h4 {
        /* Heading/H5 */
        font-size: 20px;
        line-height: 24px; /* 116.667% */
            
    }
    dialog .startWrapper #services-options {
        width:100vw;
        max-width: 100%;
       
    }
    dialog .start, dialog .services-options {
        width: 100vw;
        max-width: 100%;
        border-radius: var(--radius-24);
        text-align: left;
        min-height: 48px;
        
    }
    .errorImg {
        width:164px;
        height:164px;
    }

}

}