/* Search form */
form#meeting-search {
    max-width: 1000px;
}

form#meeting-search .row {
    width: 100%;
    margin-bottom: 16px;
}

form#meeting-search .row.submit-reset {
    gap: 16px;
    margin-top: 48px;
}

form#meeting-search .row .column {
    width: 100%;
    margin-bottom: 20px;
}

@media screen and (min-width: 768px) {
    form#meeting-search .row {
        display: flex;
        gap: 32px;
        margin-bottom: 8px;
    }

    form#meeting-search .row .column {
        width: 50%;
        margin-bottom: 0;
    }
}

form#meeting-search .row.filter-time-of-day {
    max-width: 800px;
}

form#meeting-search span.text-input-label {
    display: inline-block;
    margin: 0px 0px 8px 0px;
}

form#meeting-search input,
form#meeting-search select {
    background-image: none;
}

form#meeting-search .multiselect-dropdown {
    width: 100% !important;
    padding: 13px 16px !important;
    display: flex;
    align-items: center;
    height: 50px;
}

form#meeting-search select:not(.has-label-bottom) {
    margin: 0px 0px 8px 0px;
}

form#meeting-search .multiselect-dropdown .placeholder {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #343434;
    margin: 0 !important;
    text-transform: capitalize;
}

form#meeting-search .multiselect-dropdown .multiselect-dropdown-list > div input {
    display: inline-block;
    height: 20px;
    width: auto;
}

form#meeting-search .multiselect-dropdown .multiselect-dropdown-list > div label {
    margin: 0;
    display: inline-block;
    vertical-align: top;
    line-height: 27px;
}

form#meeting-search .multiselect-dropdown .optext {
    width: auto;
    background-color: #e5decd;
    font-size: 14px;
    font-weight: 500;
}

form#meeting-search .multiselect-dropdown .optext .optdel {
    margin-top: 1px !important;
}

/* Checkbox fields */
form#meeting-search .row fieldset.checkboxes {
    display: flex;
    flex-wrap: wrap;
}

form#meeting-search .input-error {
    border: 1px solid #7e171b;
    background-color: #fffefb;
    padding: 4px;
}

form#meeting-search span.input-error-message {
    font-size: 14px;
    color: #7e171b;
    display: block; /* Needed for line height to take effect. */
    line-height: 20px;
}

form#meeting-search .row fieldset.checkboxes legend {
    width: 100%;
}

form#meeting-search .row fieldset.checkboxes .checkbox-field {
    position: relative;
    margin-right: 16px;
    margin-bottom: 16px;
}

form#meeting-search .row fieldset.checkboxes label {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    background: #f1eee7;
    border-radius: 34px;
    height: 48px;
    font-weight: 400;
    font-size: 16px;
    line-height: 148%;
    color: #343434;
    transition: all 0.3s ease;
    margin: 0;
    cursor: pointer;
}

form#meeting-search .row fieldset.checkboxes label::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    flex-grow: 0;
    border: 1px solid rgb(52, 52, 52);
    border-radius: 2px;
    margin-left: 16px;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: auto;
    transition: all 0.3s ease;
}

form#meeting-search .row fieldset.checkboxes input[type="checkbox"] {
    position: absolute;
    z-index: -1;
    opacity: 0;
}

form#meeting-search .row fieldset.checkboxes input[type="checkbox"]:checked + label {
    background: #958563;
    color: #fffefb;
}

form#meeting-search .row fieldset.checkboxes input[type="checkbox"]:checked + label::after {
    border-color: #fffefb;
    background-color: #fffefb;
    background-image: url("/wp-content/uploads/2023/01/meeting-checked-checkbox.svg");
}

form#meeting-search .row.filter-time-of-day .checkbox-field label {
    width: 280px;
    justify-content: space-between;
}

form#meeting-search span.label-bottom {
    font-size: 14px;
    font-weight: normal;
    line-height: 1;
}

a.show-search-options {
    position: relative;
    display: block;
    margin: 1rem 0;
    letter-spacing: 0.01em;
    font-weight: 500;
    font-size: 18px;
    line-height: 25px;
    color: #094ea4;
    padding: 0.4% 2.5% 0.4% 1.5%;
    box-shadow: 0px 3px 14px rgba(7, 7, 7, 0.39);
    border-radius: 6px;
}

a.show-search-options svg {
    position: absolute;
    top: 14px;
    right: 4px;
    transition: all 0.3s ease;
}

a.show-search-options.opened svg {
    transform: rotate(180deg);
}

form#meeting-search #additional-search-options.hide {
    display: none;
}

form#meeting-search .row.submit-reset input {
    margin-bottom: 10px;
}

/* Search results */
.meeting-tile {
    background-color: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 11px 15px 25px 0px rgba(27, 27, 27, 0.2);
}

.meeting-tile:not(:last-child) {
    margin-bottom: 32px;
}

.meeting-tile .meeting-details {
    width: 100%;
}

.meeting-tile .row {
    width: 100%;
}

.meeting-tile .row.notes-location .accordion-heading-button,
.meeting-tile .row.notes-location a.meeting-google-map {
    padding: 5px;
}

.meeting-tile .row.notes-location .accordion-heading-button {
    font-weight: 700;
}

.meeting-tile .row .column {
    margin-bottom: 20px;
}

.meeting-tile .row:not(:last-child) {
    margin-bottom: 8px;
}

.meeting-tile .row.tables .column {
    width: 100%;
}

.meeting-tile .row.meeting-buttons {
    margin-bottom: 8px;
}

.meeting-tile .meeting-count {
    color: #343434;
    font-size: 34px;
    font-weight: 500;
    line-height: 39px;
}

.meeting-tile .row.meeting-buttons .column:first-child > * {
    margin-bottom: 10px;
}

.meeting-tile .tile-footer p {
    padding-bottom: 0;
    margin-bottom: 0;
}

.meeting-tile .tile-footer p:not(:last-child),
.meeting-tile .tile-footer form:not(:last-child) {
    margin-bottom: 8px;
}

.meeting-tile h2:not(.accordion-heading) {
    font-size: 26px;
    font-weight: bold;
    text-align: left;
}

.meeting-tile h2.accordion-heading {
    padding-bottom: 0 !important;
    font-size: 18px;
}

.meeting-tile h2:not(.accordion-heading),
.meeting-popup h2.accordion-heading {
    padding-bottom: 10px !important;
}

.meeting-tile h2.day-time-heading {
    padding-bottom: 4px;
    margin-bottom: 0 !important;
}

.meeting-tile h2 span.meeting-time {
    text-transform: uppercase;
}

.meeting-tile h3 {
    font-size: 24px;
}

.meeting-tile p,
.meeting-tile a,
.meeting-tile .button,
.meeting-tile th,
.meeting-tile td,
.meeting-tile form.meeting-intergroup-form input[type="submit"],
.meeting-tile form.meeting-region-form input[type="submit"] {
    font-size: 18px;
}

.meeting-tile form.meeting-intergroup-form input[type="submit"],
.meeting-tile form.meeting-region-form input[type="submit"],
.meeting-tile a.underline {
    color: #343434;
    text-decoration: underline;
}

.meeting-tile a.underline {
    display: block;
    line-height: 1.2;
}

.meeting-tile .location-links a.underline {
    margin: 16px 0;
}

.meeting-tile form.meeting-intergroup-form input[type="submit"],
.meeting-tile form.meeting-region-form input[type="submit"] {
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.meeting-tile p.meeting-last-update-container {
    font-size: 15px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.meeting-tile p.meeting-last-update-container.warning {
    background-color: #964347;
    color: #fff;
    padding: 4px 8px;
}

.meeting-tile p.meeting-last-update-container span {
    width: 100%;
    text-align: center;
}

.meeting-tile p.meeting-last-update-container .meeting-update-warning-container {
    line-height: 1;
}

.meeting-tile p.meeting-last-update-container .meeting-update-warning-container svg {
    margin-bottom: -2px;
    fill: #fff;
    width: 16px;
    height: 16px;
}

.meeting-tile p.meeting-full-address,
.meeting-tile p.meeting-type {
    padding-bottom: 10px;
    display: flex;
    align-items: center;
}

.meeting-tile p.meeting-full-address::before {
    content: "";
    display: inline-block;
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    margin-right: 12px;
    background-image: url(/wp-content/uploads/2022/11/meetings-maps-icon.svg);
}

.meeting-tile p.meeting-type::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    margin-right: 10.25px;
    background-image: url(/wp-content/uploads/2022/11/meetings-type-icon.svg);
}

.meeting-tile .meeting-notes,
.meeting-tile .meeting-location {
    word-break: break-word;
}

.meeting-tile table.left-table th,
.meeting-tile table.right-table th,
.meeting-tile table.left-table td,
.meeting-tile table.right-table td {
    display: block;
    width: 100%;
}

.entry-content .meeting-tile table:not(.variations) {
    border: none;
}

.entry-content .meeting-tile table tr th,
.entry-content .meeting-tile table tr td {
    vertical-align: top;
    border: none;
}

.entry-content .meeting-tile table tr th {
    padding: 0px 24px 0px 0px;
}
.entry-content .meeting-tile table tr td {
    padding: 0px;
}

@media screen and (min-width: 768px) {
    .meeting-tile,
    .meeting-tile .row {
        display: flex;
        flex-wrap: nowrap;
        gap: 32px;
    }

    .meeting-tile {
        padding: 20px 96px 26px 20px;
    }

    .meeting-tile .row .column {
        margin-bottom: 0;
        width: auto;
    }

    .meeting-tile .row.top .column:first-child {
        width: 30%;

        h2.day-time-heading {
            padding-bottom: 4px !important;
        }

        h3.meeting-wsonumber-container {
            font-size: 24px;
        }
    }

    .meeting-tile .row.top .column:nth-child(2) {
        width: 50%;
    }

    .meeting-tile .row.top .column:last-child {
        width: 20%;
    }

    .meeting-tile .row.tables .column {
        width: 50%;
    }

    .meeting-tile table.left-table th,
    .meeting-tile table.right-table th,
    .meeting-tile table.left-table td,
    .meeting-tile table.right-table td {
        display: table-cell;
    }

    .meeting-tile table.left-table th {
        width: 40%;
    }

    .meeting-tile table.left-table td {
        width: 60%;
    }

    .meeting-tile table.right-table th {
        width: 30%;
    }

    .meeting-tile table.right-table td {
        width: 70%;
    }

    .meeting-tile .row.meeting-buttons {
        display: flex;
        justify-content: space-between;
    }

    .meeting-tile .location-links,
    .meeting-tile .tile-footer {
        display: flex;
    }

    .meeting-tile .location-links {
        gap: 24px;
    }

    .meeting-tile .tile-footer {
        gap: 16px;
    }

    .meeting-tile .location-links a.underline {
        margin: 0;
    }

    .meeting-tile .tile-footer {
        align-items: center;
    }

    .meeting-tile .tile-footer p:not(:last-child),
    .meeting-tile .tile-footer form:not(:last-child) {
        margin-bottom: 0;
    }

    .meeting-tile p.meeting-last-update-container span {
        width: auto;
        text-align: left;
    }

    .meeting-tile p.meeting-last-update-container .meeting-update-warning-container {
        margin-left: 16px;
    }
}

/*
 * Popup.
 */
.meeting-popup {
    display: none;
}

.meeting-popup.open {
    display: flex;
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 999999999;
    background-color: rgba(0, 0, 0, 0.3);
}

.meeting-popup-content {
    background-color: #fffefb;
    border-top: 6px solid #7e171b;
    border-radius: 4px;
    width: 90%;
    max-width: 1000px;
    height: 90%;
    max-height: 800px;
    overflow: auto;
    margin: auto;
    position: relative;
}

.meeting-popup-header {
    position: sticky;
    top: 0;
    padding: 20px;
    background-color: rgba(229, 222, 205, 0.9);
    display: flex;
    justify-content: space-between;
    padding-bottom: 20px;
    z-index: 1;
}

.meeting-popup-header h2:not(.accordion-heading) {
    font-size: 20px;
    padding: 0 !important;
}

.meeting-popup-header a.close-full-listing {
    text-decoration: none;
    display: inline-block;
    font-size: 42px;
    font-family: ETmodules !important;
    color: #7e171b;
    cursor: pointer;
}

.meeting-popup-columns {
    padding: 20px;
    width: 100%;
    overflow-y: scroll;
}

.meeting-popup-column {
    margin-bottom: 20px;
}

.meeting-popup-buttons form {
    margin-bottom: 20px;
}

.meeting-popup-column ul.meeting-popup-details {
    padding: 0;
}

.meeting-popup-column li {
    list-style: none;
    margin-bottom: 15px;
}

.meeting-popup-column li strong {
    font-weight: 500;
    font-size: 18px;
    color: #343434;
    letter-spacing: 0.01em;
}

.meeting-popup-column li span {
    font-weight: 400;
    font-size: 16px;
    color: #545456;
}

.meeting-popup-column li[class^="meeting-day"] {
    margin-bottom: 0;
}

.meeting-popup-column button.accordion-heading-button {
    width: 100%;
}

@media screen and (min-width: 768px) {
    .meeting-popup-header h2 {
        font-size: 26px;
    }

    .meeting-popup-columns {
        display: flex;
        gap: 32px;
    }

    .meeting-popup-column {
        width: calc(50% - 16px);
    }
}

/* This class is applied when the popup is open. */
body.fixed {
    overflow: hidden;
}

/* Accordions. */
.meeting-tile .accordion-panel.hidden {
    display: none;
}

button.accordion-heading-button {
    text-align: left;
    border: none;
    font-size: 18px;
    color: #343434;
    letter-spacing: 0.01em;
    cursor: pointer;
}

button.accordion-heading-button.link-style {
    background-color: transparent;
    text-decoration: underline;
    display: block;
    padding: 0;
    line-height: 1.2;
}

button.accordion-heading-button.link-style.highlight {
    color: #7e171b; /* $red */
    background-color: #e5decd; /* $beige-500 */
    border-radius: 5px;
}

button.accordion-heading-button.link-style svg {
    transition: all 0.3s ease;
}

button.accordion-heading-button.link-style[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

button.accordion-heading-button:not(.link-style) {
    border-bottom: 1px solid #e4e4e4;
    background-color: rgba(229, 222, 205, 0.9);
    position: relative;
    font-weight: 500;
    padding: 7px;
}

button.accordion-heading-button:not(.link-style)::before {
    content: "";
    width: 13.17px;
    height: 8.58px;
    position: absolute;
    top: 15px;
    right: 7px;
    background: url(/wp-content/uploads/2022/11/Spoiler-arrow.svg) 0 0 / cover no-repeat;
    transition: all 0.3s ease;
}

button.accordion-heading-button:not(.link-style)[aria-expanded="true"]::before {
    transform: rotate(180deg);
}

/*
Loading overlay - displays when a WSONumber to search for is provided as a URL parameter.
The overlay is removed with JS then the search results are loaded.
*/
#meeting-search-loading-container {
    z-index: 100;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(229, 222, 205, 0.9);
}
#meeting-search-loading {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-top: 350px;
    width: 50px;
    padding: 8px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: #7e171b;
    --_m: conic-gradient(#0000 10%, #000), linear-gradient(#000 0 0) content-box;
    -webkit-mask: var(--_m);
    mask: var(--_m);
    -webkit-mask-composite: source-out;
    mask-composite: subtract;
    animation: spin 1s infinite linear;
}
@keyframes spin {
    to {
        transform: rotate(1turn);
    }
}
