/* Custom Styles for Affiliate Website */

:root {
    --primary-color: #f97316;
    --primary-dark: #ea580c;
    --secondary-color: #dc2626;
    --accent-color: #fed7aa;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --bg-light: #fef7ed;
    --border-color: #fed7aa;
}

/* Body and Typography */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
}

/* Custom animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

/* Custom button styles */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transition: all 0.3s ease;
    transform: scale(1);
}

.btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 25px rgba(249, 115, 22, 0.3);
}

.btn-secondary {
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

/* Form enhancements */
.form-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.form-radio {
    appearance: none;
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-radio:checked {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
}

.form-radio:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background-color: white;
}

.form-checkbox {
    appearance: none;
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.25rem;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-checkbox:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Loading spinner */
.loading-spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    animation: spin 1s linear infinite;
}

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

/* Card styles */
.card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1), 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Status badges */
.badge-success {
    background: #dcfce7;
    color: #166534;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Table styles */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    background: #f9fafb;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
}

.table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    color: #6b7280;
}

.table tr:hover {
    background: #f9fafb;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .mobile-stack {
        flex-direction: column;
    }

    .mobile-full {
        width: 100%;
    }

    .mobile-center {
        text-align: center;
    }
}

/* Utility classes */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-soft {
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.border-soft {
    border: 1px solid #f3f4f6;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        background: white !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #e5e7eb !important;
    }
}

/* Focus states for accessibility - disabled to prevent layout shifts */
/*
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
*/

/* Prevent browser default validation styling */
input:invalid,
select:invalid,
textarea:invalid {
    box-shadow: none !important;
    border-color: #d1d5db !important; /* Keep default gray border */
}

input:valid,
select:valid,
textarea:valid {
    box-shadow: none !important;
}

/* Error message transitions */
.opacity-0 {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.opacity-100 {
    opacity: 1;
    transition: opacity 0.2s ease;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000000;
        --secondary-color: #000000;
        --text-primary: #000000;
        --text-secondary: #333333;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
