/**
 * The reservation widget style
 */

.reservation-widget {
    display: flex;
    padding: 0;
    border: none;
    border-radius: 50px;
    background-color: #f8f8f8;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-block-start: 0;
}

.reservation-widget .field {
    display: flex;
    flex-direction: column;
    flex: 1;
    position: relative;
    padding: 15px 0;
    justify-content: center;
    width: 160px;
    margin-left: 30px;
}

.reservation-widget.minimal .field {
    padding: 20px 0;
    margin-left: unset;
}

.reservation-widget.minimal .field:first-child {
    margin-left: 25px;
}

.reservation-widget .field:first-child {
    margin-left: 40px;
    justify-content: unset;
    align-items: unset;
}

.reservation-widget .field:last-child {
    margin-right: 0;
}

.reservation-widget .field-seperator-container {
    display: flex;
    align-items: center;
}

.reservation-widget .field-seperator {
    border-left: 1px solid #BF9266;
    height: 50%;
    margin: auto;
}

.reservation-widget .field-header {
    font-weight: 500;
    font-size: 18px; 
    color: #242222;
    cursor: pointer;
    white-space: nowrap;
    line-height: normal;
}

.reservation-widget.minimal .field-header {
    display: none;
}

.reservation-widget .field-value {
    font-weight: 400;
    font-size: 16px;
    color: #FF7423;
    cursor: pointer;
    white-space: nowrap;
    line-height: normal;
}

.reservation-widget input.field-value {
    max-width: 120px;
    border: 0;
    outline: 0;
    
    background-color: transparent;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: text;
}

.reservation-widget .field-value::placeholder {
    color: #FF7423;
}

.reservation-widget .field-expand {
    display: none;
    position: absolute;
    top: 100%;
    margin-top: 0.5rem;
}

.reservation-widget .field-expand.show {
    display: flex;
}

.reservation-widget .field-expand.dropdown {
    flex-direction: column;
    padding: 30px 40px;
    min-width: 20rem;
    background-color: #fff;
    border-radius: 20px;
    z-index: 99;
    box-shadow: 2px 2px 21px 0px #24222229;
}

.reservation-widget #reservation-persons .field-expand.dropdown {
    padding: 10px 20px;
}

.reservation-widget #reservation-location .dropdown-item,
.reservation-widget #reservation-duration .dropdown-item,
.reservation-widget #reservation-persons .dropdown-item {
    padding: 1rem 0;
    font-weight: 500;
    font-size: 18px;
    white-space: nowrap;
    border-bottom: 1px solid #C6BDB0;
    cursor: pointer;
    line-height: normal;
}

.reservation-widget #reservation-location .dropdown-item:last-child,
.reservation-widget #reservation-duration .dropdown-item:last-child,
.reservation-widget #reservation-persons .dropdown-item:last-child {
    border-bottom: 0;
}

.reservation-widget #reservation-dates .calendar {
    width: 20rem;
}

.reservation-widget #reservation-dates .daterange-container {
    min-width: 20rem;
}

.reservation-widget .guests {
    width: 400px;
}

.reservation-widget .guest-meta {
    display: flex;
    flex-direction: column;
}

.reservation-widget .room-header {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 25px;
    color: #333;
    line-height: normal;
}

.reservation-widget .guest-selection {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.reservation-widget .guest-type {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 5px;
    line-height: normal;
}

.reservation-widget .age-range {
    font-size: 14px;
    color: black;
    line-height: normal;
}

.reservation-widget .counter {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reservation-widget .counter-button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: 1px solid black;
    background: white;
    cursor: pointer;
    font-size: 18px;
    user-select: none;
    font-weight: 400;
    margin: 0 10px;
}

.reservation-widget .counter-value {
    font-size: 16px;
    font-weight: 400;
    width: 10px;
    text-align: center;
}

.reservation-widget .add-room {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    border-top: 1px solid #eee;
    color: #FF7423;
    font-weight: 500;
    font-size: 18px;
    cursor: pointer;
}

.reservation-widget .add-room-arrow {
    font-size: 30px;
    margin-left: 5px;
    font-weight: 300;
}

.reservation-widget #reservation-code input {
    padding: 0;
}

/* Add these CSS rules to your stylesheet */

/* Adjust the guest selection to allow for the children ages dropdown */
.reservation-widget .guest-selection[data-age="children"] {
    flex-direction: column;
    align-items: flex-start;
}

/* The top part of the children selection should remain a row */
.reservation-widget .guest-selection[data-age="children"] .guest-meta,
.reservation-widget .guest-selection[data-age="children"] .counter {
    display: flex;
}

/* Make the top part of the children selection a row */
.reservation-widget .guest-selection[data-age="children"] .guest-selection-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
}

/* Style the children ages container */
#children-ages-container {
    margin-top: 15px;
    width: 100%;
}

#children-ages-container .child-age-input {
    margin-bottom: 10px;
}

#children-ages-container .child-age-input:last-child {
    margin-bottom: 0;
}

#children-ages-container .select-wrapper {
    position: relative;
    width: 100%;
}

#children-ages-container select {
    width: 100%;
    padding: 8px 30px 8px 10px;
    border-radius: 4px;
    border: 1px solid #C6BDB0;
    background-color: #fff;
    font-size: 14px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

#children-ages-container .child-age-select.error {
    border: 1px solid red;
}

#children-ages-container .select-arrow {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #A87746;
    pointer-events: none;
}

/* .reservation-widget select,
.reservation-widget input[type="text"],
.reservation-widget input[type="number"] {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    width: 100%;
    box-sizing: border-box;
    background-color: transparent;
     -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23555' width='18px' height='18px'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 12px;
    padding-right: 2rem;
}

.reservation-widget select:focus,
.reservation-widget input:focus{
    border-color: #aaa;
    outline: none;
} */

.reservation-widget button {
    padding: 0 1.8rem;
    background-color: #333; 
    color: white;
    border: none;
    border-radius: 50px; 
    cursor: pointer;
    font-size: 1rem;
    white-space: nowrap; 
}

.reservation-widget button:hover {
    background-color: #555;
}

.reservation-widget.minimal .button-text {
    display: none;
}

.reservation-widget.minimal button {
    padding: 0;
    background-color: transparent;
    border-radius: 0;
}

.reservation-widget.minimal .field {
    flex-direction: row;
}

.reservation-widget .button-icon {
    display: none;
    height: 100%;
}

.reservation-widget.minimal .button-icon {
    display: flex;
}

.daterange-container {
    display: flex;
    align-items: center;
    width: 100%;
}

.daterange-container input {
    width: 100%;
}

/* Improved Flatpickr Datepicker Styling */

/* Main calendar container */
.flatpickr-calendar {
    border-radius: 15px;
    width: min-content !important;
    min-width: auto !important;
    padding: 70px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: none !important;
}

.flatpickr-calendar .flatpickr-months .flatpickr-next-month {
    top: 75px;
    right: 30px;
}

.flatpickr-calendar .flatpickr-months .flatpickr-prev-month {
    top: 75px;
    left: 30px;
}

/* Month display */
.flatpickr-calendar .flatpickr-month .cur-month, 
.flatpickr-calendar .flatpickr-month .numInput {
    font-size: 18px;
    font-weight: 400;
}

/* Month container */
.flatpickr-calendar .flatpickr-months {
    margin-bottom: 35px;
}

/* Weekday headers */
.flatpickr-calendar .flatpickr-weekdaycontainer .flatpickr-weekday {
    font-size: 14px;
    font-weight: 400;
    color: #242222;
}

/* Day container */
.flatpickr-calendar .dayContainer {
    border: none;
    box-shadow: none;
}

/* Individual day cells */
.flatpickr-day {
    margin: 0;
    height: 40px;
    line-height: 40px;
    width: 40px;
    border-radius: 50% !important;
    color: #333;
    font-weight: 400;
    margin-top: 0 !important;
}

/* Day hover effect */
.flatpickr-day:hover {
    background: #f0f0f0;
}

/* Reset all box shadows first to prevent overlaps */
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.inRange {
    box-shadow: none;
}

.flatpickr-calendar .rangeMode .flatpickr-day {
    margin-top: 0;
}

.flatpickr-calendar .flatpickr-day.inRange {
    box-shadow: 5px 0px 0px 0px rgba(191,146,102,0.35);
}

/* Selected day */
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background-color: #BF9266 !important;
    border-color: #BF9266 !important;
    color: #FFF !important;
    font-weight: 400;
    position: relative;
    z-index: 3;
}

/* In-range days - remove box shadows completely */
.flatpickr-day.inRange {
    background: rgba(191, 146, 102, 0.35) !important;
    border-color: transparent !important;
    border-radius: 0 !important;
    margin: 0 !important;
    border: none;
}

/* First in-range day */
.flatpickr-day.startRange {
    border-radius: 50%;
    margin-right: 0 !important;
    
    position: relative;
    z-index: 10;
}

.flatpickr-day.startRange::after {
    content: "";
    position: absolute;
    top: -1px;
    right: -6px;
    background-color: rgba(191,146,102,0.35);
    width: 18px;
    height: 40px;
}

.flatpickr-day.endRange::before {
    content: "";
    position: absolute;
    top: -1px;
    left: -1px;
    background-color: rgba(191,146,102,0.35);
    width: 12px;
    height: 40px;
}

.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1),
.flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n+1)) {
    box-shadow: 5px 0px 0px 0px rgba(191,146,102,0.35);
}

/* Add the connecting shadow to the right of startRange */
/* .flatpickr-day.startRange:after {
    content: "";
    position: absolute;
    top: 0;
    right: -3px;
    width: 16px;
    height: 100%;
    background: rgba(191, 146, 102, 0.35);
    z-index: 999999;
} */

/* Last in-range day */
.flatpickr-day.endRange {
    border-radius: 50%;
    margin-left: 0 !important;
    /* Add drop shadow only to the selected day circle */
    position: relative;
}

/* Add the connecting shadow to the left of endRange */
/* .flatpickr-day.endRange:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 10px;
    height: 100%;
    background: rgba(191, 146, 102, 0.35);
    z-index: 1;
} */

/* For single day selection */
.flatpickr-day.selected:not(.startRange):not(.endRange) {
    border-radius: 50% !important;
    box-shadow: 0 5px 10px rgba(191, 146, 102, 0.4) !important;
}

/* When start and end ranges are the same day */
.flatpickr-day.startRange.endRange {
    border-radius: 50% !important;
    box-shadow: 0 5px 10px rgba(191, 146, 102, 0.4) !important;
}

/* Today's date */
.flatpickr-day.today {
    border-color: #BF9266;
    color: #BF9266;
    font-weight: 500;
}

/* Month and year headers */
.flatpickr-current-month {
    font-weight: 500 !important;
    padding: 15px 0 !important;
}

/* Next/Previous month buttons */
.flatpickr-prev-month,
.flatpickr-next-month {
    padding: 10px !important;
}

.flatpickr-prev-month svg,
.flatpickr-next-month svg {
    fill: #333 !important;
    width: 16px !important;
    height: 16px !important;
}

.flatpickr-prev-month:hover svg,
.flatpickr-next-month:hover svg {
    fill: #BF9266 !important;
}

/* Mode toggle buttons (Datum/Monat) */
.date-toggle-buttons {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
    gap: 10px;
}

.date-toggle-buttons button {
    border-radius: 50px;
    padding: 8px 20px;
    border: none;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
}

.date-toggle-buttons button.active {
    background-color: #242222;
    color: white;
}

.date-toggle-buttons button:not(.active) {
    background-color: transparent;
    border: 1px solid #e0e0e0;
}

/* Fix for side-by-side months */
.flatpickr-calendar.rangeMode {
    width: auto !important;
    top: 120% !important;
    left: 240px !important;
}

.heroimagecontainer {
    z-index: 99;
}

.heroimagecontainer .flatpickr-calendar.rangeMode {
    width: auto !important;
    top: 94% !important;
    left: 240px !important;
}

.sticky-widget .flatpickr-calendar.rangeMode {
    left: 190px !important;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    display: none;
    -webkit-appearance: none;
}

.sticky-widget {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    height: 60px;
}

.sticky-widget.visible {
    display: flex !important;
    transform: translateY(0);
}

.sticky-widget .field {
    align-items: center;
}

.sticky-widget .field:first-child {
    align-items: center;
}

/* Make the sticky widget more compact */
.sticky-widget .field-header {
    font-size: 16px;
}

.sticky-widget .field-value {
    font-size: 16px;
}

.mobile-text {
    display: none;
}

@media (max-width: 410px) {
    .reservation-widget.partial-enabled .pp-srp-mobile-summary {
        width: 220px !important;
    }
}

@media (max-width: 768px) {
    .reservation-widget {
        flex-direction: row;
        width: 90vw;
    }

    /* .reservation-widget.partial-enabled .pp-srp-mobile-summary {
        width: 220px !important;
    } */

    .reservation-widget.partial-enabled {
        width: unset;
    }
    .reservation-widget .field {
        margin-right: 0;
        margin-bottom: 0.5rem; 
        width: 100%;
    }
    #reservation-dates, #reservation-guests, #reservation-duration, #reservation-persons, #reservation-code, .reservation-widget  .field-seperator-container, .desktop-text {
        display: none;
    }

    .reservation-widget #reservation-location {
        margin-bottom: 0;
        margin-left: 30px;
        width: 185px;
    }

    .reservation-widget .field-header.mobile-text {
        display: inline;
        font-size: 16px;
        color: #FF7423;
    }

    #search-button .button-text {
        display: none;
    }
    #search-button .button-icon {
        display: flex;
    }

    .reservation-widget button {
        padding: 0;
    }

    .reservation-widget .field:first-child {
        justify-content: center;
    }
}