/* ============================================
   TESORO GIFTS v1.0 — Frontend CSS
   ============================================ */

/* ─── Žymė „DOVANA!" prie prekės pavadinimo (krepšelis, checkout, užsakymas, el. laiškai) ─── */
.ttgift-badge {
    display: inline-block;
    color: #d0021b;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    font-size: .85em;
    white-space: nowrap;
}

.widget_shopping_cart .ttgift-badge,
.woocommerce-mini-cart .ttgift-badge,
.astra-cart-drawer .ttgift-badge {
    color: #d0021b !important;
}

.ttgift-price {
    color: #d0021b;
    font-weight: 700;
}

/* ─── Produkto puslapis — pasiūlymo kortelė ─── */
.ttgift-offer {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin: 0 0 14px;
    padding: 12px 14px;
    background: #fff5f5;
    border: 1px solid #f3c9c9;
    border-left: 3px solid #d0021b;
    border-radius: 6px;
    font-size: 13px;
    color: #444;
    line-height: 1.5;
}

.ttgift-offer-imgs {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    flex-wrap: wrap;
    max-width: 140px;
}

.ttgift-offer-imgs .ttgift-offer-img {
    flex: 0 0 auto;
}

.ttgift-offer--multi .ttgift-offer-img {
    width: 48px;
    height: 48px;
}

.ttgift-offer-img {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #eee;
}

.ttgift-offer-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ttgift-offer-body {
    flex: 1;
    min-width: 0;
}

.ttgift-offer-text strong {
    color: #222;
}

.ttgift-offer-status {
    margin-top: 8px;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12.5px;
    background: #fff;
    border: 1px dashed #e4a3a3;
    color: #8a1c1c;
}

.ttgift-offer-status.is-done {
    background: #f1f8f1;
    border: 1px solid #cfe6cf;
    color: #2d7a2d;
}

.ttgift-offer-status[hidden] {
    display: none;
}

/* ─── Krepšelis / checkout — pažangos pranešimai ─── */
.ttgift-cart-box {
    margin-bottom: 16px;
}

.ttgift-cart-msg {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 8px;
}

.ttgift-cart-msg--progress {
    background: #fff5f5;
    border: 1px solid #f3c9c9;
    color: #6b1a1a;
}

.ttgift-cart-msg--done {
    background: #f1f8f1;
    border: 1px solid #cfe6cf;
    color: #2d7a2d;
}

/* ─── Tesoro custom krepšelis — dovanos eilutė: kiekis fiksuotas, šalinimo nėra ─── */
.tesoro-cart-row.ttgift-item {
    background: #fffafa;
}

.tesoro-cart-row.ttgift-item .tesoro-cart-remove a {
    visibility: hidden;
    pointer-events: none;
}

.tesoro-cart-row.ttgift-item .tesoro-cart-qty button {
    display: none;
}

.tesoro-cart-row.ttgift-item .tesoro-cart-qty input {
    pointer-events: none;
    background: transparent;
    border-color: transparent;
    text-align: center;
}

/* Standartinis WooCommerce krepšelis */
.woocommerce-cart-form .cart_item.ttgift-item .product-remove {
    visibility: hidden;
}

/* ─── Checkout ─── */
.ttgift-checkout-row td {
    padding-top: 0 !important;
}

.ttgift-checkout-notice {
    background: #fff5f5;
    border: 1px solid #f3c9c9;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
    color: #6b1a1a;
    margin-bottom: 12px;
    line-height: 1.5;
}

/* ─── Mobile ─── */
@media (max-width: 600px) {
    .ttgift-offer { padding: 10px 12px; }
    .ttgift-offer-img { flex-basis: 52px; width: 52px; height: 52px; }
}

/* ─── Dovanos pasirinkimas (produkto puslapis, krepšelis, checkout) ─── */
.ttgift-choice-title {
    margin-top: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: #444;
}

.ttgift-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
    position: relative;
}

.ttgift-picker.is-busy { opacity: .6; pointer-events: none; }

.ttgift-pick {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1 1 150px;
    max-width: 220px;
    padding: 10px 8px 8px;
    background: #fff;
    border: 2px solid #e6e6e6;
    border-radius: 6px;
    cursor: pointer;
    font: inherit;
    color: #444;
    text-align: center;
    transition: border-color .15s, box-shadow .15s;
}

.ttgift-pick:hover { border-color: #d0021b; }

.ttgift-pick.is-selected {
    border-color: #2d7a2d;
    box-shadow: 0 0 0 2px rgba(45,122,45,.15);
    background: #f7fbf7;
}

.ttgift-pick img {
    display: block;
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 4px;
}

.ttgift-pick-name {
    font-size: 12px;
    line-height: 1.3;
    font-weight: 600;
    color: #333;
}

.ttgift-pick-price {
    font-size: 12px;
    color: #888;
    line-height: 1.2;
}

.ttgift-pick-price del {
    color: #999;
}

.ttgift-pick-price strong,
.ttgift-pick-price strong .amount {
    color: #d0021b;
    font-weight: 700;
    font-size: 14px;
}

.ttgift-pick-check {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2d7a2d;
    color: #fff;
    font-size: 12px;
    line-height: 20px;
    display: none;
}

.ttgift-pick.is-selected .ttgift-pick-check { display: block; }

.ttgift-pick-saved {
    flex-basis: 100%;
    font-size: 12px;
    color: #2d7a2d;
    font-weight: 600;
}

.ttgift-offer--pick { display: block; }
.ttgift-cart-msg--done .ttgift-picker { margin-top: 8px; }
