/**
 * Everbrew Cashback System Styles
 */

/* Cashback info box on product page */
.everbrew-cashback-info, .everbrew-product-cashback {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-left: 5px solid #28a745;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.everbrew-cashback-info::before, .everbrew-product-cashback::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #28a745, #20c997, #28a745);
}

.everbrew-cashback-info p, .everbrew-product-cashback p {
    margin: 0;
    color: #155724;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 10px;
}

.everbrew-cashback-info .cashback-emoji {
    font-size: 24px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-8px);
    }
    60% {
        transform: translateY(-4px);
    }
}

/* Cart cashback fee styling */
.cart-subtotal .everbrew-cashback-fee {
    color: #28a745;
    font-weight: bold;
}

/* Styling para fees de cashback (via JavaScript) */
.everbrew-cashback-fee-notice {
    background: linear-gradient(135deg, #d1f2eb 0%, #a3e4d7 100%) !important;
    color: #155724 !important;
    font-weight: 600 !important;
    border: 2px solid #28a745 !important;
    border-radius: 8px !important;
    padding: 12px 15px !important;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2) !important;
    animation: fadeIn 0.5s ease-in !important;
    position: relative;
}

.everbrew-cashback-fee-notice::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #28a745, #20c997, #28a745);
    border-radius: 6px 6px 0 0;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Admin product page styling */
.everbrew-cashback-field {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.everbrew-cashback-field label {
    font-weight: 600;
    color: #333;
}

/* Responsive design */
@media (max-width: 768px) {
    .everbrew-cashback-info {
        padding: 15px;
        margin: 15px 0;
    }
    
    .everbrew-cashback-info p {
        font-size: 14px;
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
}

/* Success messages styling */
.everbrew-cashback-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 12px 20px;
    border-radius: 6px;
    margin: 10px 0;
}

/* Notice styling */
.everbrew-cashback-notice {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%) !important;
    border: 2px solid #ffc107 !important;
    color: #856404 !important;
    padding: 15px 20px !important;
    border-radius: 8px !important;
    margin: 15px 0 !important;
    font-weight: 600 !important;
    box-shadow: 0 3px 10px rgba(255, 193, 7, 0.3) !important;
    animation: cashbackPulse 2s infinite !important;
    position: relative !important;
    overflow: hidden !important;
}

.everbrew-cashback-notice::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ffc107, #ffed4a, #ffc107);
    animation: shimmer 3s infinite;
}

/* Container for fragments */
.everbrew-cashback-fragment {
    transition: all 0.3s ease-in-out;
}

.everbrew-cashback-fragment .woocommerce-info {
    margin: 10px 0;
}

/* Extra specificity for cashback notices */
.woocommerce-info.everbrew-cashback-notice,
.woocommerce-message.everbrew-cashback-notice {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%) !important;
    border: 2px solid #ffc107 !important;
    color: #856404 !important;
    font-weight: 600 !important;
}

/* Animations */
@keyframes cashbackPulse {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 3px 10px rgba(255, 193, 7, 0.3);
    }
    50% { 
        transform: scale(1.02); 
        box-shadow: 0 5px 15px rgba(255, 193, 7, 0.5);
    }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
