/*!!!!!!!!   FORM   !!!!!!!!*/

/* Form step layout (used for each step in the form) */
.form-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 5%;
    position: relative;
}
.form-step {
    display: none;
}
.form-step.active {
    display: flex;
    flex-direction: column;
    width: min(70%, 1400px);
    max-width: 1400px;
}

.form-step-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: clamp(2em, 6vw, 6em);
}

.form-step-text {
    width: 70%;  /* Significantly increased text width */
}

.form-step-text h2 {
    font-size: clamp(2.2em, 5vw, 3.5em);
    margin-bottom: 0.5em;
    line-height: 1.2;
}

.form-step-text .next-btn {
    color: #ff5100;  /* Highlighting the 'tweewieler' word */
    display: inline;
}

.form-step-form {
    width: 60%;
    padding-left: 4em;
}

.form-step input {
    padding: 0.8em;
    border: 1px solid rgba(69, 70, 78, 0.6);
    border-radius: 33px;
    box-sizing: border-box;
    background: transparent;
}

/* Button container for Next/Previous buttons */
.form-buttons {
    position: fixed;  /* Fixed at the bottom, just above the progress bar */
    bottom: 1.2em;  /* Position above the progress bar */
    left: 0;
    width: 100%;  /* Span the full width of the page */
    display: flex;
    justify-content: space-between;
    z-index: 1001;  /* Ensure buttons are above the progress bar */
}

/* Styling for Next and Previous buttons */
.form-buttons button {
    border: none;
    border-radius: 0.25em;
    cursor: pointer;
    width: 48%;  /* Make buttons take up 48% width of the container */
    background-color: transparent;
}
@media (min-width: 769px) {
    .form-buttons button {
        background-color: transparent;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .form-buttons button span {
        display: inline-block;
        padding: 0.6em 1.5em;
        border-radius: 0.5em;
        font-size: 1rem;
        font-weight: 600;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
        transition: background-color 0.3s ease, transform 0.2s ease;
    }

    .form-buttons .next-btn span {
        background-color: #ff5100;
        color: white;
    }

    .form-buttons .prev-btn span {
        background-color: #6c757d;
        color: white;
    }

    .form-buttons .next-btn:hover span {
        background-color: white;
        color: #ff5100;
        transform: translateY(-1px);
    }

    .form-buttons .prev-btn:hover span {
        background-color: white;
        color: #6c757d;
        transform: translateY(-1px);
    }

    .form-buttons {
        bottom: 0.7em; /* Adjust as needed to lower buttons */
    }
}
.prev-btn {
    color: #45464E;
}
.next-btn {
    color: #ff5100;
}

/* Two-column layout for Steps 2 and 5 only */
.form-step-form.two-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(12em, 1fr));
    gap: 3.5em;
}

/* Ensure dropdown (jaar_geproduceerd) spans full width */
#jaar_geproduceerd {
    grid-column: span 2;
}

/* Tablet responsive fixes */
@media (max-width: 1024px) {
    .form-step-content {
        gap: 3em;
    }
    
    .form-step-text {
        width: 65%;
    }
    
    .form-step-form {
        width: 55%;
        padding-left: 2em;
    }
}

/* Small tablet adjustments */
@media (max-width: 820px) {
    .form-step-content {
        flex-direction: column;
        gap: 2em;
        text-align: left; /* Left align labels instead of center */
    }
    
    .form-step-text,
    .form-step-form {
        width: 100%;
        padding-left: 0;
    }
    
    .form-step-text h2 {
        font-size: clamp(1.8em, 6vw, 2.5em);
    }
    
    /* Make all form inputs consistent size on mobile */
    .form-step-form input,
    .form-step-form select {
        width: 100%;
        box-sizing: border-box;
    }
}

/* Mobile responsive fixes */
@media (max-width: 768px) {
    .form-step-form.two-column {
        grid-template-columns: 1fr;
        margin-bottom: 15em;
    }

    #jaar_geproduceerd {
        grid-column: span 1;
    }
}

.form-step-form select {
    width: 100%;
    padding: 0.8em;
    box-sizing: border-box;
    font-size: 1rem;
    background: transparent;
    appearance: none; /* Removes default dropdown arrow */
    -webkit-appearance: none; /* Safari */
    -moz-appearance: none; /* Firefox */
    cursor: pointer;
    position: relative;
    border: 1px solid rgba(69, 70, 78, 0.6);
    border-radius: 33px;
}

/* Custom dropdown arrow */
.form-step-form select {
    background-image: url("data:image/svg+xml;utf8,<svg fill='%2345464E' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 1em center;
    background-size: 1em;
    padding-right: 2.5em;
}

/* Hover & Focus Effects */
.form-step-form select:hover,
.form-step-form select:focus {
    border-color: #ff5100;
    outline: none;
}

/* Progress bar container */
.form-progress-container {
    position: fixed;
    bottom: 4em;
    left: 0;
    width: 100%; /* Full width */
    background-color: rgba(69, 70, 78, 0.2);
    border-radius: 1em;
    height: 0.2em;
    z-index: 1000;
    margin-bottom: 0;
}

/* Progress bar itself */
.form-progress-bar {
    height: 100%;
    background-color: #ff5100;
    border-radius: 1em;
}

/* Progress counter */
.form-progress-counter {
    position: absolute;
    top: -2em;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.2em;
    font-weight: bold;
    color: #45464E;
}
.orange-text {
    color: #ff5100;
}

/*!!!!!!!!   BIKES   !!!!!!!!*/
.bike-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(9em, 1fr));
    gap: 1em;
    list-style: none;
    padding: 0;
    margin-bottom: 0.5em;
}

.bike-option {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid rgba(69, 70, 78, 0.2);
    border-radius: 12px;
    overflow: hidden; /* Ensures content respects border-radius */
    transition: all 0.3s ease;
}

.bike-option input {
    display: none;
}

.bike-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 1em;
    text-align: center;
}

.bike-icon {
    width: 3rem;
    height: 3rem;
    object-fit: contain;
    transition: filter 0.3s;
    filter: invert(27%) sepia(98%) saturate(1221%) hue-rotate(2deg) brightness(105%) contrast(106%);
}

.bike-option span {
    margin-top: 0.5em;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.bike-option input:checked + .bike-content {
    background-color: #ff5100;
}

.bike-option input:checked + .bike-content .bike-icon {
    filter: brightness(0) invert(1);
}

.bike-option input:checked + .bike-content span {
    color: white;
}

/* Ensure perfect square regardless of content */
.bike-option::before {
    content: '';
    display: block;
    padding-top: 100%; /* Creates a 1:1 aspect ratio */
}

.bike-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Position and layout for the electric-bike checkbox */
.electric-bike {
    margin-top: 1em;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-size: 1rem;
    color: #45464e;
    cursor: pointer; /* Show pointer when hovering */
}

/* Custom checkbox styling for "Elektrisch?" */
.electric-bike input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 2px solid #ccc; /* Regular border when not selected */
    border-radius: 4px; /* Square shape */
    background-color: transparent; /* Transparent background when not selected */
    position: relative;
    margin-right: 0.5em; /* Space between checkbox and text */
    transition: all 0.3s ease; /* Smooth transition for background */
    width: 1.2em;
    height: 1.2em;
    flex-shrink: 0;
}

/* Background and checkmark when selected */
.electric-bike input[type="checkbox"]:checked {
    background-color: #ff5100; /* Orange background when selected */
    border-color: #ff5100; /* Orange border when selected */
}

/* Add checkmark inside the checkbox when selected */
.electric-bike input[type="checkbox"]:checked::before {
    content: "✔"; /* Unicode checkmark */
    font-size: 1em;
    color: white; /* White checkmark */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Center the checkmark */
}

/* Hover effect for the checkbox */
.electric-bike input[type="checkbox"]:hover {
    border-color: #e04a00; /* Darker border color when hovering */
}

button[type="submit"] {
    margin-top: 4em;
}

.form-full button[type="submit"] {
    margin-top: 0;
}

/* Part 1: General Styled Radio Buttons (for Diefstal) */
.styled-radio {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ff5100;
    color: white;
    padding: 0.6em 1.2em;
    border-radius: 3em;
    text-decoration: none;
    font-size: 1em;
    width: fit-content;
    font-weight: lighter;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
    gap: 0.5em;
}

/* Custom radio button styling (for Diefstal) */
.styled-radio input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 18px; /* Custom size for radio button */
    height: 18px; /* Custom size for radio button */
    border: 2px solid white;
    border-radius: 50%; /* Circle style */
    position: relative;
    cursor: pointer;
    margin-right: 1em;
}

/* Checkmark styling for Diefstal buttons */
.styled-radio input[type="radio"]::before {
    content: "✔"; /* Unicode checkmark */
    font-size: 0.8em;
    color: #ff5100;
    position: absolute;
    transform: translate(-50%, -50%);
}

/* Show checkmark when selected (Diefstal buttons) */
.styled-radio input[type="radio"]:checked {
    background-color: white;
}

.styled-radio input[type="radio"]:checked::before {
    display: block;
}

/* Styled Checkboxes (for optional add-ons) */
.styled-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e0e0e0;
    color: #333;
    padding: 0.6em 1.2em;
    border-radius: 3em;
    text-decoration: none;
    font-size: 1em;
    width: fit-content;
    font-weight: lighter;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
    gap: 0.5em;
    margin-top: 0.5em;
}

/* Custom checkbox styling */
.styled-checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #333;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    margin-right: 1em;
}

/* Checkmark styling */
.styled-checkbox input[type="checkbox"]::before {
    content: "✔";
    font-size: 0.8em;
    color: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
}

/* Checked state */
.styled-checkbox input[type="checkbox"]:checked {
    background-color: #ff5100;
    border-color: #ff5100;
}

.styled-checkbox input[type="checkbox"]:checked::before {
    display: block;
}

/* Part 2: Styling for Ja/Nee buttons in Step 3 */
.form-step-form .custom-radio {
    display: block; /* Stack Ja/Nee buttons vertically */
    margin-bottom: 1em; /* Space between the radio buttons */
}

/* Remove or reduce padding specifically for Ja/Nee radio buttons */
.form-step-form .custom-radio input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 16px; /* Smaller square size */
    height: 16px; /* Smaller square height */
    border: 2px solid #ccc; /* Regular border color when not selected */
    border-radius: 4px; /* Square shape */
    margin-right: 1em; /* Space between the radio button and text */
    background-color: transparent; /* Transparent background when not selected */
    padding: 0.4em; /* No extra padding for Ja/Nee buttons */
}

/* When Ja/Nee radio button is checked */
.form-step-form .custom-radio input[type="radio"]:checked {
    background-color: #ff5100; /* Orange background when checked */
    border-color: #ff5100; /* Orange border when checked */
}

/* Display checkmark inside Ja/Nee buttons when checked */
.form-step-form .custom-radio input[type="radio"]:checked::before {
    content: "✔"; /* Unicode checkmark */
    font-size: 1em;
    color: white; /* White checkmark color when checked */
    position: absolute;
    transform: translate(-50%, -50%);
}

.premiepart {
    margin-top: 2em;
}
.couldbe{
    font-size: 0.85rem;
    color: gray;
}
.currentprice {
    color: #ff5100;
    font-size: 2.5em;
    font-style: bold;
}

/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Dark overlay */
}

/* Bigger modal */
.modal-content {
    background-color: #ff5100;
    width: min(90vw, 600px);
    height: auto;
    min-height: clamp(200px, 30vh, 400px);
    max-width: 600px;
    max-height: 80vh;
    margin: 10% auto;
    padding: clamp(20px, 4vw, 30px);
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Title styling */
#modal-title {
    font-size: 24px;
    font-weight: bold;
    color: white;
}

/* Message styling */
#modal-message {
    font-size: 18px;
    color: white;
    flex-grow: 1; /* Push the button down */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
}
/* Center the button container */
.modal-button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: auto; /* Pushes it to the bottom */
    padding-bottom: 20px; /* Adds a little spacing */
}

input.error {
    border: 2px solid red;
    background-color: #ffe6e6; /* Light red background */
}

select.error {
    border: 2px solid red;
}

#step-2-form label, #step-3-form p:first-child, #tracker-options label, #step-5-form label, #step-6-form label{
    font-family: 'Satoshi', sans-serif;
    font-weight: bold;
    text-align: left; /* Left align all form labels */
}

#bike-info {
    margin-top: 2em;
}

.postcode-suggestions {
    position: absolute;
    max-height: 6em;
    overflow-y: auto;
    transition: visibility 0s, opacity 0.2s ease-in-out;
    padding: 0.4em;
    display: flex;
    flex-direction: column;
}

/* When suggestions appear */
.postcode-suggestions.show {
    visibility: visible;
    opacity: 1;
}

.file-upload {
    margin-top: 2em;
}

.file-upload label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: bold;
}

.file-upload-row {
    display: flex;
    gap: 1em;
    align-items: center;
}

.file-upload input[type="file"] {
    flex: 1;
    padding: 0.8em;
    border: 1px solid rgba(69, 70, 78, 0.6);
    border-radius: 33px;
    background: transparent;
    cursor: pointer;
}

.file-upload button {
    padding: 0.8em 1.2em;
    background-color: #ff5100;
    color: white;
    border: none;
    border-radius: 33px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.file-upload button:hover {
    color: #ff5100;
    background-color: white;
}

.loader {
  display: none; /* add this */
  border: 16px solid #f3f3f3;
  border-radius: 50%;
  border-top: 16px solid #ff5100;
  border-right: 16px solid white;
  border-bottom: 16px solid #ff5100;
  border-left: 16px solid white;
  width: 120px;
  height: 120px;
  -webkit-animation: spin 2s linear infinite;
  animation: spin 2s linear infinite;
}

.view-offerte-loader-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2rem 0;
}

.view-offerte-loader {
  border: 16px solid #f3f3f3;
  border-radius: 50%;
  border-top: 16px solid #ff5100;
  border-right: 16px solid white;
  border-bottom: 16px solid #ff5100;
  border-left: 16px solid white;
  width: 120px;
  height: 120px;
  animation: spin 2s linear infinite;
}

@-webkit-keyframes spin {
  0% { -webkit-transform: rotate(0deg); }
  100% { -webkit-transform: rotate(360deg); }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#frame-optional {
    font-size: 0.8em;
    display: inline;
}