/* OniGrow Rewards Dashboard */

.og-rewards-dashboard {
    max-width: 800px;
    margin: 0 auto;
}

/* Balance Card */
.og-rewards-balance-card {
    background: var(--color-gradient, linear-gradient(135deg, #833AB4, #e1306c, #F77737));
    color: #fff;
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 28px;
}

.og-rewards-balance {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 12px;
}

.og-rewards-balance-label {
    font-size: 14px;
    opacity: 0.9;
}

.og-rewards-balance-amount {
    font-size: 36px;
    font-weight: 700;
}

.og-rewards-balance-amount .woocommerce-Price-amount {
    color: #fff;
}

.og-rewards-auto-apply {
    margin-bottom: 16px;
    font-size: 14px;
}

.og-rewards-auto-apply input[type="checkbox"] {
    margin-right: 6px;
    accent-color: #fff;
}

.og-rewards-code-section {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.og-rewards-code-label {
    font-size: 13px;
    opacity: 0.85;
}

.og-rewards-code-value {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
    background: rgba(255,255,255,0.15);
    padding: 4px 12px;
    border-radius: 6px;
}

.og-rewards-code-edit {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.og-rewards-code-edit input {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.4);
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-family: monospace;
    text-transform: uppercase;
}

.og-rewards-code-edit input::placeholder {
    color: rgba(255,255,255,0.6);
}

.og-rewards-code-feedback {
    font-size: 13px;
}

/* Buttons */
.og-rewards-btn-sm {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

.og-rewards-btn-sm:hover {
    background: rgba(255,255,255,0.35);
}

/* Stats Grid */
.og-rewards-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

@media (max-width: 600px) {
    .og-rewards-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

.og-rewards-stat {
    background: var(--color-bg-alt, #f8f9fa);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 12px;
    padding: 20px 16px;
    text-align: center;
}

.og-rewards-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text, #1a1a2e);
    margin-bottom: 4px;
}

.og-rewards-stat-value .woocommerce-Price-amount {
    font-size: 24px;
}

.og-rewards-stat-label {
    font-size: 11px;
    color: var(--color-text-muted, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Sections */
.og-rewards-section {
    margin-bottom: 28px;
}

.og-rewards-section h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
    color: var(--color-text, #1a1a2e);
}

.og-rewards-next-tier {
    color: var(--color-primary, #e1306c);
    font-weight: 600;
}

/* Tables */
.og-rewards-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.og-rewards-table th {
    background: var(--color-bg-alt, #f8f9fa);
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted, #6b7280);
    border-bottom: 2px solid var(--color-border, #e5e7eb);
}

.og-rewards-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
}

.og-rewards-positive {
    color: var(--color-success, #10b981);
    font-weight: 600;
}

.og-rewards-negative {
    color: var(--color-error, #ef4444);
    font-weight: 600;
}

/* Status badges */
.og-rewards-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.og-rewards-status-active {
    background: #d1fae5;
    color: #065f46;
}

.og-rewards-status-inactive {
    background: #fee2e2;
    color: #991b1b;
}

/* Pagination */
.og-rewards-pagination {
    text-align: center;
    margin-top: 16px;
}

.og-rewards-pagination .og-rewards-btn-sm {
    background: var(--color-bg-alt, #f8f9fa);
    color: var(--color-text, #1a1a2e);
    border: 1px solid var(--color-border, #e5e7eb);
}

.og-rewards-pagination .og-rewards-btn-sm:hover {
    background: var(--color-border, #e5e7eb);
}

/* How it works */
.og-rewards-howto {
    background: var(--color-bg-alt, #f8f9fa);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 12px;
    padding: 20px;
}

.og-rewards-howto summary {
    cursor: pointer;
    user-select: none;
}

.og-rewards-howto-content {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text-muted, #6b7280);
}

.og-rewards-howto-content ul {
    margin: 8px 0;
    padding-left: 20px;
}

/* Checkout referral field */
.onigrow-referral-field {
    margin: 20px 0;
    padding: 16px;
    background: var(--color-bg-alt, #f8f9fa);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 8px;
}

.onigrow-referral-field h3 {
    margin: 0 0 10px 0;
    font-size: 15px;
}

.onigrow-referral-validation {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    font-weight: 600;
}

.onigrow-referral-info {
    margin-top: 8px;
}

.onigrow-referral-info small {
    color: var(--color-text-muted, #6b7280);
}

.onigrow-referral-info a {
    color: var(--color-primary, #e1306c);
}
