/**
 * Points system public styles
 */

/* Points dashboard in My Account */
.tp-wc-crm-points-dashboard {
    padding: 15px;
    background-color: #f8f8f8;
    border-radius: 4px;
    margin-bottom: 20px;
}

.tp-wc-crm-points-dashboard h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
}

.tp-wc-crm-points-dashboard .points-balance {
    font-size: 16px;
    line-height: 1.5;
}

.tp-wc-crm-points-dashboard .button {
    margin-top: 10px;
    display: inline-block;
}

/* Points page in My Account */
.tp-wc-crm-points-page .points-summary {
    margin-bottom: 30px;
}

.points-balance-container {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
    flex-wrap: wrap;
}

.points-balance-container > div {
    flex: 1;
    min-width: 150px;
    padding: 15px;
    text-align: center;
    background-color: #f8f8f8;
    border-radius: 4px;
    margin: 0 10px 10px 0;
}

.points-balance .points-value,
.points-value-container .money-value {
    display: block;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.points-balance .points-label,
.points-value-container .value-label {
    font-size: 14px;
    color: #777;
}

.points-info {
    padding: 15px;
    background-color: #f8f8f8;
    border-radius: 4px;
}

.points-info h4 {
    margin-top: 0;
    margin-bottom: 10px;
}

.points-info ul {
    margin: 0;
    padding-left: 20px;
}

.points-info li {
    margin-bottom: 5px;
}

.points-history {
    margin-top: 30px;
}

.points-history .shop_table .points-positive {
    color: #5b841b;
    font-weight: bold;
}

.points-history .shop_table .points-negative {
    color: #a00;
    font-weight: bold;
}

.no-transactions {
    padding: 15px;
    background-color: #f8f8f8;
    border-radius: 4px;
    text-align: center;
    color: #777;
}

/* Cart points preview */
.cart-points-balance .points-balance {
    font-weight: bold;
}

.cart-points-balance .points-value {
    font-size: 90%;
    color: #777;
}

.cart-points-notice .points-notice {
    padding: 10px;
    background-color: #f7f6f7;
    border-top: 3px solid #7f54b3;
    font-size: 13px;
}

/* Checkout points redemption */
.tp-wc-crm-points-redemption {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f8f8;
    border-radius: 4px;
}

.tp-wc-crm-points-redemption h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
}

.points-balance-info {
    margin-bottom: 15px;
}

.points-redemption-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.points-redemption-form label {
    margin-right: 5px;
}

.points-redemption-form input[type="number"] {
    width: 100px;
}

.points-min-notice {
    width: 100%;
    margin: 5px 0 0;
    font-size: 12px;
    color: #777;
}

.points-applied {
    margin-top: 10px;
}

/* Thank you page points */
.tp-wc-crm-thankyou-points {
    margin: 30px 0;
    padding: 20px;
    background-color: #f8f8f8;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.tp-wc-crm-thankyou-points h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 20px;
    color: #333;
}

.tp-wc-crm-thankyou-points .points-balance {
    font-weight: bold;
}

.tp-wc-crm-thankyou-points .points-value {
    color: #666;
    font-style: italic;
    margin-left: 5px;
}

.tp-wc-crm-thankyou-points .points-earned {
    color: #5b841b;
}

.tp-wc-crm-thankyou-points .points-redeemed {
    color: #a00;
}

.tp-wc-crm-thankyou-points .points-count {
    font-weight: bold;
}

.tp-wc-crm-thankyou-points .points-note {
    color: #777;
    font-style: italic;
}

.tp-wc-crm-thankyou-points .points-action {
    margin-top: 15px;
}

.tp-wc-crm-thankyou-points .button {
    background-color: #7f54b3;
    color: #fff;
    padding: 8px 15px;
    border-radius: 3px;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s;
}

.tp-wc-crm-thankyou-points .button:hover {
    background-color: #6a4599;
}


/* Club membership styles */
.tp-wc-crm-club-benefits {
    margin-bottom: 30px;
    padding: 15px;
    background-color: #f8f8f8;
    border-radius: 4px;
}

.tp-wc-crm-club-benefits h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
}

.tp-wc-crm-club-benefits h4 {
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 16px;
}

.tp-wc-crm-club-benefits .shop_table {
    margin-bottom: 0;
}

/* Registration form fields */
.woocommerce-form-register .form-row #birthday,
.woocommerce-form-register .form-row #id_number {
    width: 100%;
    padding: 8px;
}

/* Points limit notice */
.points-limit-notice {
    background-color: #fff9c4;
    border: 1px solid #fbc02d;
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
    font-size: 14px;
}

.error-notice {
    color: #d32f2f;
    font-weight: bold;
}

/*
 * הוספה לקובץ: public/css/tp-woocommerce-customers-crm-public.css
 * הוסף בסוף הקובץ:
 */

/* Club Popup Integration Styles */
.tp-popup-overlay {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Ensure popup appears above everything */
.tp-popup-overlay {
    z-index: 999999 !important;
}

/* Fix for themes that might interfere */
.tp-popup-content * {
    box-sizing: border-box;
}

.tp-popup-content input,
.tp-popup-content button,
.tp-popup-content textarea,
.tp-popup-content select {
    font-family: inherit;
}

/* Prevent popup content from being affected by theme styles */
/* .tp-popup-content {
    all: initial;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background: white;
    border-radius: 15px;
    box-shadow: 0 25px 80px rgba(0,0,0,0.25);
    max-width: 550px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.7) translateY(50px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
} */

/* WordPress admin bar compatibility */
body.admin-bar .tp-popup-overlay {
    top: 32px;
    height: calc(100% - 32px);
}

@media screen and (max-width: 782px) {
    body.admin-bar .tp-popup-overlay {
        top: 46px;
        height: calc(100% - 46px);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .tp-popup-content {
        border: 2px solid #000;
    }
    
    .tp-popup-close {
        border: 1px solid #000;
    }
    
    .tp-form-group input {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .tp-popup-overlay,
    .tp-popup-content,
    .tp-popup-close,
    .tp-popup-btn {
        transition: none !important;
        animation: none !important;
    }
    
    .tp-popup-content {
        transform: none !important;
    }
}

/* Personal Coupons Styles */
.tp-wc-crm-user-coupons {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.coupons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.user-coupon {
    background: white;
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.user-coupon.coupon-active {
    border-left-color: #4CAF50;
}

.user-coupon.coupon-used {
    border-left-color: #FF9800;
    opacity: 0.7;
}

.user-coupon.coupon-expired {
    border-left-color: #f44336;
    opacity: 0.5;
}

.coupon-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.coupon-code {
    font-size: 16px;
    color: #333;
}

.coupon-type {
    background: #667eea;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    text-transform: uppercase;
}

.coupon-amount {
    font-size: 18px;
    font-weight: bold;
    color: #667eea;
    margin: 10px 0;
}

.coupon-status {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.status-used { color: #FF9800; }
.status-expired { color: #f44336; }
.status-active { color: #4CAF50; }

.tp-crm-product-points-promotion {
    margin-top: 15px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 5px;
    border: 1px solid #d5d5d5;
    font-size: 15px;
    position: relative;
    overflow: visible;
}

.tp-open-club-popup {
    text-decoration: none;
    /* color: #0073aa; */
    color: #404040;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.tp-arrow-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #0073aa;
    border-radius: 50%;
    transition: all 0.3s ease;
    margin-left: 15px;
    flex-shrink: 0;
}
.tp-open-club-popup:hover .tp-arrow-btn {
    transform: translateX(5px);
    background: #005bb5 !important;
    box-shadow: 0 4px 15px rgba(0, 115, 170, 0.3);
}

.tp-open-club-popup:active .tp-arrow-btn {
    transform: translateX(3px) scale(0.95);
}

@keyframes pulseArrow {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(3px); }
}

.tp-crm-product-points-promotion:hover .tp-arrow-btn {
    animation: pulseArrow 1s ease-in-out infinite;
}

.tp-open-club-popup:hover {
    opacity: 0.9;
}

/* Responsive */
@media (max-width: 480px) {
    .tp-open-club-popup {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .tp-arrow-btn {
        margin-left: 0 !important;
        margin-top: 10px;
    }
}

    
.tp-crm-product-points-promotion::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        #ff0080, #ff8c00, #ffd700, #00ff00, 
        #00ffff, #1e90ff, #9370db, #ff1493);
    border-radius: 5px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease;
    background-size: 300% 300%;
    animation: gradient-shift 4s ease infinite;
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.tp-crm-product-points-promotion:hover::before {
    opacity: 1;
    animation: gradient-shift 2s ease infinite, draw-border 0.5s ease-out;
}

@keyframes draw-border {
    0% {
        clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
    }
    25% {
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 100%);
    }
    50% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
    75% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 100% 100%);
    }
    100% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
}

/* Sparkle effect */
.tp-crm-product-points-promotion:hover {
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.4);
}