/* wclc Frontend Styles */

/* WCLC – Card Live Update States */

.wclc-live-card.wclc-updating {
    opacity: 0.55;
    pointer-events: none;
    transition: opacity 0.2s;
}

/* Toast notificare generică */
.wclc-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1a1a2e;
    color: #fff;
    padding: 14px 22px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    text-align: center;
    border-left: 4px solid #667eea;
    max-width: 320px;
    width: 90%;
}
.wclc-toast.wclc-toast-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}


/* WCLC – Removing state (optimistic UI) */
.wclc-live-card.wclc-removing {
    opacity: 0.35;
    pointer-events: none;
    transform: scale(0.97);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.wclc-toast-reset {
    border-left-color: #f59e0b;
}


/* ══════════════════════════════════════════════════════════
   WCLC – Gift Card Styles (Chenar Auriu Premium)
   ══════════════════════════════════════════════════════════ */

/* Containerul principal al cardului cadou */
.wclc-gift-card {
    position: relative;
    border: 3px solid #d4af37;
    border-radius: 16px;
    padding: 20px 22px;
    margin: 10px 0 20px;
    max-width: 420px;
    background: linear-gradient(135deg, #fffdf0 0%, #fff8e1 50%, #fffdf0 100%);
    box-shadow:
        0 0 0 1px rgba(212, 175, 55, 0.3),
        0 4px 20px rgba(212, 175, 55, 0.2),
        0 8px 40px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    overflow: hidden;
}

/* Efect shimmer auriu */
.wclc-gift-card::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(212, 175, 55, 0.15),
        transparent
    );
    transform: skewX(-20deg);
    transition: left 0.6s ease;
    pointer-events: none;
}
.wclc-gift-card:hover::before {
    left: 150%;
}

.wclc-gift-card:hover {
    transform: translateY(-2px);
    box-shadow:
        0 0 0 1px rgba(212, 175, 55, 0.5),
        0 8px 30px rgba(212, 175, 55, 0.3),
        0 12px 50px rgba(0, 0, 0, 0.1);
}

/* Inner layout */
.wclc-gift-card-inner {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Iconița cadou */
.wclc-gift-card-icon {
    font-size: 36px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
    animation: wclcGiftPulse 2.5s ease-in-out infinite;
}

@keyframes wclcGiftPulse {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.08); }
}

/* Conținut text */
.wclc-gift-card-content {
    flex: 1;
    min-width: 0;
}

.wclc-gift-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #5a3e00;
    line-height: 1.3;
    margin-bottom: 4px;
}

.wclc-gift-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.wclc-gift-badge-count {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #d4af37, #f0c040);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: 0.3px;
}

.wclc-gift-in-cart {
    font-size: 11px;
    color: #16a34a;
    font-weight: 600;
}

/* Butonul de revendicare */
.wclc-gift-btn {
    flex-shrink: 0;
    background: linear-gradient(135deg, #d4af37 0%, #f0c040 50%, #d4af37 100%);
    background-size: 200% auto;
    color: #3d2800;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: background-position 0.4s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 3px 12px rgba(212, 175, 55, 0.4);
    white-space: nowrap;
}

.wclc-gift-btn:hover:not(:disabled) {
    background-position: right center;
    transform: translateY(-1px);
    box-shadow: 0 5px 18px rgba(212, 175, 55, 0.55);
}

.wclc-gift-btn:active:not(:disabled) {
    transform: translateY(0);
}

.wclc-gift-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    background: #e0d5a0;
    box-shadow: none;
}

.wclc-gift-btn-incart {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    box-shadow: 0 3px 12px rgba(34, 197, 94, 0.35);
}

/* Cantitate blocată pentru produse cadou în coș */
.wclc-gift-qty-locked {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    color: #5a3e00;
    background: linear-gradient(135deg, #fff8e1, #fffdf0);
    border: 1px solid #d4af37;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 13px;
    pointer-events: none;
    user-select: none;
}
.wclc-gift-qty-locked small {
    font-size: 10px;
    font-weight: 500;
    opacity: 0.7;
    color: #7a5c00;
}

/* ══════════════════════════════════════════════════════════
   MODAL DE CONFIRMARE
   ══════════════════════════════════════════════════════════ */

.wclc-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 999990;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.wclc-modal-overlay.wclc-modal-open {
    opacity: 1;
    pointer-events: all;
}

.wclc-modal {
    background: #fff;
    border-radius: 20px;
    padding: 36px 32px 28px;
    max-width: 400px;
    width: 90%;
    position: relative;
    transform: scale(0.88) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 20px 60px rgba(0,0,0,0.25), 0 0 0 1px rgba(0,0,0,0.06);
    border-top: 4px solid #d4af37;
}

.wclc-modal-overlay.wclc-modal-open .wclc-modal {
    transform: scale(1) translateY(0);
}

.wclc-modal-icon {
    text-align: center;
    font-size: 52px;
    margin-bottom: 12px;
    animation: wclcGiftPulse 2s ease-in-out infinite;
}

.wclc-modal-title {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
    line-height: 1.4;
}

.wclc-modal-subtitle {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-bottom: 28px;
    line-height: 1.5;
}

.wclc-modal-actions {
    display: flex;
    gap: 12px;
}

.wclc-modal-yes {
    flex: 1;
    background: linear-gradient(135deg, #d4af37, #f0c040);
    color: #3d2800;
    border: none;
    padding: 13px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(212,175,55,0.4);
}

.wclc-modal-yes:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(212,175,55,0.5);
}

.wclc-modal-yes:disabled {
    opacity: 0.6;
    cursor: wait;
}

.wclc-modal-no {
    flex: 1;
    background: #f4f4f5;
    color: #555;
    border: 1px solid #e4e4e7;
    padding: 13px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.wclc-modal-no:hover {
    background: #e4e4e7;
    color: #333;
}

/* Feedback de succes în modal */
.wclc-modal-success {
    text-align: center;
    padding: 10px 0 4px;
}

.wclc-modal-success-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 8px;
}

.wclc-modal-success-text {
    font-size: 16px;
    font-weight: 700;
    color: #16a34a;
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
    .wclc-gift-card {
        max-width: 100%;
        padding: 16px;
    }
    .wclc-gift-card-inner {
        flex-wrap: wrap;
    }
    .wclc-gift-btn {
        width: 100%;
        text-align: center;
        margin-top: 6px;
    }
    .wclc-modal {
        padding: 28px 20px 22px;
    }
    .wclc-modal-actions {
        flex-direction: column;
    }
}


/* WCLC – Gift Toast Notification */
.wclc-gift-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    padding: 13px 22px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    z-index: 999999;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    max-width: 340px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}
.wclc-gift-toast-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.wclc-gift-toast-info {
    background: #1a1a2e;
    color: #fff;
    border-left: 4px solid #d4af37;
}
.wclc-gift-toast-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.wclc-loyalty-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 24px;
    color: #fff;
    margin: 20px 0;
    max-width: 420px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.2);
    position: relative;
    overflow: hidden;
}
.wclc-loyalty-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.15);
    border-radius: 16px;
    pointer-events: none;
}
.wclc-loyalty-card > * { position: relative; z-index: 1; }

.wclc-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.wclc-card-header h4 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: #fff;
}
.wclc-progress {
    font-size: 24px;
    font-weight: 800;
    opacity: 0.9;
}

.wclc-stamps-grid {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}
.wclc-stamp {
    aspect-ratio: 1;
    border: 2px dashed rgba(255,255,255,0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.05);
}
.wclc-stamp span {
    font-size: 12px;
    opacity: 0.4;
}
.wclc-stamp-active {
    border-style: solid;
    border-color: rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.15);
    animation: wclcStampPop 0.4s ease;
}
.wclc-stamp-active svg,
.wclc-stamp-active img {
    width: 28px;
    height: 28px;
    color: #FFD700;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}
.wclc-stamp-active img {
    border-radius: 50%;
    object-fit: cover;
}

@keyframes wclcStampPop {
    0% { transform: scale(0) rotate(-180deg); }
    60% { transform: scale(1.15) rotate(5deg); }
    100% { transform: scale(1) rotate(0); }
}

.wclc-card-footer {
    margin-top: 8px;
}
.wclc-progress-bar {
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    overflow: hidden;
}
.wclc-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    border-radius: 3px;
    transition: width 0.5s ease;
}
.wclc-card-footer small {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    opacity: 0.8;
}

/* Restricted Notice */
.wclc-restricted-notice {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-left: 4px solid #ffc107;
    border-radius: 8px;
    padding: 14px 18px;
    font-size: 14px;
    color: #5d4037;
    margin: 16px 0;
    max-width: 420px;
}

/* Credits Box */
.wclc-credits-box {
    background: linear-gradient(135deg, #f6f0ff, #fff5e6);
    border: 2px solid #e8d5f5;
    border-radius: 12px;
    padding: 16px 20px;
    margin: 12px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 420px;
    flex-wrap: wrap;
    gap: 12px;
}
.wclc-credits-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
}
.wclc-credits-icon { font-size: 24px; }

.wclc-claim-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}
.wclc-claim-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}
.wclc-claim-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #999;
}

/* Header Badge */
.wclc-gift-badge {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    transition: transform 0.3s;
}
.wclc-gift-badge:hover {
    transform: scale(1.1);
}
.wclc-badge-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #FFD700;
    color: #333;
    font-size: 11px;
    font-weight: 800;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

/* Gift Badge Drop-down */
.wclc-gift-badge { position: relative; }
.wclc-gift-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 280px;
    background: #fff;
    color: #333;
    border-radius: 14px;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.25);
    padding: 16px;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    text-align: left;
}
.wclc-gift-dropdown.wclc-gift-dropdown-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.wclc-gift-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
}
.wclc-gift-dropdown-total {
    font-size: 12px;
    color: #764ba2;
    font-weight: 700;
}
.wclc-gift-dropdown-list {
    list-style: none;
    margin: 0 0 12px 0;
    padding: 0;
    max-height: 220px;
    overflow-y: auto;
}
.wclc-gift-dropdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid #f3f0f9;
    font-size: 13px;
}
.wclc-gift-dropdown-item:last-child { border-bottom: none; }
.wclc-gift-item-name {
    color: #333;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.wclc-gift-item-count {
    color: #fff;
    background: linear-gradient(135deg, #667eea, #764ba2);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
}
.wclc-gift-dropdown-empty {
    padding: 18px 0;
    text-align: center;
    color: #999;
    font-size: 13px;
}
.wclc-gift-dropdown-checkout {
    display: block;
    text-align: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff !important;
    padding: 11px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    margin-top: 4px;
    transition: opacity 0.2s;
}
.wclc-gift-dropdown-checkout:hover { opacity: 0.9; }

/* My Account Section */
.wclc-my-account-section {
    margin: 30px 0;
}
.wclc-my-account-section h3 {
    font-size: 20px;
    margin-bottom: 16px;
    color: #333;
}
.wclc-cards-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.wclc-no-cards {
    color: #777;
    font-style: italic;
    padding: 20px;
}
.wclc-login-notice {
    padding: 16px;
    background: #f9f9f9;
    border-radius: 8px;
    text-align: center;
    color: #666;
}

/* Cart Progress Preview Block */
.wclc-cart-preview-block {
    background: linear-gradient(135deg, #f0f4ff, #faf0ff);
    border: 1px solid #d4bbf7;
    border-radius: 14px;
    padding: 16px 20px;
    margin: 16px 0;
    max-width: 500px;
}
.wclc-cart-preview-title {
    font-weight: 700;
    font-size: 15px;
    color: #4a2c7a;
    margin-bottom: 12px;
}
.wclc-cart-progress-item {
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e0ccf5;
}
.wclc-cart-progress-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.wclc-cart-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.wclc-cart-product-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}
.wclc-cart-stamp-count {
    font-size: 13px;
    font-weight: 700;
    color: #764ba2;
}
.wclc-cart-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #777;
}
.wclc-hint-complete { color: #16a34a; font-weight: 600; }
.wclc-hint-almost   { color: #d97706; font-weight: 600; }

/* Responsive */
@media (max-width: 480px) {
    .wclc-loyalty-card {
        padding: 18px;
        max-width: 100%;
    }
    .wclc-credits-box {
        flex-direction: column;
        text-align: center;
        max-width: 100%;
    }
    .wclc-cart-preview-block {
        max-width: 100%;
    }
}
