/* SUPPLYR Affiliate Registration Styles */

.supplyr-affiliate-registration {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.registration-header {
    text-align: center;
    margin-bottom: 30px;
}

.registration-header h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 2.2em;
    font-weight: 600;
}

.affiliate-benefits {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #007cba;
}

.affiliate-benefits h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.4em;
}

.affiliate-benefits ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.affiliate-benefits li {
    padding: 8px 0;
    color: #555;
    font-size: 1.1em;
}

.sponsor-info {
    background: #e8f5e8;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #4caf50;
}

.sponsor-notice {
    margin: 0;
    color: #2e7d32;
    font-weight: 500;
}

.affiliate-registration-form {
    background: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e5e9;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.9em;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-group label {
    margin-bottom: 0;
    font-weight: normal;
    line-height: 1.5;
    cursor: pointer;
}

.checkbox-group a {
    color: #007cba;
    text-decoration: underline;
}

.form-submit {
    text-align: center;
    margin-top: 30px;
}

.submit-btn {
    background: linear-gradient(135deg, #007cba, #005a87);
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #005a87, #007cba);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 124, 186, 0.3);
}

.login-link {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

.login-link a {
    color: #007cba;
    text-decoration: none;
    font-weight: 500;
}

.login-link a:hover {
    text-decoration: underline;
}

/* Messages */
.message {
    padding: 12px 20px;
    margin: 15px 0;
    border-radius: 6px;
    font-weight: 500;
}

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

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

.message-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Affiliate Dashboard */
.affiliate-dashboard {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.affiliate-dashboard h2 {
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 2em;
}

.affiliate-info {
    display: grid;
    gap: 30px;
    margin-bottom: 30px;
}

.affiliate-url {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #007cba;
}

.affiliate-url h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.url-display {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.url-display code {
    background: white;
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid #ddd;
    font-size: 1.1em;
    flex: 1;
    min-width: 250px;
}

.copy-url {
    background: #007cba;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
}

.copy-url:hover {
    background: #005a87;
}

.affiliate-stats h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.stat-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e5e9;
}

.stat-number {
    display: block;
    font-size: 2em;
    font-weight: bold;
    color: #007cba;
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.affiliate-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background: #007cba;
    color: white;
}

.btn-primary:hover {
    background: #005a87;
    color: white;
}

.btn-secondary {
    background: white;
    color: #007cba;
    border: 2px solid #007cba;
}

.btn-secondary:hover {
    background: #007cba;
    color: white;
}

/* Upgrade Form */
.upgrade-to-affiliate {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
}

.upgrade-to-affiliate h2 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.current-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin: 20px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .supplyr-affiliate-registration {
        padding: 10px;
    }
    
    .affiliate-registration-form {
        padding: 20px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-row .form-group {
        margin-bottom: 20px;
    }
    
    .url-display {
        flex-direction: column;
    }
    
    .url-display code {
        min-width: auto;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .affiliate-actions {
        flex-direction: column;
    }
    
    .btn {
        text-align: center;
    }
}

/* Username Availability Check */
.username-availability-wrapper {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.username-availability-wrapper input {
    flex: 1;
}

.username-availability-wrapper button {
    white-space: nowrap;
    padding: 8px 16px;
    font-size: 14px;
}

.availability-result {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 4px;
    font-weight: 500;
    min-height: 20px;
}

.availability-result.available {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.availability-result.unavailable {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.availability-result.checking {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

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

#check-availability.checking {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 600px) {
    .username-availability-wrapper {
        flex-direction: column;
        gap: 8px;
    }
    
    .username-availability-wrapper button {
        align-self: flex-start;
    }
}
