/**
 * Loyalty Program Manager - Public Styles
 */

/* Points Balance Display */
.lpm-points-balance {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.points-display {
    margin-bottom: 10px;
}

.points-number {
    font-size: 2.5em;
    font-weight: bold;
    display: block;
    line-height: 1;
}

.points-label {
    font-size: 0.9em;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tier-display {
    margin-top: 10px;
}

.tier-name {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 500;
}

.tier-benefits {
    margin-top: 10px;
    font-size: 0.8em;
    opacity: 0.9;
}

/* Rewards Catalog */
.lpm-rewards-catalog {
    margin: 30px 0;
}

.rewards-grid {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}

.reward-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f0f0f0;
}

.reward-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.reward-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.reward-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.2em;
}

.points-required {
    background: #0073aa;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: bold;
}

.reward-description {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.reward-value {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    color: #0073aa;
    margin-bottom: 15px;
}

.reward-actions {
    text-align: center;
}

.redeem-reward-btn {
    background: #0073aa;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
    width: 100%;
}

.redeem-reward-btn:hover:not(:disabled) {
    background: #005a87;
}

.redeem-reward-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Login Required */
.lpm-login-required {
    background: white;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.lpm-login-required h3 {
    color: #333;
    margin-bottom: 15px;
}

.lpm-login-required p {
    color: #666;
    margin-bottom: 20px;
}

.lpm-login-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.lpm-login-actions .button {
    background: #0073aa;
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s ease;
}

.lpm-login-actions .button:hover {
    background: #005a87;
    color: white;
}

/* Transaction History */
.lpm-transaction-history {
    margin: 30px 0;
}

.transaction-item {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
}

.transaction-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
}

.transaction-icon.positive {
    background: #d4edda;
    color: #155724;
}

.transaction-icon.negative {
    background: #f8d7da;
    color: #721c24;
}

.transaction-content {
    flex: 1;
}

.transaction-description {
    font-weight: 500;
    margin-bottom: 5px;
}

.transaction-meta {
    font-size: 0.9em;
    color: #666;
}

.transaction-points {
    font-weight: 500;
    color: #0073aa;
}

.transaction-date {
    margin-left: 10px;
}

/* Tier Benefits */
.lpm-tier-benefits {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.lpm-tier-benefits h3 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.benefits-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.benefits-list li:last-child {
    border-bottom: none;
}

.benefits-list li:before {
    content: "✓";
    color: #28a745;
    font-weight: bold;
}

.next-tier-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: center;
    color: #666;
}

/* Pagination */
.lpm-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 30px 0;
}

.lpm-pagination a,
.lpm-pagination span {
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    border: 1px solid #ddd;
    color: #0073aa;
}

.lpm-pagination a:hover {
    background: #f8f9fa;
}

.lpm-pagination .current {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

/* Loading States */
.lpm-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.lpm-loading:after {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error Messages */
.lpm-message {
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
}

.lpm-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.lpm-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .rewards-grid {
        grid-template-columns: 1fr;
    }
    
    .lpm-login-actions {
        flex-direction: column;
    }
    
    .transaction-item {
        flex-direction: column;
        text-align: center;
    }
    
    .transaction-icon {
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .points-number {
        font-size: 2em;
    }
    
    .reward-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .points-required {
        align-self: flex-start;
    }
} 