/**
 * Single hotel — layout switcher.
 *
 * A tab pinned to the right edge of the screen; the panel opens to its left.
 * Built on <details>, so the open state is the element's own [open].
 * Colours come from the theme variables only.
 */

.jws-layout-switch {
    position: fixed;
    top: 50%;
    right: 0;
    z-index: 9990;
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-start;
    transform: translateY(-50%);
}

.jws-layout-switch__tab {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    list-style: none;
    border-radius: 8px 0 0 8px;
    background: var(--main);
    color: var(--light);
    box-shadow: 0 6px 24px rgba(0, 0, 0, .12);
    cursor: pointer;
}

.jws-layout-switch__tab::-webkit-details-marker {
    display: none;
}

.jws-layout-switch__tab::marker {
    content: '';
}

.jws-layout-switch__tab i {
    font-size: 20px;
    line-height: 1;
    transition: transform .4s ease;
}

.jws-layout-switch[open] .jws-layout-switch__tab {
    border-radius: 0;
}

.jws-layout-switch[open] .jws-layout-switch__tab i {
    transform: rotate(90deg);
}

.jws-layout-switch__tab:focus-visible {
    outline: 2px solid var(--heading);
    outline-offset: 2px;
}

.jws-layout-switch__panel {
    display: flex;
    flex-direction: column;
    width: 260px;
    padding: 16px 0 10px;
    border-radius: 8px 0 0 8px;
    background: var(--background-body);
    box-shadow: 0 6px 24px rgba(0, 0, 0, .12);
}

.jws-layout-switch__title {
    padding: 0 18px 8px;
    font-weight: 600;
    color: var(--heading);
}

.jws-layout-switch__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 18px;
    color: var(--heading);
}

.jws-layout-switch__item:hover {
    background: var(--background-item);
    color: var(--heading);
}

.jws-layout-switch__item.is-current {
    color: var(--main);
}

.jws-layout-switch__item i {
    flex: none;
    font-size: 16px;
    color: var(--main);
}

.jws-layout-switch__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.jws-layout-switch__note {
    font-size: var(--fs-small2);
    color: var(--body);
}

.jws-layout-switch__reset {
    margin: 4px 18px 0;
    font-size: var(--fs-small2);
    color: var(--main);
    text-decoration: underline;
}

.jws-layout-switch__reset:hover {
    color: var(--heading);
}

.jws-layout-switch__hint {
    margin: 6px 18px 0;
    padding-top: 10px;
    border-top: 1px solid var(--border-cl);
    font-size: var(--fs-small2);
    color: var(--body);
}

/* phones: clear of the theme's bottom toolbar, and never wider than the screen */
@media (max-width: 767px) {
    .jws-layout-switch {
        top: auto;
        bottom: 115px;
        transform: none;
    }

    .jws-layout-switch__tab {
        width: 42px;
        height: 42px;
    }

    .jws-layout-switch__panel {
        width: min(260px, calc(100vw - 58px));
    }
}