/* Public Styles for Loyalty Rewards Plugin */

/* Registration Form */
.loyalty-registration-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.loyalty-registration-form h2 {
    margin-top: 0;
    color: #333;
}

.loyalty-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.loyalty-form-group {
    margin-bottom: 20px;
}

.loyalty-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.loyalty-form-group .required {
    color: #dc3545;
}

.loyalty-form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.loyalty-form-group input:focus {
    outline: none;
    border-color: #2271b1;
}

/* Dashboard */
.loyalty-dashboard {
    max-width: 1200px;
    margin: 0 auto;
}

.loyalty-dashboard-header {
    margin-bottom: 30px;
}

.loyalty-dashboard-header h2 {
    margin: 0 0 10px;
    color: #333;
}

/* Balance Section */
.loyalty-balance-section {
    margin-bottom: 40px;
}

.loyalty-balance-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.loyalty-balance-card h3 {
    margin: 0 0 20px;
    font-size: 18px;
    opacity: 0.9;
}

.loyalty-points-display {
    margin: 20px 0;
}

.loyalty-points-number {
    font-size: 64px;
    font-weight: bold;
    display: block;
}

.loyalty-points-label {
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.9;
}

.loyalty-conversion-info {
    margin-top: 15px;
    opacity: 0.8;
}

/* Redemption Section */
.loyalty-redemption-section {
    margin-bottom: 40px;
}

.loyalty-redemption-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.loyalty-redemption-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.loyalty-redemption-card h4 {
    margin: 0 0 10px;
    color: #333;
}

.loyalty-help-text {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
}

/* Buttons */
.loyalty-button {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.loyalty-button-primary {
    background: #2271b1;
    color: #fff;
}

.loyalty-button-primary:hover {
    background: #135e96;
}

.loyalty-button-secondary {
    background: #fff;
    color: #2271b1;
    border: 2px solid #2271b1;
}

.loyalty-button-secondary:hover {
    background: #2271b1;
    color: #fff;
}

.loyalty-button-disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
}

/* Tables */
.loyalty-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.loyalty-table thead {
    background: #f8f9fa;
}

.loyalty-table th,
.loyalty-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.loyalty-table th {
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    font-size: 12px;
}

.loyalty-table tbody tr:last-child td {
    border-bottom: none;
}

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

/* Badges */
.loyalty-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.loyalty-badge-earned {
    background: #d4edda;
    color: #155724;
}

.loyalty-badge-redeemed {
    background: #fff3cd;
    color: #856404;
}

.loyalty-badge-adjusted {
    background: #d1ecf1;
    color: #0c5460;
}

/* Status */
.loyalty-status-used {
    color: #dc3545;
    font-weight: 600;
}

.loyalty-status-active {
    color: #28a745;
    font-weight: 600;
}

.loyalty-positive {
    color: #28a745;
}

.loyalty-negative {
    color: #dc3545;
}

/* Rewards Catalog */
.loyalty-rewards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.loyalty-reward-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.loyalty-reward-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.loyalty-reward-card.loyalty-insufficient {
    opacity: 0.6;
}

.loyalty-reward-card.loyalty-out-of-stock {
    opacity: 0.5;
}

.loyalty-reward-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
}

.loyalty-reward-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.loyalty-reward-content {
    padding: 15px;
}

.loyalty-reward-title {
    margin: 0 0 10px;
    font-size: 16px;
    color: #333;
}

.loyalty-reward-description {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}

.loyalty-reward-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.loyalty-points-cost {
    font-size: 18px;
    font-weight: bold;
    color: #2271b1;
}

.loyalty-retail-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

.loyalty-reward-stock {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}

.loyalty-reward-action {
    margin-top: 15px;
}

.loyalty-reward-action .loyalty-button {
    width: 100%;
}

/* Messages */
.loyalty-message {
    padding: 12px 15px;
    border-radius: 4px;
    margin-top: 15px;
}

.loyalty-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.loyalty-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* No Data */
.loyalty-no-data {
    text-align: center;
    color: #999;
    padding: 40px 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .loyalty-form-row {
        grid-template-columns: 1fr;
    }

    .loyalty-redemption-options {
        grid-template-columns: 1fr;
    }

    .loyalty-rewards-grid {
        grid-template-columns: 1fr;
    }

    .loyalty-points-number {
        font-size: 48px;
    }

    .loyalty-table {
        font-size: 13px;
    }

    .loyalty-table th,
    .loyalty-table td {
        padding: 8px 10px;
    }
}