/* ═══════════════════════════════════════════════════════════════
   I3 TOAST NOTICES  –  v2.3
   Desktop : fixed, долу лево, стакување нагоре → собирање во inbox
   Мобилен : fixed, горе центар
   ═══════════════════════════════════════════════════════════════ */

/* ── Скриј ги оригиналните елементи ────────────────────────── */
.woocommerce-notices-wrapper,
.wc_points_rewards_earn_points,
.woocommerce-info.wc_points_redeem_earn_points,
.woocommerce-form-coupon-toggle,
.checkout_coupon.woocommerce-form-coupon,
.ywgc_have_code,
.ywgc_enter_code,
.woocommerce-cart-form > .woocommerce-info,
form.woocommerce-cart-form .woocommerce-message,
.checkout.woocommerce-checkout > .woocommerce-info,
form.checkout.woocommerce-checkout .woocommerce-message,
.wc-empty-cart-message .cart-empty.woocommerce-info {
    display: none !important;
}


/* ══════════════════════════════════════════════════════
   TOAST КОНТЕЈНЕР
══════════════════════════════════════════════════════ */
#i3-toast-container {
    position: fixed;
    z-index: 99998;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    pointer-events: none;
    bottom: 84px;
    left:   24px;
    top:    auto;
    right:  auto;
    align-items: flex-start;
    max-width: 360px;
    width: 360px;
}

/* ── Единечен toast ─────────────────────────────────────────── */
.i3-toast {
    pointer-events: all;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,.12), 0 1px 4px rgba(0,0,0,.06);
    padding: 14px 16px;
    width: 100%;
    box-sizing: border-box;
    border-left: 4px solid #ccc;
    position: relative;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}
.i3-toast--visible {
    opacity: 1;
    transform: translateX(0);
}
.i3-toast--pre-collect {
    opacity: 0.45;
    transform: translateX(0) scale(0.95);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.i3-toast--collecting {
    transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.4,0,0.2,1) !important;
    pointer-events: none;
}

/* ── Типови ─────────────────────────────────────────────────── */
.i3-toast--info    { border-left-color: #FF1759; }
.i3-toast--success { border-left-color: #28a745; }
.i3-toast--error   { border-left-color: #dc3545; }

/* ── Toast икона ────────────────────────────────────────────── */
.i3-toast__icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'simple-line-icons', sans-serif;
    font-size: 1.1em;
    margin-top: 1px;
}
.i3-toast--info    .i3-toast__icon { background: #FEEAE5; color: #FF1759; }
.i3-toast--success .i3-toast__icon { background: #e9f7ee; color: #28a745; }
.i3-toast--error   .i3-toast__icon { background: #fde8ea; color: #dc3545; }
.i3-toast--info    .i3-toast__icon::before { content: '\e017'; }
.i3-toast--success .i3-toast__icon::before { content: '\e080'; }
.i3-toast--error   .i3-toast__icon::before { content: '\e082'; }

/* ── Toast тело ─────────────────────────────────────────────── */
.i3-toast__body {
    flex: 1;
    font-size: 0.88em;
    line-height: 1.5;
    color: #333;
    word-break: break-word;
}
/* Reset на WooCommerce стилови внатре во toast телото */
.i3-toast__body .woocommerce-message,
.i3-toast__body .woocommerce-info,
.i3-toast__body .woocommerce-error,
.i3-toast__body ul.woocommerce-error,
.i3-toast__body li {
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    list-style: none !important;
    width: auto !important;
    float: none !important;
    min-height: 0 !important;
    display: block !important;
    font-size: inherit !important;
}
.i3-toast__body .woocommerce-message::before,
.i3-toast__body .woocommerce-info::before,
.i3-toast__body .woocommerce-error::before {
    display: none !important;
}
.i3-toast__body a.button,
.i3-toast__body a.wc-forward {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.85em;
    color: #FF1759;
    text-decoration: underline;
    background: none;
    border: none;
    padding: 0;
}

/* ── X копче ────────────────────────────────────────────────── */
.i3-toast__close {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    line-height: 1;
    color: #aaa;
    padding: 0;
    margin-top: -2px;
    transition: color 0.2s;
}
.i3-toast__close:hover { color: #555; }


/* ══════════════════════════════════════════════════════
   INBOX ИКОНКА
══════════════════════════════════════════════════════ */
#i3-inbox-btn {
    position: fixed;
    bottom: 24px;
    left:   24px;
    z-index: 99999;
    width:  48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    /* Заменети бои: позадина светла, икона темна/акцентна */
    background: #FEEAE5;
    color: #FF1759;
    box-shadow: 0 3px 14px rgba(255,23,89,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    padding: 0;
}
#i3-inbox-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 18px rgba(255,23,89,.32);
    background: #fdddd6;
}
#i3-inbox-btn.i3-inbox-btn--open {
    background: #fdd5cc;
    color: #c9003d;
}
#i3-inbox-btn.i3-inbox-btn--pulse {
    animation: i3-inbox-pulse 0.6s ease;
}
@keyframes i3-inbox-pulse {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.22); }
    70%  { transform: scale(0.93); }
    100% { transform: scale(1); }
}

.i3-inbox-icon {
    font-family: 'simple-line-icons', sans-serif;
    font-size: 1.25em;
    line-height: 1;
}
.i3-inbox-icon::before { content: '\e013'; }

/* Badge бројач */
.i3-inbox-badge {
    position: absolute;
    top:   -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    background: #FF1759;
    color: #fff;
    font-size: 0.65em;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    padding: 0 4px;
    box-sizing: border-box;
    display: none;
    box-shadow: 0 1px 4px rgba(0,0,0,.18);
}
#i3-inbox-btn.i3-inbox-btn--has-messages .i3-inbox-badge {
    display: block;
}


/* ══════════════════════════════════════════════════════
   INBOX ПАНЕЛ
══════════════════════════════════════════════════════ */
#i3-inbox-panel {
    position: fixed;
    bottom: 82px;
    left:   24px;
    z-index: 99999;
    width: 340px;
    max-height: 60vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,.14), 0 2px 8px rgba(0,0,0,.07);
    padding: 12px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateY(10px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}
#i3-inbox-panel.i3-inbox-panel--open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.i3-inbox-empty {
    color: #aaa;
    font-size: 0.85em;
    text-align: center;
    padding: 8px 0;
    margin: 0;
}

/* ── Ставка во панелот — без X копче ───────────────────────── */
.i3-inbox-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    border-left: 4px solid #ccc;
    background: #fafafa;
}
.i3-inbox-item--info    { border-left-color: #FF1759; }
.i3-inbox-item--success { border-left-color: #28a745; }
.i3-inbox-item--error   { border-left-color: #dc3545; }

.i3-inbox-item__icon {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'simple-line-icons', sans-serif;
    font-size: 0.9em;
}
.i3-inbox-item--info    .i3-inbox-item__icon { background: #FEEAE5; color: #FF1759; }
.i3-inbox-item--success .i3-inbox-item__icon { background: #e9f7ee; color: #28a745; }
.i3-inbox-item--error   .i3-inbox-item__icon { background: #fde8ea; color: #dc3545; }
.i3-inbox-item--info    .i3-inbox-item__icon::before { content: '\e017'; }
.i3-inbox-item--success .i3-inbox-item__icon::before { content: '\e080'; }
.i3-inbox-item--error   .i3-inbox-item__icon::before { content: '\e082'; }

.i3-inbox-item__body {
    flex: 1;
    font-size: 0.84em;
    line-height: 1.5;
    color: #333;
    word-break: break-word;
}
/* Reset WooCommerce стилови во панелот */
.i3-inbox-item__body .woocommerce-message,
.i3-inbox-item__body .woocommerce-info,
.i3-inbox-item__body .woocommerce-error,
.i3-inbox-item__body ul.woocommerce-error,
.i3-inbox-item__body li {
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    list-style: none !important;
    width: auto !important;
    float: none !important;
    min-height: 0 !important;
    display: block !important;
    font-size: inherit !important;
}
.i3-inbox-item__body .woocommerce-message::before,
.i3-inbox-item__body .woocommerce-info::before,
.i3-inbox-item__body .woocommerce-error::before {
    display: none !important;
}
.i3-inbox-item__body a.button,
.i3-inbox-item__body a.wc-forward {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.85em;
    color: #FF1759;
    text-decoration: underline;
    background: none;
    border: none;
    padding: 0;
}


/* ══════════════════════════════════════════════════════
   МОБИЛЕН  ≤ 600px
══════════════════════════════════════════════════════ */
@media (max-width: 600px) {
    #i3-toast-container {
        bottom: auto;
        left:   50%;
        right:  auto;
        top:    16px;
        transform: translateX(-50%);
        flex-direction: column;
        align-items: center;
        width: calc(100vw - 32px);
        max-width: 420px;
    }
    .i3-toast {
        transform: translateY(-12px);
    }
    .i3-toast--visible {
        transform: translateY(0);
    }
    .i3-toast--pre-collect {
        transform: translateY(0) scale(0.95) !important;
    }
    .i3-toast--collecting {
        transform: translateY(-12px) scale(0.15) !important;
    }

    #i3-inbox-btn {
        bottom: 16px;
        left:   50%;
        transform: translateX(-50%);
    }
    #i3-inbox-btn:hover {
        transform: translateX(-50%) scale(1.1);
    }
    #i3-inbox-btn.i3-inbox-btn--pulse {
        animation: i3-inbox-pulse-mobile 0.6s ease;
    }
    @keyframes i3-inbox-pulse-mobile {
        0%   { transform: translateX(-50%) scale(1); }
        40%  { transform: translateX(-50%) scale(1.22); }
        70%  { transform: translateX(-50%) scale(0.93); }
        100% { transform: translateX(-50%) scale(1); }
    }

    #i3-inbox-panel {
        bottom: 74px;
        left:   50%;
        transform: translateX(-50%) translateY(10px) scale(0.97);
        width: calc(100vw - 32px);
        max-width: 420px;
    }
    #i3-inbox-panel.i3-inbox-panel--open {
        transform: translateX(-50%) translateY(0) scale(1);
    }
}


/* ══════════════════════════════════════════════════════
   ОСТАНАТ СТИЛ НА КОШНИЧКА И НАПЛАТА
══════════════════════════════════════════════════════ */
.woocommerce table.shop_table,
.woocommerce table.shop_table tbody th,
.woocommerce table.shop_table tfoot td,
.woocommerce table.shop_table tfoot th { border-color: #FEEAE5 !important; }
.shop_table thead { display: none; }
.woocommerce table tbody > tr:nth-child(odd) > td,
.woocommerce table tbody > tr:nth-child(odd) > th { background: transparent; }
.shop_table img.attachment-thumbnail.size-thumbnail { vertical-align: middle; width: 60px; margin-right: 10px; }
.woocommerce table.shop_table td { padding: 4px; border-color: #FEEAE5; }
.shop_table td.product-name span { white-space: nowrap; float: inline-end; margin-top: -24px; }
table.shop_table tbody tr:hover > td,
table.shop_table tbody tr:hover > th { background: none; }

.woocommerce-checkout h3#order_review_heading,
.woocommerce-checkout div#order_review table.shop_table.woocommerce-checkout-review-order-table { display: none; }
#add_payment_method #payment,
.woocommerce-cart #payment,
.woocommerce-checkout #payment { background: #FEEAE5 !important; }

.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) #respond input#submit.alt,
.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) a.button.alt,
.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) button.button.alt,
.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) input.button.alt,
:where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce #respond input#submit.alt,
:where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce a.button.alt,
:where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce button.button.alt,
:where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce input.button.alt {
    background: #FF1759 !important; color: #FEEAE5 !important;
}
table.shop_table.shop_table_responsive.cart.woocommerce-cart-form__contents { border-color: #FEEAE5; }

.woocommerce-checkout form#woocommerce-checkout-form-coupon,
.woocommerce-cart form#woocommerce-cart-form-coupon { border: none; margin-bottom: 0; }
.woocommerce-checkout form#woocommerce-checkout-form-coupon p.form-row.form-row-first.woocommerce-validated,
.woocommerce-cart form#woocommerce-cart-form-coupon p.form-row.form-row-first.woocommerce-validated { max-width: 30%; float: left; }
.woocommerce-checkout form#woocommerce-checkout-form-coupon p.form-row.form-row-last,
.woocommerce-cart form#woocommerce-cart-form-coupon p.form-row.form-row-last { float: right; width: 18%; margin-top: 4px; }
.woocommerce-checkout form#woocommerce-checkout-form-coupon button.button,
.woocommerce-cart form#woocommerce-cart-form-coupon button.button { float: right; margin-right: 2em; }
button.button.ywgc_apply_gift_card_button { background: #FF1759 !important; color: #FEEAE5 !important; }
.woocommerce form .form-row .input-text,
.woocommerce form .form-row.woocommerce-validated input.input-text,
.woocommerce form .form-row.woocommerce-validated select,
.woocommerce form .form-row select { border: 1px solid #FEEAE5 !important; }
table.shop_table.shop_table_responsive.cart.woocommerce-cart-form__contents input#coupon_code { width: 56% !important; }
table.shop_table.shop_table_responsive.cart.woocommerce-cart-form__contents div.coupon button.button { margin-top: 4px; }

@media (max-width: 1024px) {
    .woocommerce-checkout form#woocommerce-checkout-form-coupon p.form-row.form-row-first.woocommerce-validated { width: 100%; max-width: 100%; }
    .woocommerce-cart .ywgc_enter_code { clear: both; }
    .woocommerce-cart .ywgc_enter_code p.form-row.form-row-last { text-align: right; }
    #add_payment_method .wc-proceed-to-checkout a.checkout-button,
    .woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
    .woocommerce-checkout .wc-proceed-to-checkout a.checkout-button { padding: .618em 1em !important; }
    table.shop_table.shop_table_responsive.cart.woocommerce-cart-form__contents input#coupon_code { width: 48% !important; }
}
