/* TABUTECH Promo — Frontend CSS */

/* ═══ Promo Banner ═══ */
.tabpm-promo-banner {
    width: 100%;
    overflow: hidden;
    position: relative;
    isolation: isolate;
    max-width: 100%;
    box-sizing: border-box;
}
/* ბანერის ყველა შვილი ბოქსში უნდა დარჩეს */
.tabpm-promo-banner * {
    max-width: 100% !important;
    box-sizing: border-box !important;
}
.tabpm-promo-banner img {
    max-width: 100% !important;
    height: auto;
    display: block;
}
/* fixed პოზიციონირება აკრძალულია */
.tabpm-promo-banner [style*="position:fixed"],
.tabpm-promo-banner [style*="position: fixed"] {
    position: absolute !important;
}
/* vw/vh-ზე დაფუძნებული სიგანეები შეზღუდულია */
.tabpm-promo-banner [style*="width:100vw"],
.tabpm-promo-banner [style*="width: 100vw"],
.tabpm-promo-banner [style*="min-width:100vw"],
.tabpm-promo-banner [style*="left:0"][style*="right:0"] {
    max-width: 100% !important;
    left: auto !important;
    right: auto !important;
}

/* ═══ Voucher field in cart ═══ */
.tabpm-voucher-row > td {
    padding: 10px 0 !important;
    border: none !important;
}
.tabpm-voucher-wrap {
    font-family: inherit;
}
.tabpm-voucher-input-wrap {
    display: flex;
    gap: 8px;
    align-items: center;
}
.tabpm-voucher-input {
    flex: 1;
    height: 42px;
    padding: 0 14px;
    border: 1.5px solid #e2e6f0;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    color: #1a1a2e;
    background: #fff;
    transition: border-color .15s;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.tabpm-voucher-input:focus {
    border-color: #3b5bdb;
    outline: none;
}
.tabpm-btn-apply {
    height: 42px;
    padding: 0 18px;
    background: #3b5bdb;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: filter .15s;
    flex-shrink: 0;
}
.tabpm-btn-apply:hover { filter: brightness(.88); }
.tabpm-btn-apply.loading { opacity: .7; pointer-events: none; }

.tabpm-voucher-msg {
    margin-top: 7px;
    font-size: 13px;
    font-weight: 600;
    min-height: 18px;
}
.tabpm-voucher-msg.ok  { color: #2f9e44; }
.tabpm-voucher-msg.err { color: #e03131; }

.tabpm-voucher-active {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: #e6f4ea;
    border: 1.5px solid #b2dfb7;
    border-radius: 8px;
}
.tabpm-voucher-badge {
    flex: 1;
    font-size: 13px;
    color: #1b5e20;
}
.tabpm-voucher-badge strong {
    color: #1b5e20;
    letter-spacing: .5px;
}
.tabpm-voucher-remove {
    background: none;
    border: 1px solid #b2dfb7;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    color: #2f9e44;
    padding: 3px 8px;
    transition: all .15s;
    font-family: inherit;
}
.tabpm-voucher-remove:hover {
    background: #e03131;
    color: #fff;
    border-color: #e03131;
}

/* product page voucher banner */
.tabpm-product-voucher {
    margin: 14px 0;
}
.tabpm-product-voucher-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    background: linear-gradient(135deg, #1a1a2e 0%, #3b5bdb 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}
.tabpm-product-voucher-inner::before {
    content: '';
    position: absolute;
    right: -20px;
    top: -20px;
    width: 120px;
    height: 120px;
    background: rgba(255,255,255,.06);
    border-radius: 50%;
}
.tabpm-pv-icon {
    font-size: 28px;
    flex-shrink: 0;
}
.tabpm-pv-text {
    flex: 1;
    min-width: 0;
}
.tabpm-pv-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
}
.tabpm-pv-sub {
    font-size: 12px;
    opacity: .8;
    margin-top: 2px;
}
.tabpm-pv-code {
    background: rgba(255,255,255,.15);
    border: 1.5px dashed rgba(255,255,255,.4);
    border-radius: 7px;
    padding: 6px 14px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 1.5px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .15s;
    position: relative;
}
.tabpm-pv-code:hover {
    background: rgba(255,255,255,.25);
}
.tabpm-pv-code::after {
    content: '📋 კოპირება';
    position: absolute;
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a2e;
    color: #fff;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity .15s;
    pointer-events: none;
}
.tabpm-pv-code:hover::after { opacity: 1; }
.tabpm-pv-code.copied::after { content: '✓ კოპირებულია!'; opacity: 1; }

/* Mobile */
@media(max-width:600px) {
    .tabpm-voucher-input-wrap { flex-wrap: wrap; }
    .tabpm-voucher-input { width: 100%; }
    .tabpm-btn-apply { width: 100%; }
    .tabpm-product-voucher-inner { flex-wrap: wrap; }
    .tabpm-pv-code { width: 100%; text-align: center; }
}
