/* =========================================================
   HELLOCOMP 3.0 – KOUPIT S KÓDEM
   ========================================================= */

.hc-code-buy,
.hc-code-buy *,
.hc-code-buy-modal,
.hc-code-buy-modal * {
    box-sizing: border-box;
}

.hc-code-buy {
    position: relative;
    z-index: 2;
    width: 100%;
    margin: 14px 0 16px;
    padding: 0;
    font-family: "new_font", "Nunito Sans", sans-serif;
}

.hc-code-buy__content {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    min-height: 62px;
    overflow: hidden;
    border: 1px solid rgba(36, 79, 136, 0.18);
    border-radius: 9px;
    background:
        radial-gradient(circle at 100% 50%, rgba(47, 111, 184, 0.15), transparent 32%),
        linear-gradient(135deg, #ffffff 0%, #f5f8fd 52%, #edf3fa 100%);
    box-shadow: 0 8px 18px rgba(20, 43, 73, 0.08);
}

.hc-code-buy__content::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, #0f1118, #244f88 55%, #2f6fb8);
    pointer-events: none;
}

.hc-code-buy__left,
.hc-code-buy__right {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    min-width: 0;
}

.hc-code-buy__left {
    gap: 10px;
    padding: 12px 16px 12px 18px;
}

.hc-code-buy__right {
    gap: 10px;
    justify-content: flex-end;
    padding: 10px 10px 10px 13px;
    border-left: 1px dashed rgba(36, 79, 136, 0.22);
    background: rgba(255, 255, 255, 0.50);
}

.hc-code-buy__icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: linear-gradient(135deg, #0f1118 0%, #18243c 52%, #244f88 100%);
    color: #ffffff;
    font-family: "Font Awesome 6 Pro", "Font Awesome 5 Pro", "FontAwesome", sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    box-shadow: 0 6px 13px rgba(20, 43, 73, 0.20);
}

.hc-code-buy__label {
    display: inline-block;
    color: #20242d;
    font-size: 14px;
    line-height: 1.25;
    font-weight: 400;
    white-space: nowrap;
}

.hc-code-buy__code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 31px;
    margin: 0;
    padding: 0 11px;
    border: 1px solid rgba(36, 79, 136, 0.22);
    border-radius: 7px;
    background: #ffffff;
    color: #244f88;
    font-family: "new_font", "Nunito Sans", sans-serif;
    font-size: 13px;
    line-height: 29px;
    font-weight: 400;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.hc-code-buy__code:hover,
.hc-code-buy__code:focus {
    border-color: rgba(36, 79, 136, 0.45);
    background: #f8fbff;
    color: #1f4f8f;
    outline: none;
}

.hc-code-buy__discount {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 10px;
    border-radius: 7px;
    background: rgba(36, 79, 136, 0.08);
    color: #244f88;
    font-size: 13px;
    line-height: 32px;
    font-weight: 400;
    white-space: nowrap;
}

.hc-code-buy__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 132px;
    height: 36px;
    margin: 0;
    padding: 0 15px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background: linear-gradient(90deg, #0f1118 0%, #18243c 52%, #244f88 100%);
    color: #ffffff;
    font-family: "new_font", "Nunito Sans", sans-serif;
    font-size: 12px;
    line-height: 36px;
    font-weight: 400;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 7px 15px rgba(12, 25, 43, 0.18);
    transition: background 0.18s ease, box-shadow 0.18s ease;
}

.hc-code-buy__button:hover,
.hc-code-buy__button:focus {
    background: linear-gradient(90deg, #18243c 0%, #244f88 54%, #2f6fb8 100%);
    box-shadow: 0 9px 18px rgba(12, 25, 43, 0.23);
    outline: none;
}

.hc-code-buy__note {
    margin: 7px 0 0;
    color: #697382;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 400;
}

/* =========================================================
   HELLOCOMP 3.0 – KOUPIT S KÓDEM MODAL
   ========================================================= */

.hc-code-buy-modal-open {
    overflow: hidden;
}

.hc-code-buy-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    font-family: "new_font", "Nunito Sans", sans-serif;
    transition: opacity 0.18s ease;
}

.hc-code-buy-modal.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.hc-code-buy-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 16, 24, 0.58);
}

.hc-code-buy-modal__dialog {
    position: relative;
    z-index: 1;
    display: block;
    width: min(500px, 100%);
    min-height: 144px;
    padding: 26px 34px 26px;
    overflow: visible;
    border: 1px solid rgba(36, 79, 136, 0.15);
    border-radius: 14px;
    background:
        radial-gradient(circle at 100% 0%, rgba(47, 111, 184, 0.09), transparent 34%),
        linear-gradient(135deg, #ffffff 0%, #f8fbff 54%, #eef4fb 100%);
    box-shadow: 0 20px 58px rgba(7, 17, 33, 0.30);
    transform: translateY(8px) scale(0.985);
    transition: transform 0.18s ease;
}

.hc-code-buy-modal.is-visible .hc-code-buy-modal__dialog {
    transform: translateY(0) scale(1);
}

.hc-code-buy-modal__dialog::after {
    content: "";
    position: absolute;
    right: -42px;
    top: 50%;
    width: 255px;
    height: 118px;
    background: #244f88;
    opacity: 0.075;
    transform: translateY(-50%) rotate(-7deg);
    pointer-events: none;
    -webkit-mask: url("/user/documents/upload/HELLO_COMP_Kreslicí_platno_BIG_white.png") center / contain no-repeat;
    mask: url("/user/documents/upload/HELLO_COMP_Kreslicí_platno_BIG_white.png") center / contain no-repeat;
}

.hc-code-buy-modal__close {
    position: absolute;
    top: -14px;
    right: -14px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(210, 38, 38, 0.18);
    border-radius: 50%;
    background: linear-gradient(135deg, #ffffff 0%, #fff1f1 100%);
    color: #d22626;
    font-size: 0;
    line-height: 1;
    font-weight: 400;
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(7, 17, 33, 0.22);
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.hc-code-buy-modal__close::before {
    content: "×";
    display: block;
    color: inherit;
    font-family: Arial, sans-serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    transform: translateY(-1px);
}

.hc-code-buy-modal__close:hover,
.hc-code-buy-modal__close:focus {
    background: linear-gradient(135deg, #fff7f7 0%, #ffe4e4 100%);
    color: #b81d1d;
    transform: rotate(90deg);
    outline: none;
}

.hc-code-buy-modal__icon {
    display: none !important;
}

.hc-code-buy-modal__content {
    position: relative;
    z-index: 1;
    min-width: 0;
    padding: 0;
    text-align: center;
}

.hc-code-buy-modal__text {
    max-width: 395px;
    margin: 0 auto 16px;
    color: #20242d;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 400;
    letter-spacing: 0.005em;
    text-align: center;
}

.hc-code-buy-modal__button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: max-content;
    min-width: 168px;
    height: 42px;
    margin: 0 auto;
    padding: 0 20px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    background: linear-gradient(90deg, #0f1118 0%, #18243c 52%, #244f88 100%);
    color: #ffffff;
    font-family: "new_font", "Nunito Sans", sans-serif;
    font-size: 13px;
    line-height: 42px;
    font-weight: 400;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(12, 25, 43, 0.20);
    transition: background 0.18s ease, box-shadow 0.18s ease;
}

.hc-code-buy-modal__button:hover,
.hc-code-buy-modal__button:focus {
    background: linear-gradient(90deg, #18243c 0%, #244f88 54%, #2f6fb8 100%);
    box-shadow: 0 14px 28px rgba(12, 25, 43, 0.25);
    outline: none;
}

@media (max-width: 767px) {
    .hc-code-buy {
        margin: 12px 0 15px;
    }

    .hc-code-buy__content {
        display: block;
        min-height: 0;
        border-radius: 8px;
    }

    .hc-code-buy__left {
        display: grid;
        grid-template-columns: 30px minmax(0, 1fr) auto;
        gap: 8px;
        padding: 12px 12px 10px 16px;
    }

    .hc-code-buy__right {
        justify-content: space-between;
        width: 100%;
        padding: 10px 12px 12px 16px;
        border-top: 1px dashed rgba(36, 79, 136, 0.18);
        border-left: 0;
        background: rgba(255, 255, 255, 0.54);
    }

    .hc-code-buy__label {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .hc-code-buy__code {
        max-width: 132px;
        padding: 0 9px;
        font-size: 12px;
    }

    .hc-code-buy__discount {
        min-height: 32px;
        line-height: 32px;
        font-size: 12px;
    }

    .hc-code-buy__button {
        min-width: 132px;
        height: 36px;
        line-height: 36px;
        font-size: 12px;
    }

    .hc-code-buy__note {
        font-size: 11px;
    }

    .hc-code-buy-modal {
        align-items: flex-end;
        padding: 12px;
    }

    .hc-code-buy-modal__dialog {
        display: block;
        width: 100%;
        min-height: 0;
        padding: 24px 18px 20px;
        border-radius: 14px;
    }

    .hc-code-buy-modal__close {
        top: -14px;
        right: -8px;
        width: 40px;
        height: 40px;
    }

    .hc-code-buy-modal__dialog::after {
        right: -54px;
        top: 42%;
        width: 230px;
        height: 104px;
        opacity: 0.06;
    }

    .hc-code-buy-modal__content {
        padding: 0;
        text-align: center;
    }

    .hc-code-buy-modal__text {
        margin-bottom: 16px;
        font-size: 14px;
        line-height: 1.5;
        text-align: center;
    }

    .hc-code-buy-modal__button {
        width: 100%;
        min-width: 0;
        height: 46px;
        line-height: 46px;
    }
}

@media (max-width: 374px) {
    .hc-code-buy__left {
        grid-template-columns: 30px minmax(0, 1fr);
    }

    .hc-code-buy__code {
        grid-column: 2 / 3;
        justify-self: start;
        max-width: 100%;
        margin-top: 2px;
    }

    .hc-code-buy__right {
        display: block;
    }

    .hc-code-buy__discount,
    .hc-code-buy__button {
        width: 100%;
    }

    .hc-code-buy__button {
        margin-top: 8px;
    }
}