.zw-hours-field,
.zw-hours-field * {
    box-sizing: border-box;
}

.zw-hours-other-toggle {
    margin: 0 0 12px;
    padding: 10px 12px;
    border: 1px solid #dfe3e7;
    border-radius: 6px;
    background: #f8f9fa;
}

.zw-hours-other-toggle label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    text-align: center;
}

.zw-hours-header,
.zw-hours-row {
    display: grid;
    grid-template-columns: 90px minmax(112px, 140px) minmax(112px, 140px) 72px;
    gap: 9px;
    align-items: center;
}

.zw-hours-field.is-location-enabled .zw-hours-header,
.zw-hours-field.is-location-enabled .zw-hours-row {
    grid-template-columns: 90px minmax(112px, 140px) minmax(112px, 140px) 72px minmax(260px, 1fr) 34px;
}

.zw-hours-header {
    margin-bottom: 6px;
    padding: 0 0 5px;
    border-bottom: 1px solid #e3e6e8;
    color: #525960;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.zw-hours-days {
    display: grid;
    gap: 11px;
}

.zw-hours-day-group {
    display: grid;
    gap: 7px;
}

.zw-hours-session-rows {
    display: grid;
    gap: 7px;
}

.zw-hours-row {
    min-width: 0;
}

.zw-hours-day {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    font-weight: 700;
    text-align: center;
}

.zw-hours-row--extra .zw-hours-day {
    color: #7a8086;
    font-size: 17px;
}

.zw-hours-cell,
.zw-hours-location label {
    margin: 0;
}

.zw-time-control {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
}

.zw-hours-time,
.zw-hours-location-input,
.zw-hours-w3w,
.zw-hours-field button {
    text-align: center !important;
}

.zw-hours-time,
.zw-hours-location-input,
.zw-hours-w3w {
    height: 40px !important;
    min-height: 40px !important;
    margin: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 38px !important;
}

.zw-hours-time {
    width: 100% !important;
    padding: 0 30px 0 8px !important;
}

.zw-hours-time:disabled {
    color: #777 !important;
    background: #f1f2f3 !important;
}

.zw-time-steppers {
    position: absolute;
    top: 1px;
    right: 1px;
    bottom: 1px;
    display: grid;
    grid-template-rows: 1fr 1fr;
    width: 25px;
    overflow: hidden;
    border-left: 1px solid #d7dbe0;
    border-radius: 0 3px 3px 0;
}

.zw-time-step {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #f4f5f6 !important;
    color: #4d5156 !important;
    font: inherit !important;
    font-size: 8px !important;
    line-height: 1 !important;
    cursor: pointer;
}

.zw-time-step + .zw-time-step {
    border-top: 1px solid #d7dbe0 !important;
}

.zw-time-step:hover,
.zw-time-step:focus-visible {
    background: #e7e9eb !important;
    color: #1d2327 !important;
    outline: 1px solid #6c7781;
    outline-offset: -1px;
}

.zw-hours-row-tools {
    display: grid;
    justify-items: center;
    gap: 2px;
    min-width: 0;
}

.zw-hours-all-day,
.zw-hours-find-pin,
.zw-hours-add-stop,
.zw-hours-remove-stop {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 34px;
    margin: 0 !important;
    border: 1px solid #cfd4d8 !important;
    border-radius: 5px !important;
    background: #fff !important;
    color: #343a40 !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    cursor: pointer;
}

.zw-hours-all-day {
    width: 52px;
    padding: 0 7px !important;
}

.zw-hours-all-day.is-active {
    border-color: #5d6b76 !important;
    background: #e9eef2 !important;
}

.zw-hours-state {
    min-height: 14px;
    color: #626a71;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.1;
    text-align: center;
}

.zw-hours-location {
    min-width: 0;
    padding: 6px;
    border: 1px solid #e0e3e6;
    border-radius: 6px;
    background: #fbfcfc;
}

.zw-hours-location-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 78px;
    gap: 6px;
    align-items: center;
}

.zw-hours-find-pin {
    height: 40px;
    padding: 0 7px !important;
    font-size: 12px !important;
}

.zw-hours-location-extra {
    margin-top: 5px;
    text-align: center;
}

.zw-hours-location-extra summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    color: #59636b;
    font-size: 11px;
    cursor: pointer;
}

.zw-hours-w3w-control {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    max-width: 250px;
    margin: 4px auto 0;
}

.zw-hours-w3w-control > span {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    border: 1px solid #d7dbe0;
    border-right: 0;
    border-radius: 4px 0 0 4px;
    background: #f0f2f3;
    font-weight: 700;
}

.zw-hours-w3w {
    border-radius: 0 4px 4px 0 !important;
}

.zw-hours-map-preview {
    width: 100%;
    height: 125px;
    margin-top: 7px;
    overflow: hidden;
    border-radius: 5px;
    background: #edf0f2;
}

.zw-hours-location-message {
    min-height: 14px;
    margin: 5px 0 0;
    color: #56616a;
    font-size: 11px;
    line-height: 1.25;
    text-align: center;
}

.zw-hours-location-message.is-error {
    color: #b32d2e;
}

.zw-hours-remove-stop {
    width: 32px;
    height: 32px;
    padding: 0 !important;
    color: #8b1a1a !important;
    font-size: 20px !important;
}

.zw-hours-add-stop {
    justify-self: end;
    min-width: 150px;
    padding: 0 12px !important;
    font-size: 12px !important;
}

.zw-hours-help {
    margin: 12px 0 0;
    color: #626a71;
    font-size: 12px;
    text-align: center;
}

.zw-hours-time:invalid,
.zw-hours-location-input:invalid {
    border-color: #b32d2e !important;
}

.zw-hours-field [hidden],
.zw-opening-hours-inline [hidden] {
    display: none !important;
}

/* Public paired time/location output. */
.zw-opening-hours-inline {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 10px;
    width: 100%;
}

.zw-opening-hours-inline__icon {
    display: flex;
    justify-content: center;
    padding-top: 2px;
}

.zw-opening-hours-inline__list {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.zw-opening-hours-inline__day-group {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.zw-opening-hours-inline__day {
    font-weight: 700;
}

.zw-opening-hours-inline__sessions {
    display: grid;
    gap: 5px;
}

.zw-opening-hours-inline__session {
    display: grid;
    gap: 2px;
}

.zw-opening-hours-inline__time,
.zw-opening-hours-inline__closed {
    font-weight: 600;
}

.zw-opening-hours-inline__location {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 9px;
    align-items: center;
    color: #555e65;
}

.zw-opening-hours-inline__directions {
    font-weight: 600;
}

@media (max-width: 920px) {
    .zw-hours-field.is-location-enabled .zw-hours-header {
        display: none;
    }

    .zw-hours-field.is-location-enabled .zw-hours-row {
        grid-template-columns: 82px minmax(104px, 1fr) minmax(104px, 1fr) 64px 32px;
    }

    .zw-hours-field.is-location-enabled .zw-hours-location {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .zw-hours-field.is-location-enabled .zw-hours-remove-stop {
        grid-column: 5;
        grid-row: 1;
    }
}

@media (max-width: 600px) {
    .zw-hours-header {
        display: none;
    }

    .zw-hours-row,
    .zw-hours-field.is-location-enabled .zw-hours-row {
        grid-template-columns: 74px minmax(0, 1fr) minmax(0, 1fr) 54px;
        gap: 7px;
    }

    .zw-hours-field.is-location-enabled .zw-hours-location {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .zw-hours-field.is-location-enabled .zw-hours-remove-stop {
        grid-column: 4;
        grid-row: 1;
    }

    .zw-hours-location-main {
        grid-template-columns: minmax(0, 1fr) 72px;
    }

    .zw-hours-day {
        font-size: 12px;
    }

    .zw-hours-all-day {
        width: 48px;
        font-size: 11px !important;
    }

    .zw-opening-hours-inline__day-group {
        grid-template-columns: 72px minmax(0, 1fr);
    }
}
