/* =============================================
   BANER / POPUP — Newsletter launch CTA
   ============================================= */

.tk-banner {
    --tk-blue: #123c7c;
    --tk-yellow: #f3c24a;
    --tk-yellow-hover: #e8b537;
    --tk-banner-radius: 20px;
    background: var(--tk-blue);
    border-radius: var(--tk-banner-radius);
    overflow: hidden;
    box-sizing: border-box;
    text-align: center;
    color: #fff;
    position: relative;
}

.tk-banner *,
.tk-banner *::before,
.tk-banner *::after { box-sizing: border-box; }

/* Product photo on top — separate block, stays untouched */
.tk-banner-media {
    width: 100%;
    line-height: 0;
    background: #fdf6ef;
}
.tk-banner-media img {
    width: 100%;
    height: 290px;
    display: block;
    object-fit: cover;
    object-position: center;
}

/* Text section — sits over the uploaded background image */
.tk-banner-body {
    position: relative;
    padding: 20px 22px 20px;
    background-color: var(--tk-blue);
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    color: #fff;
    text-align: center;
}

/* Wave blending the photo into the blue section */
.tk-banner-wave {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    margin-bottom: -19px;
    height: 54px;
    line-height: 0;
    pointer-events: none;
    z-index: 1;
}
.tk-banner-wave svg {
    display: block;
    width: 100%;
    height: 100%;
}
.tk-banner-wave .tk-wave-base {
    fill: var(--tk-blue);
}

.tk-banner-heading {
    font-size: clamp(22px, 3.2vw, 30px);
    line-height: 1.12;
    font-weight: 800;
    margin: 0 0 12px;
    color: #fff;
}

/* Discount line: [gift] 10% POPUSTA / na prvu kupovinu */
.tk-banner-discount {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 0 12px;
    flex-wrap: wrap;
}
.tk-banner-gift svg {
    width: 32px;
    height: 32px;
    color: var(--tk-yellow);
    display: block;
}
.tk-banner-amount {
    font-size: clamp(34px, 6vw, 70px);
    font-weight: 800;
    color: var(--tk-yellow);
    line-height: 1;
    text-shadow: 0 0 18px rgba(243, 194, 74, 0.55);
    letter-spacing: -3px;
}
.tk-banner-discount-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1;
    text-align: left;
}
.tk-banner-discount-label {
    font-size: clamp(25px, 2.8vw, 30px);
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.tk-banner-discount-sub {
    font-size: clamp(20px, 1.5vw, 22px);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92);
}

.tk-banner-sub {
    font-size: clamp(13px, 1.5vw, 14px);
    line-height: 1.45;
    margin: 0 auto;
    /* max-width: 420px; */
    color: rgba(255, 255, 255, 0.92);
    text-align: left;
}

/* Form — name + email stacked, full-width yellow button */
.tk-banner-form {
    display: flex;
    flex-direction: column;
    gap: 0;
    /* max-width: 420px; */
    margin: 10px auto 0;
}

.tk-banner-name,
.tk-banner-email {
    width: 100%;
    height: 46px;
    padding: 0 20px;
    border: none;
    border-radius: 999px;
    background: #fff;
    color: #333;
    font-size: 14px;
    outline: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}
.tk-banner-name::placeholder,
.tk-banner-email::placeholder { color: #9aa1ab; }

.tk-banner-btn {
    width: 100%;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
    border-radius: 999px;
    background: var(--tk-yellow);
    color: var(--tk-blue);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease, transform .05s ease;
}
.tk-banner-btn:hover { background: var(--tk-yellow-hover); }
.tk-banner-btn:active { transform: translateY(1px); }
.tk-banner-btn-text { line-height: 1; }
.tk-banner-btn-gift svg {
    width: 22px;
    height: 22px;
    color: var(--tk-blue);
    display: block;
}
.tk-banner-loading .tk-banner-btn {
    opacity: .7;
    pointer-events: none;
}

.tk-banner-msg {
    margin: 12px auto 0;
    font-size: 14px;
    font-weight: 500;
    max-width: 420px;
    color: #fff;
}
/* No reserved space until there is actually a message */
.tk-banner-msg:empty {
    display: none;
}
.tk-banner-msg.success { color: #d7f5df; }
.tk-banner-msg.error { color: #ffd7d7; }

.tk-banner-smallprint {
    font-size: 12.5px;
    line-height: 1.5;
    margin: 0 auto;
    max-width: 420px;
    color: rgba(255, 255, 255, 0.85);
}

/* =============================================
   CONFIRMATION STATE — after a successful signup
   ============================================= */
/* The card collapses to just a checkmark and the success message. In the popup
   it lives for ~3s before the overlay closes itself (see banner-popup.php). */
.tk-banner-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    max-width: 420px;
    margin: 0 auto;
}
.tk-banner-success[hidden] { display: none; }

.tk-banner-success-check svg {
    width: 46px;
    height: 46px;
    color: var(--tk-yellow);
    display: block;
}
.tk-banner-success-text {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
    color: #fff;
    text-align: center;
}

/* Everything that made up the signup pitch drops out, leaving the small card. */
/* No close button in the confirmation state — it closes itself after 3s. */
.tk-banner-done .tk-banner-close { display: none; }

.tk-banner-done .tk-banner-media,
.tk-banner-done .tk-banner-wave,
.tk-banner-done .tk-banner-heading,
.tk-banner-done .tk-banner-discount,
.tk-banner-done .tk-banner-sub,
.tk-banner-done .tk-banner-form,
.tk-banner-done .tk-banner-msg,
.tk-banner-done .tk-banner-smallprint {
    display: none;
}
.tk-banner-done .tk-banner-body {
    padding: 34px 26px;
    /* A photo background behind two lines of text reads as noise at this size. */
    background-image: none;
}

/* Popup only: shrink the card itself so the collapse is visible, not just shorter. */
.tk-banner-overlay .tk-banner-done {
    max-width: 340px;
}
.tk-banner-overlay.open .tk-banner-done {
    animation: tk-banner-pop .25s ease;
}
@keyframes tk-banner-pop {
    from { transform: scale(.94); opacity: .6; }
    to   { transform: scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .tk-banner-overlay.open .tk-banner-done { animation: none; }
}

/* Close button (popup only) */
.tk-banner-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.28);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease;
}
.tk-banner-close:hover { background: rgba(0, 0, 0, 0.45); }

/* =============================================
   POPUP OVERLAY
   ============================================= */
.tk-banner-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(20, 26, 34, 0.55);
    opacity: 0;
    transition: opacity .25s ease;
}
.tk-banner-overlay.open { opacity: 1; }
.tk-banner-overlay[hidden] { display: none; }

.tk-banner-overlay .tk-banner {
    width: 100%;
    max-width: 480px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(12px) scale(.98);
    /* max-width animates so the collapse into the confirmation state glides. */
    transition: transform .25s ease, max-width .25s ease;
}
.tk-banner-overlay.open .tk-banner {
    transform: translateY(0) scale(1);
}

/* Inline banner spacing */
.tk-banner-inline {
    max-width: 900px;
    margin: 40px auto;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 560px) {
    .tk-banner-body { padding: 26px 20px 24px; }
    .tk-banner-discount { gap: 8px; }
}
