/**
 * Copyright since 2011 BEST FOR NET s.r.o.
 *
 * COPYRIGHT NOTICE / UPOZORNĚNÍ NA AUTORSKÁ PRÁVA
 *
 * This code is protected by copyright and may not be distributed without prior written consent of the author.
 * Under the license terms, you may use and modify this code only for your own needs.
 * For any questions or further information, please contact us.
 *
 * Tento software je chráněn autorským právem a jeho šíření bez předchozího písemného souhlasu autora není povoleno.
 * Tento kód smíte v souladu s licencí používat a upravovat jen pro své vlastní účely.
 * V případě dotazů nebo zájmu o další informace nás neváhejte kontaktovat.
 *
 * @author    BEST FOR NET s.r.o. <info@bestfornet.cz>
 * @copyright Since 2011 BEST FOR NET s.r.o.
 * @license   Komerční licence – použití, šíření a úpravy tohoto software jsou možné pouze na základě individuální smlouvy s autorem. Pro více informací kontaktujte info@bestfornet.cz
 */

/* Harmonised notice on the legal guarantee (Implementing Regulation (EU) 2025/1960).
   The notice image itself must not be recoloured, cropped or distorted: only its size is set here. */

.b4ngi {
    margin: 10px 0;
}

.b4ngi-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #039;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

.b4ngi-trigger:hover,
.b4ngi-trigger:focus {
    color: #002266;
}

.b4ngi-trigger__icon {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
}

.b4ngi-notice {
    width: 100%;
    margin: 0 auto;
}

.b4ngi-notice__image {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid #ddd;
}

.b4ngi-notice__info {
    margin-top: 8px;
    text-align: center;
}

.b4ngi-notice__info a {
    color: #039;
    text-decoration: underline;
    word-break: break-word;
}

/* Last checkout step: the look is chosen in the module configuration (Appearance tab).
   Text colour and font always come from the theme. */
.b4ngi--checkout {
    margin: 0 0 24px;
}

/* Style "box": information box with the EU blue stripe, a heading and the link below it. */
.b4ngi--style-box .b4ngi-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e5e5e5;
    border-left: 4px solid #039;
    background-color: #fff;
    color: inherit;
    font-weight: 400;
    line-height: 1.35;
    text-decoration: none;
}

.b4ngi--style-box .b4ngi-trigger:hover,
.b4ngi--style-box .b4ngi-trigger:focus {
    color: inherit;
    background-color: #f7f9fd;
}

.b4ngi--style-box .b4ngi-trigger__icon,
.b4ngi--style-attached .b4ngi-trigger__icon {
    width: 22px;
    height: 22px;
}

.b4ngi--style-box .b4ngi-trigger__body {
    display: flex;
    flex-direction: column;
}

.b4ngi--style-box .b4ngi-trigger__title {
    font-weight: 700;
}

.b4ngi--style-box .b4ngi-trigger__text {
    font-size: 0.87em;
    opacity: 0.8;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.b4ngi--style-box .b4ngi-trigger__text::after {
    content: " \203A";
    display: inline-block;
    margin-left: 4px;
    text-decoration: none;
}

.b4ngi--style-box .b4ngi-trigger:hover .b4ngi-trigger__text,
.b4ngi--style-box .b4ngi-trigger:focus .b4ngi-trigger__text {
    text-decoration: none;
}

/* Style "attached": a grey box like the terms and conditions box. Right below that box
   (b4nthreesteporder renders the hook straight after it) it joins it, separated by a thin line. */
.b4ngi--style-attached .b4ngi-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
    width: 100%;
    padding: 14px;
    background-color: var(--tso-color-gray-light, #f5f5f5);
    color: inherit;
    font-weight: 400;
    line-height: 1.35;
    text-decoration: none;
}

.b4ngi--style-attached .b4ngi-trigger:hover,
.b4ngi--style-attached .b4ngi-trigger:focus {
    color: inherit;
}

.b4ngi--style-attached .b4ngi-trigger__text {
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.b4ngi--style-attached .b4ngi-trigger:hover .b4ngi-trigger__text,
.b4ngi--style-attached .b4ngi-trigger:focus .b4ngi-trigger__text {
    text-decoration: none;
}

.conditions-form + .b4ngi--style-attached {
    margin-top: 0;
}

.conditions-form + .b4ngi--style-attached .b4ngi-trigger {
    padding-top: 0;
}

.conditions-form + .b4ngi--style-attached .b4ngi-trigger__icon,
.conditions-form + .b4ngi--style-attached .b4ngi-trigger__body {
    margin-top: 12px;
}

.conditions-form + .b4ngi--style-attached .b4ngi-trigger::before {
    content: "";
    position: absolute;
    top: 0;
    right: 14px;
    left: 14px;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.conditions-form + .b4ngi--style-attached .b4ngi-trigger {
    position: relative;
}

/* Style "pill": compact rounded label in the EU blue. */
.b4ngi--style-pill .b4ngi-trigger {
    gap: 8px;
    padding: 5px 14px 5px 8px;
    border: 1px solid #039;
    border-radius: 999px;
    color: #039;
    font-size: 0.87em;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
}

.b4ngi--style-pill .b4ngi-trigger:hover,
.b4ngi--style-pill .b4ngi-trigger:focus {
    color: #fff;
    background-color: #039;
}

.b4ngi--style-pill .b4ngi-trigger:hover .b4ngi-trigger__icon path:first-child,
.b4ngi--style-pill .b4ngi-trigger:focus .b4ngi-trigger__icon path:first-child {
    fill: #fff;
}

.b4ngi--style-pill .b4ngi-trigger:hover .b4ngi-trigger__icon path:last-child,
.b4ngi--style-pill .b4ngi-trigger:focus .b4ngi-trigger__icon path:last-child {
    fill: #039;
}

.b4ngi--header {
    display: inline-block;
    margin: 0 10px;
}

.b4ngi--footer {
    clear: both;
}

/* Standalone page: the texts above and below the notice. */
.b4ngi-page__text {
    max-width: 760px;
    line-height: 1.55;
}

.b4ngi-page__text--top {
    margin-bottom: 20px;
}

.b4ngi-page__text--bottom {
    margin-top: 28px;
}

.b4ngi-page__text h2 {
    margin: 24px 0 8px;
    font-size: 1.25em;
    line-height: 1.3;
}

.b4ngi-page__text ul,
.b4ngi-page__text ol {
    margin: 0 0 12px;
    padding-left: 1.4em;
}

.b4ngi-page__text ul {
    list-style: disc;
}

.b4ngi-page__text ol {
    list-style: decimal;
}

.b4ngi-page__text li {
    margin-bottom: 4px;
}

/* With texts around it the notice lines up with them; alone it stays centred as before 3.3.0. */
.b4ngi-page--text .b4ngi--page {
    margin: 0;
}

.b4ngi-page--text .b4ngi-notice {
    margin-left: 0;
}

/* GARAN label (Implementing Regulation (EU) 2025/1960, Annex II). The editable fields of the
   official file use Inter (note 6): the file asks for "Inter-Regular" and "Inter-ExtraBold" first,
   so the font is registered under exactly those names and nothing else on the page picks it up. */
@font-face {
    font-family: "Inter-Regular";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../../fonts/inter/inter-regular-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Inter-Regular";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../../fonts/inter/inter-regular-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Inter-ExtraBold";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../../fonts/inter/inter-extrabold-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Inter-ExtraBold";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../../fonts/inter/inter-extrabold-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

.b4ngi-garan {
    margin: 10px 0;
}

.b4ngi-garan__summary {
    display: flex;
    flex-wrap: wrap;
    max-width: 100%;
    align-items: center;
    gap: 6px 12px;
    cursor: pointer;
    list-style: none;
}

.b4ngi-garan__summary::-webkit-details-marker {
    display: none;
}

.b4ngi-garan__summary::marker {
    content: "";
}

/* The nested strip keeps its proportions (368.5 × 56.69). */
.b4ngi-garan__svg {
    display: block;
    height: auto;
}

.b4ngi-garan__svg--nested {
    width: 200px;
    max-width: 100%;
    border: 1px solid #ddd;
}

.b4ngi-garan__more {
    flex: 1 1 140px;
    min-width: 0;
    color: #039;
    font-size: 0.9em;
    text-decoration: underline;
}

.b4ngi-garan__summary:hover .b4ngi-garan__more,
.b4ngi-garan__summary:focus .b4ngi-garan__more {
    text-decoration: none;
}

.b4ngi-garan__content {
    max-width: 380px;
    padding-top: 12px;
}

/* The full label: 360 CSS px are about 95 mm, the minimum width of the label (Annex II, note 3). */
.b4ngi-garan__svg--full {
    width: 360px;
    max-width: 100%;
    border: 1px solid #ddd;
}

.b4ngi-garan__text {
    margin-top: 12px;
    line-height: 1.5;
}

.b4ngi-garan__links {
    margin: 8px 0 0;
    font-size: 0.9em;
}

.b4ngi-garan__links a {
    color: #039;
    text-decoration: underline;
    word-break: break-word;
}

.b4ngi-modal .b4ngi-garan__content {
    max-width: none;
    padding-top: 0;
}

/* In the modal the dialog is as wide as the label, and the label fills it: label, explanation and
   links share one width. 480 px keep the whole label on a laptop screen without scrolling. */
.b4ngi-modal .b4ngi-modal__dialog--garan {
    max-width: 480px;
}

.b4ngi-modal .b4ngi-garan__svg--full {
    width: 100%;
}

/* Product page, block of its own below the box with the price and the cart button. */
.b4ngi-garan--product-block {
    margin: 16px 0;
    padding: 12px 14px;
    border: 1px solid #e5e5e5;
    background-color: #fff;
}

/* Last checkout step: the labels of the products in the cart. */
.b4ngi-garan-list {
    margin: 0 0 24px;
    padding: 12px 14px;
    border: 1px solid #e5e5e5;
    border-left: 4px solid #039;
}

.b4ngi-garan-list__title {
    margin: 0 0 4px;
    font-weight: 700;
}

.b4ngi-garan-list__intro {
    margin: 0 0 8px;
}

.b4ngi-garan-list__items {
    margin: 0;
    padding: 0;
    list-style: none;
}

.b4ngi-garan-list__item {
    padding: 8px 0;
    border-top: 1px solid #eee;
}

.b4ngi-garan-list__item .b4ngi-garan {
    margin: 4px 0 0;
}

/* Modal */

html.b4ngi-modal-open,
html.b4ngi-modal-open body {
    overflow: hidden;
}

.b4ngi-modal {
    position: fixed;
    z-index: 100000;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    overflow-y: auto;
    padding: 20px 10px;
    background: rgba(0, 0, 0, 0.6);
    -webkit-overflow-scrolling: touch;
}

/* margin: auto centres the dialog both ways while it fits; a taller one starts at the top and the
   overlay scrolls, nothing is cut off (align-items: center would cut the top). */
.b4ngi-modal__dialog {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    max-width: 672px;
    margin: auto;
    padding: 44px 16px 16px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.b4ngi-modal__title {
    margin: 0 0 12px;
    font-size: 18px;
    line-height: 1.3;
}

.b4ngi-modal__close {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #333;
    font-size: 30px;
    line-height: 36px;
    cursor: pointer;
}

.b4ngi-modal__close:hover,
.b4ngi-modal__close:focus {
    color: #000;
}
