/* 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 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: 12px; }
    .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; }
