/* Self-contained disclosure, below the site's menus, dialogs and consent layer. */
/* The legacy grid floats every body descendant and gives it width: 100%. */
.catalogue-widget,
.catalogue-widget * {
    box-sizing: border-box;
    float: none;
    width: auto;
}

.catalogue-widget {
    display: block;
    position: fixed;
    z-index: 900;
    top: 50%;
    left: 0;
    width: 48px;
    transform: translateY(-50%);
    color: #282828;
    font-family: 'montserratregular', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    text-align: left;
}

.catalogue-widget svg {
    display: block;
    flex: none;
    width: 20px;
    height: 20px;
}

.catalogue-widget__trigger {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-width: 48px;
    min-height: 44px;
    padding: 16px 12px;
    border: 1px solid #641f2d;
    border-radius: 0 8px 8px 0;
    background: #641f2d;
    color: #fff;
    box-shadow: 0 3px 12px rgb(0 0 0 / 15%);
    cursor: pointer;
    list-style: none;
}

.catalogue-widget__trigger::-webkit-details-marker {
    display: none;
}

.catalogue-widget__label {
    writing-mode: vertical-rl;
}

.catalogue-widget__indicator {
    font-size: 22px;
    line-height: 1;
}

.catalogue-widget[open] .catalogue-widget__indicator {
    transform: rotate(45deg);
}

.catalogue-widget__panel {
    position: absolute;
    top: 50%;
    left: calc(100% + 12px);
    width: 300px;
    max-width: calc(100vw - 76px);
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    padding: 16px;
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateY(-50%);
    border: 1px solid #ded7d9;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 32px rgb(0 0 0 / 16%);
}

/* Keep collapsed content out of view and the keyboard order on all browsers. */
.catalogue-widget:not([open]) .catalogue-widget__panel,
.catalogue-widget [hidden] {
    display: none !important;
}

.catalogue-widget__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.catalogue-widget__header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    line-height: 1.4;
}

.catalogue-widget__close {
    display: inline-flex;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #ded7d9;
    border-radius: 6px;
    background: #fff;
    color: #641f2d;
    font-size: 27px;
    cursor: pointer;
}

.catalogue-widget__link {
    display: block;
    border-radius: 8px;
    background: #641f2d;
    color: #fff;
    text-decoration: none;
}

.catalogue-widget__link:hover,
.catalogue-widget__link:focus,
.catalogue-widget__trigger:hover {
    background: #4b1722;
    color: #fff;
    text-decoration: none;
}

.catalogue-widget__image {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    border-radius: 8px 8px 0 0;
    object-fit: contain;
}

.catalogue-widget__action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 12px;
    font-weight: bold;
}

.catalogue-widget__note {
    margin: 12px 0 0;
    color: #595959;
    font-size: 13px;
    line-height: 1.5;
}

.catalogue-widget summary:focus-visible,
.catalogue-widget button:focus-visible,
.catalogue-widget a:focus-visible {
    outline: 3px solid #171717;
    outline-offset: 3px;
    box-shadow: 0 0 0 3px #fff;
}

@media (max-width: 767px), (max-height: 540px) {
    .catalogue-widget {
        top: auto;
        left: 16px;
        width: auto;
        bottom: 88px;
        bottom: calc(88px + env(safe-area-inset-bottom, 0px));
        transform: none;
    }

    .catalogue-widget__trigger {
        flex-direction: row;
        gap: 4px;
        padding: 6px 10px;
        font-size: 13px;
        border-radius: 24px;
        box-shadow: 0 0 16px 4px rgba(255, 255, 255, 0.65), 0 4px 16px rgba(0, 0, 0, 0.2);
    }

    .catalogue-widget__label {
        writing-mode: horizontal-tb;
    }

    .catalogue-widget__panel {
        top: auto;
        left: 0;
        bottom: calc(100% + 8px);
        width: 180px;
        padding: 8px;
        max-width: calc(100vw - 32px);
        max-height: calc(100vh - 180px);
        max-height: calc(100dvh - 180px - env(safe-area-inset-bottom, 0px));
        transform: none;
        box-shadow: 0 8px 28px rgba(0, 0, 0, 0.24), 0 2px 8px rgba(0, 0, 0, 0.12);
    }

    .catalogue-widget__header {
        gap: 4px;
        margin-bottom: 4px;
    }

    .catalogue-widget__header h2 {
        font-size: 14px;
    }

    .catalogue-widget__action {
        min-height: 44px;
        gap: 6px;
        padding: 8px;
        font-size: 13px;
    }

    .catalogue-widget__note {
        margin-top: 6px;
        font-size: 12px;
    }
}

@media print {
    .catalogue-widget {
        display: none !important;
    }
}
