/**
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License version 3.0
 * that is bundled with this package in the file LICENSE.txt
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/AFL-3.0
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade this module to a newer
 * versions in the future. If you wish to customize this module for your
 * needs please refer to CustomizationPolicy.txt file inside our module for more information.
 *
 * @author Webkul IN
 * @copyright Since 2010 Webkul
 * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
 */

/* MP Booking Faceted Search - Civitatis Style */

#mpbooking-faceted-search {
    margin-bottom: 20px;
    background: #fff;
    border: 1px solid #ddd;
}

#mpbooking-faceted-search .block-title {
    display: none;
}

#mpbooking-faceted-search .block-content {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0;
}

/* Filter Block */
.filter-block {
    border-radius: 4px;
    padding: 0px 10px;
    min-width: 200px;
    flex: 1;
}

.filter-title {
    background-color: #efefef;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 5px;
}

.filter-toggle {
    font-size: 18px;
    color: #666;
    transition: transform 0.2s;
}

.filter-block.collapsed .filter-toggle {
    transform: rotate(-90deg);
}

/* Filter Options */
.filter-options {
    margin-top: 10px;
}

.filter-option-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.filter-option {
    margin-bottom: 4px;
}

.filter-label {
    display: flex;
    align-items: center;
    margin-bottom: unset;
    cursor: pointer;
    font-size: 13px;
    color: #666;
}

.filter-input {
    margin-right: 8px;
    cursor: pointer;
}

.filter-checkbox-label,
.filter-radio-label {
    text-align: left;
    cursor: pointer;
    flex: 1;
    font-size: .875rem;
}

.filter-count {
    font-size: 11px;
    color: #999;
    margin-left: 5px;
}

/* Availability Options */
.availability-options {
    display: flex;
    width: 100%;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    border: 1px solid #ddd;
    border-radius: 25px;
    overflow: hidden;
}

.availability-option {
    /* flex: 1; */
    justify-content: center; /* center text */
    text-align: center;
    border-right: 1px solid #ddd;
    margin: 0px;
    padding: 4px 7px;
    cursor: pointer;
    transition: all 0.2s;

    /* display: flex;
    align-items: center;

    border-right: 1px solid #ddd; */
}

.availability-option:last-child {
    border-right: none;
    flex: 1.6;
    /* min-width: 7.5rem; */
}

.date-box .month {
    color: #232323;
}

.availability-option:last-child .option-text {
    white-space: nowrap;
}

.availability-option:hover {
    background-color: #ea0558;
    border-color: #ea0558;
    color: #fff;
}

.availability-option.active {
    background-color: #ea0558;
    border-color: #ea0558;
}

.availability-option input {
    display: none;
}

.availability-option .option-text {
   width: 100%;
    /* font-size: 10px;
    color: #333;
    font-weight: 500; */
}

.availability-option.active .option-text {
    color: #fff;
}

.option-separator {
    display: none;
}

/* Date Range Picker */
.date-range-picker {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

/* Date box quick actions */
.date-box-quick-actions {
    display: flex;
    gap: 10px;
    padding: 6px 6px 2px;
    justify-content: center;
}

/* Show quick buttons only when calendar is inside date-box */
.date-range-picker .date-box-quick-actions {
    display: none;
}

.date-range-in-date-box .date-box-quick-actions {
    display: flex;
}

.date-box-quick-btn {
    border: 1px solid #e2e6ee;
    background: #fff;
    color: #2b2f3a;
    padding: .25rem;
    width: 5.5rem;
    font-size: .875rem;
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.date-box-quick-btn:hover {
    background-color: #ea0558;
    border-color: #ea0558;
    color: #fff;
}

/* Date box calendar (theme-agnostic) */
.date-box {
    position: relative;
}

.date-box .date-range-in-date-box {
    position: absolute;
    top: calc(100% + 0px);
    left: 0;
    width: inherit;
    min-width: 320px;
    max-width: 92vw;
    background: #ffffff;
    border-radius: 8px;
    padding: 12px 14px;
    box-shadow: 0 16px 40px rgba(15, 17, 26, 0.18);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.date-box .date-range-in-date-box .wk-calendar-wrapper {
    margin-top: 0;
}

.date-box .date-range-in-date-box .clndr-controls {
    padding: 6px 2px;
    margin-bottom: 4px;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
}

.date-box .date-range-in-date-box .clndr-control-button {
    border-radius: 8px;
    color: #2b2f3a;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
}

.date-box .date-range-in-date-box .clndr-previous-button,
.date-box .date-range-in-date-box .clndr-next-button {
    color: #2b2f3a;
}

.date-box .date-range-in-date-box .clndr-previous-button .material-icons,
.date-box .date-range-in-date-box .clndr-next-button .material-icons {
    font-size: 2.25rem;
    color: #666;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Material Icons';
    line-height: 1;
    vertical-align: middle;
}

.date-box .date-range-in-date-box .header-days {
    background: transparent;
    color: #8b93a7;
    font-weight: 600;
    font-size: 12px;
}

.date-box .date-range-in-date-box .clndr-table {
    margin: 6px 0 4px;
}

.date-box .date-range-in-date-box .clndr-table th,
.date-box .date-range-in-date-box .clndr-table td {
    font-size: .8125rem;
    border: none;
    text-transform: uppercase;
    color: #999;
    font-weight: 300;
    height: 36px;
    width: 36px;
}

.date-box .date-range-in-date-box .day-contents {
    font-size: 1rem !important;
    min-width: 30px;
    min-height: 30px;
    color: #2b2f3a;
}

.clndr-table .today {
    font-weight: 700 !important;
}

.adjacent-month {
    visibility: hidden;
}

.date-box .date-range-in-date-box .day.unavailable .day-contents {
    color: #b5bccb;
}

.date-box .date-range-in-date-box .day.unavailable {
    opacity: 0.7;
}

.date-box .date-range-in-date-box .monthyear {
    color: #2b2f3a;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 140px;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    font-size: 1rem;
    font-weight: 300;
}

/* Ensure calendar is not clipped by hero container */
.rome-hero,
.hero-content {
    overflow: visible !important;
}

.hero-search,
.date-box {
    position: relative;
    z-index: 10;
    overflow: visible !important;
}

/* Match customclassic #search_filters look */
#mpbooking-faceted-search {
    border-radius: 4px;
    border: 1px solid #d0d0d8;
    box-shadow: none;
    padding: 0.55rem 0.65rem;
}

#mpbooking-faceted-search .filter-block {
    padding: 0.35rem 0;
    /* border-bottom: 1px solid #e3e3e8; */
}

#mpbooking-faceted-search .filter-block:last-child {
    border-bottom: 0;
}

#mpbooking-faceted-search .filter-title {
    /* font-size: 0.85rem; */
}

#mpbooking-faceted-search .ui-slider-horizontal {
    height: 8px;
    border-radius: 999px;
    background: #d5d7de;
    width: 100% !important;
}

#mpbooking-faceted-search .ui-slider .ui-slider-range {
    background: var(--cc-primary);
    margin-left: 10px;
}

#mpbooking-faceted-search .ui-slider .ui-slider-handle {
    width: 23px;
    height: 23px;
    border-radius: 50%;
    border: 8px solid var(--cc-primary);
    background: #fff;
    top: -8px;
}

#mpbooking-faceted-search .slider-container {
    padding: 0 16px 0 10px;
    box-sizing: border-box;
}

.date-range-picker .form-group {
    flex: 1;
}

.date-range-picker label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 5px;
    color: #666;
}

.date-range-picker input {
    width: 100%;
    padding: 6px 10px;
    font-size: 13px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

/* Slider Styles */
.filter-slider {
    padding: 5px 0;
}

/* Start time slider styling (reference-like) */
[data-filter-type="starttime"] .ui-slider {
    height: 6px;
    background: #f1f3f6;
    border-radius: 999px;
    margin: 8px 4px 14px;
}

[data-filter-type="starttime"] .ui-slider .ui-slider-range {
    background: #ff2d55;
    border-radius: 999px;
}

[data-filter-type="starttime"] .ui-slider .ui-slider-handle {
    width: 16px;
    height: 16px;
    top: -5px;
    background: #ffffff;
    border: 2px solid #ff2d55;
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
    position: absolute;
}

[data-filter-type="starttime"] .ui-slider .ui-slider-handle::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: transparent;
}

[data-filter-type="starttime"] .slider-values {
    color: #8c94a4;
    font-weight: 600;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    padding: 0 2px;
}

[data-filter-type="starttime"] .current-value {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: #2b2f3a;
    background: #f5f6f8;
    padding: 6px 12px;
    border-radius: 999px;
    margin: 10px auto 0;
}

.slider-container {
    margin: 10px 0;
}

.ui-slider {
    position: relative;
    text-align: left;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
}

.ui-slider .ui-slider-range {
    position: absolute;
    z-index: 1;
    display: block;
    border: 0;
    background-position: 0 0;
    background-color: #337ab7;
    border-radius: 3px;
}

.ui-slider .ui-slider-handle {
    position: absolute;
    z-index: 2;
    width: 16px;
    height: 16px;
    top: -5px;
    margin-left: -8px;
    cursor: pointer;
    background-color: #fff;
    border: 2px solid #337ab7;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.slider-values {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #999;
    margin-top: 5px;
}

.slider-inputs {
    /* margin-top: 10px; */
    text-align: center;
}

.slider-inputs input[type="hidden"] {
    display: none;
}

.current-value {
    font-size: 13px;
    font-weight: 500;
    color: #333;
}

/* No categories message */
.no-categories,
.no-features {
    font-style: italic;
    color: #999;
    font-size: 13px;
}

/* Active filters clear-all button */
#mpbooking-active-filters .active-filters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

#mpbooking-active-filters .filter-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

#mpbooking-active-filters .clear-all-filters {
    border: 1px solid;
    border-color: #ea0558;
}

#mpbooking-active-filters .clear-all-filters .remove-filter-all {
    width: auto;
    display: inline-flex;
    align-items: center;
    /* padding: 6px 14px; */
    border-radius: 4px;
    color: #232323;;

    /* color: #ff2d55; */
    background: #fff;
    /* font-weight: 600; */
    text-decoration: none;
}

#mpbooking-active-filters .clear-all-filters .remove-filter-all:hover {
    /* background: #fff1f4; */
}

/* CLNDR Calendar Styles */
.wk-calendar-wrapper {
    margin-top: 15px;
}

.clndr-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}

.clndr-table th,
.clndr-table td {
    /* padding: 8px; */
    text-align: center;
    vertical-align: middle;
}

.header-days {
    /* background-color: #f5f5f5; */
    /* font-weight: bold; */
}

.day-contents {
    min-width: 30px;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    margin: 0 auto;
}

.day-contents:hover {
    background-color: #f0f0f0;
}

.day-contents.selected {
    background-color: #ea0558;
    color: white;
}

.day-contents.active-day {
    background-color: #ea0558;
    color: white;
}

.day-contents.in-range {
    background-color: #ffe6e9;
    color: #333;
}

.day-contents.in-range.start-date,
.day-contents.in-range.end-date {
    background-color: #ea0558;
    color: white;
}

.unavailable {
    opacity: 0.5;
    cursor: not-allowed;
}

.clndr-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.clndr-control-button {
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 3px;
}

.clndr-control-button:hover {
    /* background-color: #e0e0e0; */
}

.monthyear {
    text-align: center;
    font-weight: bold;
    min-width: 120px;
}

/* Selected date range display */
.selected-date-range {
    margin: 10px 0;
    padding: 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.selected-date-range span {
    font-weight: 600;
    color: #ea0558;
}

/* Calendar base */
.clndr-table td {
    position: relative;
    text-align: center;
    height: 42px;
    width: 42px;
    cursor: pointer;
}

/* Default day */
.day .day-contents {
    /* width: 36px; */
    /* height: 36px; */
    line-height: 36px;
    margin: auto;
    border-radius: 50%;
    transition: all 0.2s ease;
}

/* Hover */
.day:hover .day-contents {
    background: #f2f2f2;
}

/* START / END date (pink circle) */
.day.start-date .day-contents,
.day.end-date .day-contents {
    background: #ff2d6f;
    color: #fff;
    font-weight: 600;
}

/* RANGE (light pink background bar) */
.day.in-range {
    background: #ffd6e2;
}

/* Make range continuous */
.day.in-range .day-contents {
    background: transparent;
}

/* Fix edges (left rounded for start) */
.day.start-date {
    background: #ffd6e2;
    border-radius: 20px 0 0 20px;
}

/* Fix edges (right rounded for end) */
.day.end-date {
    background: #ffd6e2;
    border-radius: 0 20px 20px 0;
}

/* If same day selected */
.day.start-date.end-date {
    background: transparent;
}

/* Disabled past dates */
.day.unavailable {
    opacity: 0.3;
    pointer-events: none;
}

/* Header */
.clndr-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
}

.monthyear {
    font-weight: 600;
}

/* Arrow buttons */
.clndr-previous-button,
.clndr-next-button {
    cursor: pointer;
    font-size: 20px;
}

/* Till tooltip */
.till-tooltip {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: #f5d9a6;
    color: #333;
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 6px;
    display: none;
    white-space: nowrap;
    transition: all 0.15s ease;
}

/* Tooltip arrow */
.till-tooltip::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: #f5d9a6 transparent transparent transparent;
}

/* Show tooltip */
.day.show-till .till-tooltip {
    display: block;
}

/* Hover preview range */
.day.hover-range {
    background: #ffe3ec;
}

.day.hover-range .day-contents {
    background: transparent;
}

/* Responsive calendar */
@media (max-width: 480px) {
    .clndr-table th,
    .clndr-table td {
        padding: 6px;
        font-size: 12px;
    }

    .day-contents {
        min-width: 25px;
        min-height: 25px;
    }
}

/* Feature Group */
.feature-group {
    /* margin-bottom: 15px; */
}

.feature-group-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

/* Responsive */
@media (max-width: 767px) {
    #mpbooking-faceted-search .block-content {
        flex-direction: column;
    }

    .filter-block {
        min-width: 100%;
    }
}

/* Active Filters */
#mpbooking-active-filters {
    margin-bottom: 15px;
    padding: 10px 15px;
    /* background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px; */
}

#mpbooking-active-filters .block-title {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

#mpbooking-active-filters .active-filters-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#mpbooking-active-filters .filter-item {
    display: inline-flex;
    align-items: center;
    background: #fff;
    /* border: 1px solid #007bff; */
    /* border-radius: 20px; */
    padding: 5px 10px;
    font-size: 13px;
}

#mpbooking-active-filters .filter-label {
    color: #666;
    margin-right: 5px;
}

#mpbooking-active-filters .filter-value {
    /* color: #007bff;
    font-weight: 500; */
}

#mpbooking-active-filters .remove-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    /* background: #007bff; */
    /* color: #fff; */
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}

#mpbooking-active-filters .remove-filter:hover {
    /* background: #0056b3; */
}

#mpbooking-active-filters .remove-filter i {
    font-size: 14px;
    line-height: 1;
}

/* Active Filters - Header Position */
#mpbooking-active-filters.block {
    margin-bottom: 15px;
    padding: 12px 15px;
    /* background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px; */
}

#mpbooking-active-filters .block-title {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

#mpbooking-active-filters .active-filters-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#mpbooking-active-filters .filter-item {
    display: inline-flex;
    align-items: center;
    background: #fff;
    padding: 10px 15px;
    margin: 0.15rem;
    font-size: 1rem;
    /* display: inline-flex;
    align-items: center;
    background: #fff;
    border: 1px solid #ea0558;
    border-radius: 20px;
    padding: 5px 10px;
    font-size: 13px; */
}

#mpbooking-active-filters .filter-label {
    color: #232323;;
    margin-right: 5px;
}

#mpbooking-active-filters .filter-value {
    color: #232323;;
    /* color: #ea0558;
    font-weight: 500; */
}

#mpbooking-active-filters .remove-filter {
    color: #ea0558;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    /* background: #ea0558; */
    /* color: #fff; */
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}

#mpbooking-active-filters .remove-filter:hover {
    /* background: #0056b3; */
}

#mpbooking-active-filters .remove-filter i {
    font-size: 14px;
    line-height: 1;
}
