/* Referral Generator Styles */
.ars-referral-generator {
    max-width: 500px;
    margin: 20px auto;
    padding: 20px;
}

.ars-generator-form {
    background-color: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.ars-form-fields {
    margin-bottom: 20px;
}

.ars-field {
    margin-bottom: 15px;
}

.ars-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.ars-field label .required {
    color: #dc3545;
}

.ars-field input[type="email"],
.ars-field input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.ars-field input[type="email"]:focus,
.ars-field input[type="text"]:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.ars-generate-btn {
    width: 100%;
    background-color: #0073aa;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.ars-generate-btn:hover:not(:disabled) {
    background-color: #005a87;
}

.ars-generate-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.ars-result {
    margin-top: 20px;
    padding: 20px;
    background-color: #f0f8ff;
    border-radius: 8px;
    border: 1px solid #0073aa;
}

.ars-success-message {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
}

.ars-code-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
}

.ars-code {
    font-size: 24px;
    font-weight: bold;
    color: #0073aa;
    padding: 10px 20px;
    background-color: white;
    border: 2px solid #0073aa;
    border-radius: 4px;
    letter-spacing: 2px;
}

.ars-copy-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.ars-copy-btn:hover {
    background-color: #218838;
}

.ars-share-text {
    color: #666;
    font-style: italic;
    margin-top: 10px;
}

.ars-email-note {
    color: #0073aa;
    font-size: 14px;
    margin-top: 5px;
}

.ars-error {
    color: #dc3545;
    margin-top: 10px;
    padding: 10px;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
}

/* WooCommerce Checkout Field */
#ars-referral-field {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

#ars-referral-field label {
    font-weight: bold;
}

.ars-icon {
    margin-right: 5px;
}

.ars-checkout-field input {
    position: relative;
    padding-right: 40px;
}

.ars-validation-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
}

.ars-valid-icon {
    color: #28a745;
}

.ars-invalid-icon {
    color: #dc3545;
}

.form-row.ars-valid input {
    border-color: #28a745 !important;
    background-color: #f0fff0 !important;
}

.form-row.ars-invalid input {
    border-color: #dc3545 !important;
    background-color: #fff0f0 !important;
}

/* Leaderboard Styles */
.ars-leaderboard {
    margin: 20px 0;
}

.ars-leaderboard h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.ars-leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ars-leaderboard-table th {
    background-color: #0073aa;
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: bold;
}

.ars-leaderboard-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e0e0e0;
}

.ars-leaderboard-table tr:hover {
    background-color: #f5f5f5;
}

.ars-rank {
    font-weight: bold;
    color: #0073aa;
}

.ars-leaderboard-table tr:nth-child(1) .ars-rank {
    color: #ffd700;
    font-size: 18px;
}

.ars-leaderboard-table tr:nth-child(2) .ars-rank {
    color: #c0c0c0;
    font-size: 16px;
}

.ars-leaderboard-table tr:nth-child(3) .ars-rank {
    color: #cd7f32;
    font-size: 16px;
}

/* Public Stats */
.ars-public-stats {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.ars-stat {
    background-color: #f8f9fa;
    padding: 15px 20px;
    border-radius: 4px;
    border-left: 4px solid #0073aa;
}

.ars-stat-label {
    display: block;
    color: #666;
    font-size: 14px;
    margin-bottom: 5px;
}

.ars-stat-value {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #0073aa;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ars-code-display {
        flex-direction: column;
    }
    
    .ars-public-stats {
        flex-direction: column;
    }
    
    .ars-leaderboard-table {
        font-size: 14px;
    }
}
