:root {
    --accent-color: #b1cdd8;
    --border-color: #e0e0e0;
    --text-color: #333333;
    --light-bg: #f8f8f8;
}

.rental-options {
    margin: 20px 0;
    padding: 20px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
}

/* Swatch Styling */
.swatch-container,
.duration-swatches {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 10px 0;
}

.swatch-option,
.duration-swatch {
    position: relative;
    display: inline-block;
}

.swatch-option input[type="radio"],
.duration-swatch input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.swatch-label {
    display: inline-block;
    padding: 6px 12px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

input[type="radio"]:checked + .swatch-label {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

input[type="radio"]:not(:checked) + .swatch-label:hover {
    border-color: var(--accent-color);
}

/* Zeitauswahl */
.rental-dates {
    margin-top: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.rental-dates label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: var(--text-color);
}

.rental-dates input[type="date"],
.rental-dates input[type="time"] {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: white;
    font-size: 14px;
}

/* Rückgabe-Info */
.rental-return {
    margin: 20px 0;
    padding: 12px;
    background: var(--light-bg);
    border-radius: 4px;
    display: none; /* Standardmäßig ausgeblendet */
}

.rental-return.active {
    display: block;
}

.return-datetime {
    font-weight: 500;
    color: var(--text-color);
}

/* Preisanzeige */
.rental-price {
    list-style: none;
    padding: 0;
    margin: 12px 0;
    font-size: 14px;
    line-height: 1.6;
    background: white;
    border-radius: 4px;
}

.rental-price > div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.rental-price > div:last-child {
    border-bottom: none;
}



.deposit-info,
.remaining-amount{
    background: var(--light-bg);
}

.winter-discount-info {
    display: inline-block;
    padding: 4px 8px;
    background: var(--accent-color);
    color: white;
    border-radius: 4px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.winter-discount-info.active {
    opacity: 1;
}

/* Überschriften */
.rental-options h4 {
    font-size: 16px;
    font-weight: 500;
    margin: 15px 0 8px;
    color: var(--text-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .rental-dates {
        grid-template-columns: 1fr;
    }
    .rental-price {
        font-size: 0.85em !important;
    }
}

/* Flatpickr Input Styling */
body .rental-options input.flatpickr-input[type="text"].form-control,
body .rental-options .flatpickr-input.form-control {
    width: 100% !important;
    padding: 8px !important;
    padding-right: 30px !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 4px !important;
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E") no-repeat right 8px center !important;
    font-size: 14px !important;
    color: var(--text-color) !important;
    cursor: pointer !important;
    min-height: 39px !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

/* Zusätzliche Styles für das versteckte Original-Input */
body .rental-options input.flatpickr-input[type="hidden"] {
    display: none !important;
}

.rental-options input.flatpickr-input[type="text"].form-control::placeholder {
    color: #666 !important;
    opacity: 1 !important;
}

/* Verhindere Hover/Focus Styles von Bootstrap */
.rental-options input.flatpickr-input[type="text"].form-control:focus,
.rental-options input.flatpickr-input[type="text"].form-control:hover {
    border-color: var(--border-color) !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Optional: Styling für den Kalender selbst */
.flatpickr-calendar {
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.flatpickr-day.selected {
    background: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
}

.flatpickr-day.today {
    border-color: var(--accent-color);
}

/* Spezifische Styles für das Datums-Input */
.rental-options .date-field input.flatpickr-input[type="text"],
.rental-options .date-field .flatpickr-input {
    width: 100% !important;
    padding: 8px !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 4px !important;
    background: white !important;
    font-size: 14px !important;
    color: var(--text-color) !important;
    height: auto !important;
    min-height: 39px !important;
    line-height: normal !important;
    margin: 0 !important;
    box-shadow: none !important;
}

/* Hover und Focus Zustände */
.rental-options .date-field input.flatpickr-input[type="text"]:hover,
.rental-options .date-field input.flatpickr-input[type="text"]:focus,
.rental-options .date-field .flatpickr-input:hover,
.rental-options .date-field .flatpickr-input:focus {
    border-color: var(--accent-color) !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Verstecke das Original-Input */
.rental-options .date-field input.flatpickr-input[type="hidden"] {
    display: none !important;
}

/* Kalender-Icon */
.rental-options .date-field .flatpickr-input {
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E") no-repeat right 8px center !important;
    padding-right: 32px !important;
}

/* Placeholder Styling */
.rental-options .date-field .flatpickr-input::placeholder {
    color: #666 !important;
    opacity: 1 !important;
}

/* Komplett neue, eindeutige Klasse für das Datums-Input */
.rental-date-input {
    width: 100% !important;
    padding: 8px 32px 8px 8px !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 4px !important;
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E") no-repeat right 8px center !important;
    font-size: 14px !important;
    color: var(--text-color) !important;
    height: 39px !important;
    line-height: normal !important;
    margin: 0 !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.rental-date-input:hover,
.rental-date-input:focus {
    border-color: var(--accent-color) !important;
    outline: none !important;
    box-shadow: none !important;
}

.rental-date-input::placeholder {
    color: #666 !important;
    opacity: 1 !important;
}

/* Verstecke das Original-Input */
input.flatpickr-input[type="hidden"] {
    display: none !important;
}

.wedding-driver-info .swatch-option input[type="radio"]:disabled + .swatch-label {
    background: var(--accent-color);
    color: white;
    opacity: 1;
    cursor: default;
}

/* Auf Anfrage Styling */
.duration-swatch.on-request {
    opacity: 0.7;
}

.duration-swatch.on-request .swatch-label {
    background-color: var(--light-bg);
    position: relative;
}

/* Tooltip styling */
.duration-swatch.on-request {
    position: relative;
}

.duration-swatch.on-request:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 10px;
    background: #000;
    color: white;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 10;
    margin-bottom: 5px;
    opacity: 1;
}

/* Disabled Add to Cart Button */
.single_add_to_cart_button.disabled {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    background-color: var(--light-bg) !important;
    color: var(--light-text) !important;
}
/* Spezifisches Styling für das Zeitfeld */
.rental-options .time-field input.flatpickr-input {
    width: 100% !important;
    padding: 8px 32px 8px 8px !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 4px !important;
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpolyline points='12 6 12 12 16 14'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 8px center !important;
    font-size: 14px !important;
    color: var(--text-color) !important;
    height: 39px !important;
    line-height: normal !important;
    margin: 0 !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    cursor: pointer !important;
}

.rental-options .time-field input.flatpickr-input:hover,
.rental-options .time-field input.flatpickr-input:focus {
    border-color: var(--accent-color) !important;
    outline: none !important;
    box-shadow: none !important;
}

.rental-options .time-field input.flatpickr-input::placeholder {
    color: #666 !important;
    opacity: 1 !important;
}

/* Verstecke das zweite Input-Feld von Flatpickr */
.rental-options .time-field input.flatpickr-input[type="hidden"] {
    display: none !important;
}

.rental-availability-message {
    margin: 15px 0;
    padding: 10px 15px;
    border-radius: 4px;
    display: none; /* Standard: versteckt */
}

.rental-availability-message.checking {
    display: block;
    background: #f7f7f7;
    border: 1px solid #ddd;
    color: #666;
}

.rental-availability-message.success {
    display: block;
    background: #e7f5e7;
    border: 1px solid #c3e6c3;
    color: #2b5329;
}

.rental-availability-message.error {
    display: block;
    background: #fde8e8;
    border: 1px solid #f5c6c6;
    color: #842029;
}

.checking:before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    border: 2px solid #666;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}