/* Safari specific adjustments */
@media not all and (min-resolution: 0.001dpcm) {
    @supports (-webkit-appearance:none) {
        .calculator-privechauffeur-wrap, .popup {
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .form-row, .date-time-group, .location-switch-group {
            display: flex;
            flex-direction: row;
            width: 100%;
        }

        .form-group, .phone-input, .switch-container {
            display: flex;
            flex-direction: row;
            align-items: center;
            width: 100%;
        }

        .scrollable-numbers {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            width: 100%;
        }

        .popup-overlay {
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .popup {
            overflow-y: auto;
        }
    }
}

/* General styles */
body {
    font-family: 'Radio Canada', sans-serif;
}

.calculator-privechauffeur-wrap {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    font-family: 'Radio Canada', sans-serif;
}

.calculator-privechauffeur-wrap h1 {
    text-align: center;
    color: #009ada;
    font-family: 'Radio Canada', sans-serif;
    font-weight: 800;
}

.calculator-privechauffeur-wrap h3 {
    font-size: 16px;
    font-family: 'Radio Canada';
    text-align: center;
    font-weight: 400;
    color: #454545;
}

.calculator-privechauffeur-wrap .form-group {
    margin-bottom: 15px;
}

.calculator-privechauffeur-wrap label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

.calculator-privechauffeur-wrap input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Radio Canada', sans-serif;
}

.calculator-privechauffeur-wrap button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 10px;
    background-color: #009ada;
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-family: 'Radio Canada', sans-serif;
    text-align: center;
}

.calculator-privechauffeur-wrap button:hover {
    background-color: #0073aa;
}

.calculator-privechauffeur-wrap button:focus {
    background-color: transparent;
    border-color: #009ada;
    color: #009ada;
}

.calculator-privechauffeur-wrap #resultaat {
    margin-top: 20px;
    font-size: 16px;
    color: #333;
}

.calculator-privechauffeur-wrap #boekNu {
    display: flex;
    justify-content: center;
    align-items: center;
}

.time-selector {
    display: flex;
	width: 160px;
    gap: 10px;
    align-items: center;
}

.hours-container, .minutes-container {
    position: relative;
    width: 100%;
    height: 40px;
    background-color: white;
    overflow: hidden;
    padding: 10px;
    border: 1px solid #454545;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    box-sizing: border-box;
    transition: 0.5s;
}

.hours-container.enlarged, .minutes-container.enlarged {
    height: 60px;
    transition: 0.3s;
}

.time-input {
    width: 100%;
    height: 40px;
    font-size: 20px;
    opacity: 0%;
    text-align: center;
    border: none;
    background-color: transparent;
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.scrollable-numbers {
    font-size: 14px;
    color: #888888;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    transition: transform 0.3s;
}

.scrollable-numbers div.selected {
    font-weight: bold;
    font-size: 16px;
    color: #121212;
}

.scrollable-numbers div {
    height: 22px;
}

.tooltip {
    border-bottom: 1px dashed #000;
    text-decoration: none;
    position: relative;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 300px;
    background-color: #6c757d;
    color: #fff;
    text-align: center;
    border-radius: 5px;
    padding: 5px 0;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -150px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #6c757d transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(7px);
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup {
    width: 80vw;
    height: 66vh;
    max-width: 700px;
    padding: 20px;
    background: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    border-radius: 20px;
    overflow-y: auto;
}

.popup h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #009ada;
}

.popup h3 {
    font-style: italic;
    color: grey;
    font-size: 12px;
}

form {
    display: flex;
    flex-direction: column;
    max-height: 80%;
    overflow-y: auto;
}

.form-row {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 20px;
    box-sizing: border-box;
}

.date-time-group,
.location-switch-group {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 10px;
}

.date-field {
    flex: 2;
}

.time-field {
    flex: 1;
}

.start-location-field {
    flex: 1;
}

.switch-container {
    align-items: center;
    gap: 5px;
}


.eindlocatie-verborgen {
    display: none;
}


.popup form label {
    font-weight: bold;
    margin: 10px 0 5px;
    display: block;
}

.popup form input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.popup form button {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    padding: 10px;
    background-color: #009ada;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.popup form button:hover {
    background-color: #0073aa;
}

.form-group {
    align-items: center;
    margin-top: 10px;
}

.popup p {
    margin-top: 1em;
    margin-left: 5px;
}

.phone-input {
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
}

.phone-input select {
    width: auto;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-image: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.phone-input select option {
    background-repeat: no-repeat;
    background-position: left center;
    padding-left: 30px;
    background-size: 20px 20px;
}

.phone-input input[type="tel"] {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.phone-input input[type="text"] {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
	margin-top: 6px;
    cursor: pointer;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
    cursor: pointer;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 50%;
}

.location-switch-group input:checked + .slider {
    background-color: #009ada;
}

.location-switch-group input:checked + .slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

.location-switch-group input:focus + .slider {
    box-shadow: 0 0 1px #009ada;
}

.booking-success {
    display: flex;
    flex-direction: column;
    text-align: center;
    align-items: center;
    justify-content: center;
}

.booking-success .checkmark {
    font-size: 48px;
    color: green;
    margin-bottom: 10px;
}

.booking-success h2 {
    margin: 20px 0;
    font-size: 24px;
}

.booking-success button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 20px 0;
    padding: 10px;
    background-color: #009ada;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Radio Canada', sans-serif;
}

.booking-success button:hover {
    background-color: #0073aa;
}

/* Voor WebKit browsers (Chrome, Safari) */
.popup::-webkit-scrollbar {
    width: 8px;
}

.popup::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
    margin: 20px;
}

.popup::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.popup form::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.popup form::-webkit-scrollbar-button {
    display: none;
}

/* Verwerkanimatie */
.loading-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.loading-animation .spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: #009ada;
    animation: spin 1s linear infinite;
}

.voorwaarden-check {
	display: flex;
    align-items: center;
    margin-top: 10px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loading-animation p {
    margin-top: 10px;
    font-size: 16px;
    color: #333;
}

.loading-animation #cancelLoading {
    position: absolute;
    bottom: 10px;
    padding: 10px 20px;
    color: #009ada;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-style: italic;
}

.loading-animation #cancelLoading:hover {
    background-color: #AFAFAF;
}

.popup-overlay.blurred {
    backdrop-filter: blur(5px);
}

.close-popup {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

.close-popup:hover {
    transform: rotate(-90deg);
    transition: 0.4s;
}

/* Stijlen voor tijdsselectie */
.time-select {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.time-wheel {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Radio Canada', sans-serif;
}

.wheel-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    text-align: center;
    transition: transform 0.3s ease-in-out;
}

.wheel-item {
    height: 40px;
    line-height: 40px;
    font-size: 1.5em;
    color: #aaa;
}

.wheel-item.selected {
    color: #000;
    font-size: 2em;
}

.time-label {
    position: absolute;
    bottom: -20px;
    width: 100%;
    text-align: center;
    font-size: 1em;
    color: #333;
}

/* Voor een smooth scroll effect */
.time-wheel::-webkit-scrollbar {
    display: none;
}

.time-wheel {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

#reiskostenText {
    background: linear-gradient(to right, #eeeeee 8%, #dddddd 18%, #eeeeee 33%);
    background-size: 1000px 100%;
    animation: shimmer 1.5s infinite linear;
    color: transparent;
    height: 20px;
    border-radius: 5px;
}

#reiskostenText.calculated {
    background: none;
    color: inherit;
    animation: none;
}
