/* Affiliate Public Registration Plugin Styles */

#affiliate-public-signup-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.affiliate-form-wrapper {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 40px;
    border: 1px solid #e5e7eb;
    position: relative;
    overflow: hidden;
}

.affiliate-form-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8, #7c3aed);
}

.affiliate-form-wrapper h3 {
    text-align: center;
    margin-bottom: 10px;
    color: #1f2937;
    font-size: 32px;
    font-weight: 700;
}

.subtitle {
    text-align: center;
    margin-bottom: 30px;
    color: #6b7280;
    font-size: 18px;
    font-weight: 400;
}

/* Progress Indicator */
.progress-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    gap: 20px;
}

.progress-step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    position: relative;
}

.progress-step.active {
    background: #3b82f6;
    color: white;
    transform: scale(1.1);
}

.progress-step.completed {
    background: #10b981;
    color: white;
}

.progress-step.completed::after {
    content: '✓';
    font-size: 14px;
}

/* Form Steps */
.form-step {
    animation: fadeInUp 0.5s ease;
}

.form-step h4 {
    color: #1f2937;
    margin-bottom: 25px;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Info Box */
.affiliate-info-box {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #93c5fd;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
}

.affiliate-info-box h5 {
    color: #1e40af;
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
}

.affiliate-info-box ul {
    margin: 15px 0;
    padding-left: 20px;
}

.affiliate-info-box li {
    margin-bottom: 10px;
    color: #374151;
    line-height: 1.6;
}

/* Form Layout */
.form-row {
    display: flex;
    flex-wrap: wrap;
    margin: -10px;
}

.form-group {
    margin-bottom: 25px;
    padding: 0 10px;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

@media (max-width: 768px) {
    .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 15px;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    background-color: #fff;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-control.info {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
}

.form-control.valid {
    border-color: #10b981;
    background-color: #f0fdf4;
}

.text-muted {
    color: #6b7280;
    font-size: 13px;
    margin-top: 5px;
    display: block;
    line-height: 1.4;
}

.text-success {
    color: #10b981;
    font-weight: 600;
}

.text-danger {
    color: #ef4444;
    font-weight: 600;
}

.text-warning {
    color: #f59e0b;
    font-weight: 600;
}

/* Calculation Example */
.affiliate-calculation-example {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0;
}

.affiliate-calculation-example h6 {
    color: #92400e;
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
}

.affiliate-calculation-example ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.affiliate-calculation-example li {
    margin-bottom: 8px;
    color: #78350f;
    font-weight: 500;
}

/* Terms and Conditions */
.terms-container {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 25px;
    margin: 30px 0;
}

.terms-container h5 {
    color: #374151;
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
}

.terms-content {
    max-height: 200px;
    overflow-y: auto;
    background: #fff;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
    cursor: pointer;
    transition: all 0.3s ease;
}

.terms-content:hover {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.terms-content.expanded {
    max-height: 500px;
}

.terms-content h6 {
    color: #1f2937;
    font-weight: 600;
    margin: 15px 0 10px 0;
}

.terms-content ul {
    margin: 10px 0;
    padding-left: 20px;
}

.terms-content li {
    margin-bottom: 8px;
    color: #4b5563;
}

.form-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
}

.form-check-input {
    margin: 4px 0 0 0;
    transform: scale(1.3);
    accent-color: #3b82f6;
}

.form-check-label {
    margin: 0;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
    color: #374151;
}

/* Navigation Buttons */
.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    gap: 15px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
    justify-content: center;
}

.btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: 2px solid transparent;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 2px solid #d1d5db;
}

.btn-secondary:hover:not(:disabled) {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: 2px solid transparent;
}

.btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 18px;
    min-width: 200px;
}

/* Alerts */
.alert {
    padding: 16px 20px;
    margin-bottom: 25px;
    border-radius: 8px;
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    color: #065f46;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 1px solid #10b981;
}

.alert-danger {
    color: #991b1b;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 1px solid #ef4444;
}

.alert i {
    font-size: 20px;
    margin-top: 2px;
}

.alert-content {
    flex: 1;
    line-height: 1.5;
}

.close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.close:hover {
    opacity: 1;
}

/* Success Info */
.affiliate-success-info {
    background: #41a09a;
    border: 2px solid #10b981;
    border-radius: 12px;
    padding: 30px;
    margin-top: 20px;
    text-align: center;
}

.affiliate-success-info h4 {
    color: #065f46;
    margin: 0 0 20px 0;
    font-size: 24px;
}

.success-details {
    margin-bottom: 25px;
}

.affiliate-code {
    background: #f3f4f6;
    padding: 8px 16px;
    border-radius: 6px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    color: #1d4ed8;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    border: 2px solid transparent;
}

.affiliate-code:hover {
    background: #e5e7eb;
    border-color: #3b82f6;
}

.affiliate-code.copied {
    background: #10b981;
    color: white;
    border-color: #059669;
}

.next-steps {
    background: #f8fafc;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    text-align: left;
}

.next-steps h5 {
    color: #374151;
    margin: 0 0 15px 0;
    font-size: 16px;
}

.next-steps ol {
    margin: 0;
    padding-left: 20px;
}

.next-steps li {
    margin-bottom: 8px;
    color: #4b5563;
    line-height: 1.5;
}

/* Animations */
.fa-spin {
    animation: fa-spin 2s infinite linear;
}

@keyframes fa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    #affiliate-public-signup-container {
        padding: 15px;
    }
    
    .affiliate-form-wrapper {
        padding: 25px;
    }
    
    .affiliate-form-wrapper h3 {
        font-size: 28px;
    }
    
    .form-row {
        margin: -5px;
    }
    
    .form-group {
        padding: 0 5px;
    }
    
    .form-navigation {
        flex-direction: column-reverse;
        gap: 10px;
    }
    
    .btn {
        width: 100%;
        min-width: unset;
    }
    
    .progress-indicator {
        gap: 15px;
    }
    
    .progress-step {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .terms-content {
        max-height: 150px;
    }
    
    .terms-content.expanded {
        max-height: 400px;
    }
}

@media (max-width: 480px) {
    .affiliate-form-wrapper {
        padding: 20px;
    }
    
    .affiliate-info-box, .affiliate-calculation-example, .terms-container {
        padding: 20px;
    }
    
    .form-control {
        font-size: 16px; /* Prevenir zoom en iOS */
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 15px;
    }
    
    .affiliate-success-info {
        padding: 25px;
    }
}