/* Frontend Styles - WC Loyalty Points Plugin */

/* Area Utente Principale */
.wclp-user-account {
    max-width: 1200px;
    margin: 0 auto;
}

.wclp-user-account h2 {
    font-size: 28px;
    margin-bottom: 30px;
    color: var(--wclp-primary-color, #246661);
    border-bottom: 3px solid var(--wclp-primary-color, #246661);
    padding-bottom: 10px;
}

.wclp-user-account h3 {
    font-size: 22px;
    margin-top: 40px;
    margin-bottom: 20px;
    color: #333;
}

/* Box Saldo Punti */
.wclp-points-balance-box {
    color: #fff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(36, 102, 97, 0.3);
}

.wclp-balance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.wclp-balance-label {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 10px;
}

.wclp-balance-value {
    font-size: 56px;
    font-weight: bold;
    line-height: 1;
    margin-bottom: 5px;
}

.wclp-balance-sublabel {
    font-size: 14px;
    opacity: 0.8;
}

/* Barra Progresso */
.wclp-progress-section {
    background: rgba(255, 255, 255, 0.15);
    padding: 20px;
    border-radius: 8px;
}

.wclp-progress-info {
    margin-bottom: 15px;
    text-align: center;
}

.wclp-progress-info p {
    margin: 0;
    font-size: 16px;
}

.wclp-progress-bar-container {
    background: rgba(255, 255, 255, 0.2);
    height: 30px;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 10px;
}

.wclp-progress-bar {
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    height: 100%;
    transition: width 0.5s ease;
    border-radius: 15px;
    position: relative;
}

.wclp-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

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

.wclp-progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    opacity: 0.9;
}

/* Coupon Grid */
.wclp-coupons-section {
    margin-bottom: 40px;
}

.wclp-coupons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.wclp-coupon-card {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border: 2px dashed var(--wclp-primary-color, #246661);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wclp-coupon-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.wclp-coupon-amount {
    font-size: 42px;
    font-weight: bold;
    color: var(--wclp-primary-color, #246661);
    margin-bottom: 15px;
}

.wclp-coupon-code {
    background: #f0f0f0;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.wclp-coupon-code-value {
    font-family: monospace;
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 1px;
    color: #333;
}

.wclp-copy-coupon {
    background: var(--wclp-primary-color, #246661);
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.3s ease;
}

.wclp-copy-coupon:hover {
    background: #1d534f;
}

.wclp-coupon-expiry {
    font-size: 13px;
    color: #666;
    margin-top: 10px;
}

.wclp-coupon-no-expiry {
    font-size: 13px;
    color: #4CAF50;
    margin-top: 10px;
    font-weight: bold;
}

/* Info Section */
.wclp-info-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 40px;
}

.wclp-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.wclp-info-item {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.wclp-info-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.wclp-info-content strong {
    display: block;
    margin-bottom: 8px;
    color: var(--wclp-primary-color, #246661);
}

.wclp-info-content p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Tabella Storico */
.wclp-history-section {
    margin-bottom: 40px;
}

.wclp-history-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.wclp-history-table thead {
    background: var(--wclp-primary-color, #246661);
    color: #fff;
}

.wclp-history-table th,
.wclp-history-table td {
    padding: 15px;
    text-align: left;
}

.wclp-history-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
}

.wclp-history-table tbody tr:hover {
    background: #f8f9fa;
}

.wclp-points-add {
    color: #4CAF50;
    font-weight: bold;
}

.wclp-points-subtract {
    color: #f44336;
    font-weight: bold;
}

/* Ordini */
.wclp-order-points {
    background: #f0f7f6;
    border: 2px solid var(--wclp-primary-color, #246661);
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
}

.wclp-order-points h2 {
    margin-top: 0;
}

.wclp-points-earned {
    font-size: 18px;
    margin: 15px 0;
}

.wclp-order-points .button {
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s ease;
}

.wclp-order-points .button:hover {
    opacity: 0.9;
    color: #fff;
}

/* Sezione Conversione Punti */
.wclp-conversion-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid rgba(255, 255, 255, 0.3);
}

.wclp-conversion-section h4 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #fff;
}

.wclp-conversion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.wclp-conversion-card {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
}

.wclp-conversion-card.available {
    background: rgba(255, 255, 255, 0.95);
    color: var(--wclp-primary-color, #246661);
    border-color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.wclp-conversion-card.available:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.wclp-conversion-card.locked {
    opacity: 0.6;
    cursor: not-allowed;
}

.wclp-conversion-badge {
    font-size: 32px;
    margin-bottom: 10px;
}

.wclp-conversion-points {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 8px;
}

.wclp-conversion-card.available .wclp-conversion-points {
    color: var(--wclp-primary-color, #246661);
}

.wclp-conversion-arrow {
    font-size: 24px;
    margin: 5px 0;
    opacity: 0.8;
}

.wclp-conversion-amount {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 15px;
}

.wclp-conversion-card.available .wclp-conversion-amount {
    color: #d4af37;
}

.wclp-convert-btn {
    background: var(--wclp-primary-color, #246661);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 10px;
}

.wclp-convert-btn:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.wclp-convert-btn:disabled {
    background: #999;
    cursor: not-allowed;
    transform: none;
}

.wclp-missing-points {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
    padding: 10px;
}

.wclp-conversion-info {
    font-size: 13px;
    opacity: 0.8;
    margin-top: 5px;
}

.wclp-conversion-card.available .wclp-conversion-info {
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .wclp-balance-value {
        font-size: 42px;
    }
    
    .wclp-coupons-grid {
        grid-template-columns: 1fr;
    }
    
    .wclp-info-grid {
        grid-template-columns: 1fr;
    }
    
    .wclp-history-table {
        font-size: 14px;
    }
    
    .wclp-history-table th,
    .wclp-history-table td {
        padding: 10px;
    }
    
    .wclp-conversion-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .wclp-points-balance-box {
        padding: 20px;
    }
    
    .wclp-balance-value {
        font-size: 36px;
    }
    
    .wclp-coupon-amount {
        font-size: 32px;
    }
}
