/**
 * Reb7awy Affiliate - Frontend Styles
 * 
 * @package Reb7awy_Affiliate
 */

:root {
    --primary: #800020;
    --primary-dark: #660019;
    --primary-light: #b3003b;
    --success: #4caf50;
    --warning: #ffc107;
    --danger: #f44336;
    --text-primary: #330010;
    --text-secondary: #666;
    --border-color: #ddd;
    --background: #f9f9f9;
    --white: #fff;
    --shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    --radius: 10px;
}

/* General Styles */
.reb7awy-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Registration Form */
.reb7awy-registration {
    max-width: 600px;
    margin: 40px auto;
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.reb7awy-registration h2 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 30px;
    font-size: 28px;
}

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

.reb7awy-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--text-primary);
}

.reb7awy-form-group input[type="text"],
.reb7awy-form-group input[type="email"],
.reb7awy-form-group input[type="tel"],
.reb7awy-form-group input[type="password"],
.reb7awy-form-group textarea,
.reb7awy-form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.reb7awy-form-group input:focus,
.reb7awy-form-group textarea:focus,
.reb7awy-form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.reb7awy-form-group small {
    display: block;
    margin-top: 5px;
    color: var(--text-secondary);
    font-size: 14px;
}

.reb7awy-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reb7awy-checkbox input[type="checkbox"] {
    width: auto;
}

.reb7awy-submit-btn {
    width: 100%;
    padding: 15px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reb7awy-submit-btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(128, 0, 32, 0.3);
}

/* Messages */
.reb7awy-message {
    padding: 15px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.reb7awy-message.success {
    background: #d4edda;
    border: 2px solid var(--success);
    color: #155724;
}

.reb7awy-message.error {
    background: #f8d7da;
    border: 2px solid var(--danger);
    color: #721c24;
}

.reb7awy-message.warning {
    background: #fff3cd;
    border: 2px solid var(--warning);
    color: #856404;
}

/* Commission Badge */
.reb7awy-commission-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--success) 0%, #45a049 100%);
    color: var(--white);
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 16px;
    margin: 10px 0;
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.3);
}

.reb7awy-commission-badge .amount {
    font-size: 20px;
}

/* Wallet Stats */
.reb7awy-wallet-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.reb7awy-stat-card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease;
}

.reb7awy-stat-card:hover {
    transform: translateY(-5px);
}

.reb7awy-stat-card .icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.reb7awy-stat-card .label {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 5px;
}

.reb7awy-stat-card .value {
    color: var(--primary);
    font-size: 24px;
    font-weight: 700;
}

/* Loading Spinner */
.reb7awy-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.reb7awy-spinner {
    border: 4px solid var(--background);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Tables */
.reb7awy-table-responsive {
    overflow-x: auto;
}

.reb7awy-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
}

.reb7awy-table th,
.reb7awy-table td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid var(--border-color);
}

.reb7awy-table th {
    background: var(--background);
    font-weight: 700;
    color: var(--primary);
}

.reb7awy-table tr:hover {
    background: var(--background);
}

/* Buttons */
.reb7awy-btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.reb7awy-btn-primary {
    background: var(--primary);
    color: var(--white);
}

.reb7awy-btn-primary:hover {
    background: var(--primary-light);
}

.reb7awy-btn-success {
    background: var(--success);
    color: var(--white);
}

.reb7awy-btn-success:hover {
    background: #45a049;
}

.reb7awy-btn-secondary {
    background: var(--text-secondary);
    color: var(--white);
}

.reb7awy-btn-secondary:hover {
    background: #555;
}

/* Responsive Design */
@media (max-width: 768px) {
    .reb7awy-registration {
        padding: 20px;
    }
    
    .reb7awy-wallet-stats {
        grid-template-columns: 1fr;
    }
    
    .reb7awy-table {
        font-size: 14px;
    }
    
    .reb7awy-table th,
    .reb7awy-table td {
        padding: 8px;
    }
}

/* RTL Support */
[dir="rtl"] .reb7awy-table th,
[dir="rtl"] .reb7awy-table td {
    text-align: right;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reb7awy-fade-in {
    animation: fadeIn 0.5s ease;
}
