/* Shared design for listing, category, map, date and search dialogs. */
.list-refined-modal .modal-dialog {
    width: calc(100% - 32px);
    max-width: 680px;
    margin: 48px auto;
}
.list-refined-modal .modal-content {
    overflow: hidden;
    border: 1px solid #ebebeb;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .16);
    color: #222;
    background: #fff;
}
.list-refined-modal .modal-header {
    padding: 24px 28px;
    border-bottom: 1px solid #ebebeb;
}
.list-refined-modal .modal-title {
    margin: 0;
    padding-right: 40px;
    font-size: 22px;
    line-height: 32px;
    font-weight: 700;
}
.list-refined-modal .close {
    width: 34px;
    height: 34px;
    margin: 0;
    border-radius: 50%;
    background: #f7f7f7;
    color: #484848;
    font-size: 26px;
    line-height: 32px;
    text-shadow: none;
    opacity: 1;
}
.list-refined-modal .close:hover { background: #eee; }
.list-refined-modal .modal-body {
    padding: 24px 28px 28px;
    max-height: calc(100vh - 180px);
    max-height: calc(100dvh - 180px);
    overflow-y: auto;
    overscroll-behavior: contain;
}
.list-refined-modal .list-modal-filter { height: auto; }
.list-refined-modal .list-category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.list-refined-modal a.square_menu_btn,
.list-refined-modal a.square_menu_btn:visited {
    display: flex;
    align-items: center;
    min-height: 56px;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
    color: #222;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    overflow-wrap: anywhere;
    text-decoration: none;
    transition: border-color .15s, background-color .15s;
}
.list-refined-modal .list-category-grid a.square_menu_btn {
    gap: 8px;
}
.list-refined-modal .list-category-grid .listing-category-icon {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    object-fit: contain;
}
.list-refined-modal .list-category-label {
    min-width: 0;
}
.list-refined-modal a.square_menu_btn:hover {
    border-color: #222;
    background: #f7f7f7;
    color: #222;
}
.list-refined-modal .list-filter-section {
    min-width: 0;
    margin: 0 0 24px;
    padding: 0 0 24px;
    border: 0;
    border-bottom: 1px solid #ebebeb;
}
.list-refined-modal .list-filter-section:last-of-type {
    margin-bottom: 0;
    border-bottom: 0;
}
.list-refined-modal .list-filter-section legend {
    width: auto;
    margin: 0 0 14px;
    padding: 0;
    border: 0;
    color: #222;
    font-size: 16px;
    line-height: 1.5;
    font-weight: 700;
}
.list-refined-modal .list-filter-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.list-refined-modal .filter-checkbox {
    display: block;
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    overflow: hidden;
    white-space: nowrap;
}
.list-refined-modal .filter-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    margin: 0;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
    color: #222;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    transition: border-color .15s, background-color .15s;
}
.list-refined-modal .filter-checkbox-label::before {
    content: '';
    display: inline-flex;
    flex: 0 0 18px;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: 1px solid #b0b0b0;
    border-radius: 5px;
    background: #fff;
    font-size: 12px;
    line-height: 1;
}
.list-refined-modal .filter-checkbox-label:hover { border-color: #222; }
.list-refined-modal .filter-checkbox:checked + .filter-checkbox-label {
    border-color: #222;
    background: #f7f7f7;
    color: #222;
}
.list-refined-modal .filter-checkbox:checked + .filter-checkbox-label::before {
    content: '\2713';
    border-color: #222;
    background: #222;
    color: #fff;
}
/* Dietary and optional services stay as simple rows, with a checkbox on the right. */
.list-refined-modal .list-filter-section:not(:last-of-type) .list-filter-options {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
}
.list-refined-modal .list-filter-section:not(:last-of-type) .filter-checkbox-label {
    min-height: 44px;
    padding: 8px 0;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: #222;
}
.list-refined-modal .list-filter-section:not(:last-of-type) .filter-checkbox-label::before {
    order: 1;
    margin-left: auto;
}
.list-refined-modal .list-filter-footer {
    position: sticky;
    bottom: -28px;
    margin: 0 -28px -28px;
    padding: 18px 28px;
    border-top: 1px solid #ebebeb;
    background: #fff;
    text-align: right;
}
.list-refined-modal a.list-filter-apply {
    display: inline-block;
    width: auto;
    min-width: 200px;
    margin: 0;
    padding: 14px 28px;
    border: 0;
    border-radius: 10px;
    background: #FF5055;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
    text-align: center;
}
.list-refined-modal a.list-filter-apply:hover { background: #FF5055; }
.list-refined-modal a:focus-visible,
.list-refined-modal button:focus-visible,
.list-refined-modal .filter-checkbox:focus-visible + .filter-checkbox-label {
    outline: 2px solid #222;
    outline-offset: 3px;
}
@media (max-width: 600px) {
    .list-refined-modal .modal-dialog { margin: 16px auto; }
    .list-refined-modal .modal-header { padding: 20px; }
    .list-refined-modal .modal-title { font-size: 19px; }
    .list-refined-modal .modal-body {
        padding: 20px;
        max-height: calc(100vh - 120px);
        max-height: calc(100dvh - 120px);
    }
    .list-refined-modal .list-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .list-refined-modal a.square_menu_btn { padding: 10px; }
    .list-refined-modal .list-category-grid .listing-category-icon {
        flex-basis: 28px;
        width: 28px;
        height: 28px;
    }
    .list-refined-modal .list-filter-options { grid-template-columns: minmax(0, 1fr); }
    .list-refined-modal .list-filter-footer {
        bottom: -20px;
        margin: 0 -20px -20px;
        padding: 16px 20px;
    }
    .list-refined-modal a.list-filter-apply { width: 100%; min-width: 0; }
}

/* Search and calendar use the same modal shell and primary action. */
.list-refined-modal .list-filter-footer .btn-my-red {
    display: inline-block;
    width: auto;
    min-width: 200px;
    margin: 0;
    padding: 14px 28px;
    border: 0;
    border-radius: 10px;
    background: #FF5055;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
    text-align: center;
}
.list-refined-modal .list-filter-footer .btn-my-red:hover { background: #FF5055; }
.list-search-modal form.header-search { margin: 0; }
.list-search-modal div.header-search {
    height: auto;
    border: 1px solid #b0b0b0;
    border-radius: 12px;
}
.list-search-modal div.header-search:focus-within { border-color: #222; box-shadow: 0 0 0 1px #222; }
.list-search-modal ul.header-search {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 14px 16px;
    list-style: none;
}
.list-search-modal li.header-search-icon { flex: 0 0 auto; width: auto; color: #717171; }
.list-search-modal li.header-search-input { flex: 1; min-width: 0; width: auto; }
.list-search-modal input.header-search { padding: 0; color: #222; line-height: 24px; background: #fff; }
.list-search-modal .list-search-heading { margin: 24px 0 12px; font-size: 16px; font-weight: 700; }
.list-search-modal ul.header-search-place { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 24px; }
.list-search-modal li.header-search-place { margin: 0; padding: 0; border: 0; font-size: 14px; font-weight: 400; }
.list-search-modal li.header-search-place a {
    display: inline-block;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 10px;
    color: #222;
    line-height: 20px;
    text-decoration: none;
}
.list-search-modal li.header-search-place a:hover { border-color: #222; background: #f7f7f7; }
.list-search-modal #app1 > ul.header-search-place:empty { display: none; }
.list-search-modal .list-filter-footer { margin-top: 24px; }
.list-dates-modal .modal-dialog { max-width: 560px; }
.list-dates-modal .list-calendar-controls { position: relative; height: 40px; }
.list-dates-modal .list-calendar-nav {
    position: absolute;
    top: 0;
    z-index: 1;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 50%;
    background: #fff;
    color: #222;
    font-size: 28px;
    line-height: 34px;
}
.list-dates-modal .list-calendar-nav:hover { background: #f7f7f7; border-color: #222; }
.list-dates-modal #prev { left: 0; }
.list-dates-modal #next { right: 0; }
.list-dates-modal .divs { margin-top: -40px; }
.list-dates-modal .divs p { min-height: 40px; margin: 0 44px 16px; padding-top: 8px; color: #222; }
.list-dates-modal table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 4px; }
.list-dates-modal th { height: 32px; color: #717171; font-size: 12px; font-weight: 400; }
.list-dates-modal .sample label {
    display: flex;
    align-items: center;
    justify-content: center;
    float: none;
    width: 40px;
    height: 40px;
    margin: 0 auto;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #222;
    font-size: 14px;
}
.list-dates-modal .sample label:not([for]) { visibility: hidden; }
.list-dates-modal .sample input:not(:disabled) + label:hover { background: #f7f7f7; box-shadow: inset 0 0 0 1px #222; }
.list-dates-modal .sample input:checked + label { background: #222; color: #fff; }
.list-dates-modal .sample input:disabled + label { cursor: default; color: #b0b0b0; font-weight: 400; }
.list-dates-modal .sample input {
    display: block;
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    overflow: hidden;
}
.list-dates-modal .sample input:focus-visible + label { outline: 2px solid #222; outline-offset: 2px; }
.list-dates-modal #date_form { margin-top: 24px; }
.list-dates-modal #date_form:empty { display: none; }
@media (max-width: 600px) {
    .list-refined-modal .list-filter-footer .btn-my-red { width: 100%; min-width: 0; }
    .list-dates-modal .sample label { width: 34px; height: 34px; }
    .list-dates-modal table { border-spacing: 2px 4px; }
}

.list-search-modal form.header-search > br { display: none; }
.list-dates-modal .sample input:checked + label:hover { background: #222; color: #fff; }

/* Friendly, compact controls; only the listing header toolbar is affected. */
.header-filter-button {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.header-filter-button::-webkit-scrollbar { display: none; }
.header-filter-button > button.square_btn,
.header-filter-button > button.square_btn_checked {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 34px;
    box-sizing: border-box;
    margin: 0;
    padding: 5px 10px;
    border: 1px solid #e8e5e2;
    border-radius: 8px;
    background: #fff;
    color: #474340;
    font: inherit;
    font-size: 12px;
    font-weight: 500;
    line-height: 20px;
    white-space: nowrap;
    box-shadow: 0 2px 3px rgba(71, 52, 39, .035);
    transition: background-color .16s ease, border-color .16s ease, transform .12s ease, box-shadow .16s ease;
}
.header-filter-button > button::before {
    content: "";
    display: block;
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    background: currentColor;
    -webkit-mask: var(--listing-toolbar-icon) center / contain no-repeat;
    mask: var(--listing-toolbar-icon) center / contain no-repeat;
}
.header-filter-button > button[data-target="#map"],
.header-filter-button > button[onclick*="/map/"] {
    --listing-toolbar-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m9%2018-6%203V6l6-3%206%203%206-3v15l-6%203-6-3Z%22%2F%3E%3Cpath%20d%3D%22M9%203v15M15%206v15%22%2F%3E%3C%2Fsvg%3E");
}
.header-filter-button > button[data-target="#dates"] {
    --listing-toolbar-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%225%22%20width%3D%2218%22%20height%3D%2216%22%20rx%3D%223%22%2F%3E%3Cpath%20d%3D%22M16%203v4M8%203v4M3%2011h18%22%2F%3E%3Cpath%20d%3D%22m9%2016%202%202%204-4%22%2F%3E%3C%2Fsvg%3E");
}
.header-filter-button > button[data-target="#menu"] {
    --listing-toolbar-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%203v5a3%203%200%200%200%206%200V3M7%203v18M19%2021V3c-4%202-5%207-5%2010h5%22%2F%3E%3C%2Fsvg%3E");
}
.header-filter-button > button[data-target="#filter"] {
    --listing-toolbar-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%207h5m4%200h7M4%2017h9m4%200h3%22%2F%3E%3Ccircle%20cx%3D%2211%22%20cy%3D%227%22%20r%3D%222%22%2F%3E%3Ccircle%20cx%3D%2215%22%20cy%3D%2217%22%20r%3D%222%22%2F%3E%3C%2Fsvg%3E");
}
.header-filter-button > button.square_btn_checked {
    background: #fff1ed;
    border-color: #f3b7a7;
    color: #b54532;
}
@media (hover: hover) {
    .header-filter-button > button:hover {
        background: #fff8f5;
        border-color: #efc8bb;
        color: #9b4d3b;
        box-shadow: 0 3px 6px rgba(71, 52, 39, .06);
    }
}
.header-filter-button > button:active {
    transform: scale(.96);
    box-shadow: none;
}
.header-filter-button > button:focus-visible {
    outline: 2px solid #c66048;
    outline-offset: -3px;
}
@media (prefers-reduced-motion: reduce) {
    .header-filter-button > button { transition: none; }
    .header-filter-button > button:active { transform: none; }
}
