/**
 * Writers Dashboard - Main Styles
 * GeekyNG Media Enterprise
 */

/* CSS Variables */
:root {
    /* Primary Colors */
    --wd-primary: #FF6B35;
    --wd-primary-light: #FF8F66;
    --wd-primary-dark: #E55A28;
    
    /* Secondary Colors */
    --wd-secondary: #6366F1;
    --wd-secondary-light: #818CF8;
    --wd-secondary-dark: #4F46E5;
    
    /* Accent Colors */
    --wd-accent-green: #10B981;
    --wd-accent-yellow: #F59E0B;
    --wd-accent-red: #EF4444;
    --wd-accent-purple: #8B5CF6;
    --wd-accent-cyan: #06B6D4;
    
    /* Neutral Colors */
    --wd-white: #FFFFFF;
    --wd-gray-50: #F9FAFB;
    --wd-gray-100: #F3F4F6;
    --wd-gray-200: #E5E7EB;
    --wd-gray-300: #D1D5DB;
    --wd-gray-400: #9CA3AF;
    --wd-gray-500: #6B7280;
    --wd-gray-600: #4B5563;
    --wd-gray-700: #374151;
    --wd-gray-800: #1F2937;
    --wd-gray-900: #111827;
    --wd-black: #030712;
    
    /* Gradients */
    --wd-gradient-primary: linear-gradient(135deg, #FF6B35 0%, #F7931A 50%, #FFD700 100%);
    --wd-gradient-secondary: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #A855F7 100%);
    --wd-gradient-dark: linear-gradient(135deg, #1F2937 0%, #111827 100%);
    --wd-gradient-glow: linear-gradient(135deg, rgba(255, 107, 53, 0.2) 0%, rgba(99, 102, 241, 0.2) 100%);
    
    /* Typography */
    --wd-font-primary: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --wd-font-display: 'Poppins', sans-serif;
    
    /* Spacing */
    --wd-spacing-xs: 4px;
    --wd-spacing-sm: 8px;
    --wd-spacing-md: 16px;
    --wd-spacing-lg: 24px;
    --wd-spacing-xl: 32px;
    --wd-spacing-2xl: 48px;
    --wd-spacing-3xl: 64px;
    
    /* Borders */
    --wd-radius-sm: 8px;
    --wd-radius-md: 12px;
    --wd-radius-lg: 16px;
    --wd-radius-xl: 24px;
    --wd-radius-full: 9999px;
    
    /* Shadows */
    --wd-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --wd-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --wd-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --wd-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --wd-shadow-glow: 0 0 40px rgba(255, 107, 53, 0.15);
    
    /* Transitions */
    --wd-transition-fast: 150ms ease;
    --wd-transition-base: 250ms ease;
    --wd-transition-slow: 350ms ease;
    --wd-transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
}

.wd-dashboard-wrapper,
.wd-auth-wrapper {
    font-family: var(--wd-font-primary);
    line-height: 1.6;
    color: var(--wd-gray-800);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
.wd-title {
    font-family: var(--wd-font-display);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--wd-gray-900);
    margin: 0;
    letter-spacing: -0.02em;
}

.wd-title-gradient {
    background: var(--wd-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.wd-subtitle {
    font-size: 1rem;
    color: var(--wd-gray-500);
    margin: 0.5rem 0 0;
}

/* Buttons */
.wd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-family: var(--wd-font-primary);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: var(--wd-radius-md);
    cursor: pointer;
    transition: all var(--wd-transition-base);
    position: relative;
    overflow: hidden;
}

.wd-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.wd-btn:hover::before {
    left: 100%;
}

.wd-btn-primary {
    background: var(--wd-gradient-primary);
    color: var(--wd-white);
    box-shadow: 0 4px 14px rgba(255, 107, 53, 0.3);
}

.wd-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.wd-btn-secondary {
    background: var(--wd-gray-100);
    color: var(--wd-gray-700);
}

.wd-btn-secondary:hover {
    background: var(--wd-gray-200);
}

.wd-btn-outline {
    background: transparent;
    border: 2px solid var(--wd-gray-200);
    color: var(--wd-gray-700);
}

.wd-btn-outline:hover {
    border-color: var(--wd-primary);
    color: var(--wd-primary);
}

.wd-btn-full {
    width: 100%;
}

.wd-btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.wd-btn-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Forms */
.wd-input,
.wd-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    font-family: var(--wd-font-primary);
    font-size: 0.9375rem;
    color: var(--wd-gray-800);
    background: var(--wd-white);
    border: 2px solid var(--wd-gray-200);
    border-radius: var(--wd-radius-md);
    transition: all var(--wd-transition-base);
    outline: none;
}

.wd-input:focus,
.wd-textarea:focus {
    border-color: var(--wd-primary);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
}

.wd-input::placeholder,
.wd-textarea::placeholder {
    color: var(--wd-gray-400);
}

.wd-textarea {
    min-height: 150px;
    resize: vertical;
}

.wd-textarea-large {
    min-height: 250px;
}

.wd-input-group {
    margin-bottom: 1.25rem;
}

.wd-input-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--wd-gray-700);
    margin-bottom: 0.5rem;
}

.wd-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--wd-gray-700);
    margin-bottom: 0.5rem;
}

.wd-label svg {
    color: var(--wd-gray-400);
}

/* Checkbox */
.wd-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--wd-gray-600);
    user-select: none;
}

.wd-checkbox input {
    width: 18px;
    height: 18px;
    accent-color: var(--wd-primary);
    cursor: pointer;
}

.wd-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--wd-gray-50);
    border-radius: var(--wd-radius-md);
}

/* Form Utilities */
.wd-form-group {
    margin-bottom: 1.25rem;
}

.wd-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.wd-form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.wd-form-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--wd-gray-400);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.wd-form-divider::before,
.wd-form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--wd-gray-200);
}

.wd-form-divider span {
    padding: 0 1rem;
}

.wd-form-error {
    padding: 0.875rem 1rem;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: var(--wd-radius-md);
    color: #DC2626;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.wd-form-success {
    padding: 0.875rem 1rem;
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    border-radius: var(--wd-radius-md);
    color: #059669;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* Links */
.wd-link {
    color: var(--wd-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--wd-transition-fast);
}

.wd-link:hover {
    color: var(--wd-primary-dark);
    text-decoration: underline;
}

.wd-forgot-link {
    color: var(--wd-gray-500);
    font-size: 0.875rem;
    text-decoration: none;
}

.wd-forgot-link:hover {
    color: var(--wd-primary);
}

/* Loading & Spinners */
.wd-spinner {
    animation: wd-spin 1s linear infinite;
}

@keyframes wd-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.wd-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem;
    color: var(--wd-gray-500);
}

.wd-loading .wd-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--wd-gray-200);
    border-top-color: var(--wd-primary);
    border-radius: 50%;
}

/* Animation Classes */
[data-animate] {
    opacity: 0;
    transform: translateY(20px);
}

[data-animate="fade-up"].animated {
    animation: wd-fade-up 0.6s ease forwards;
}

[data-animate="zoom-in"].animated {
    animation: wd-zoom-in 0.5s ease forwards;
}

[data-animate="fade-left"].animated {
    animation: wd-fade-left 0.6s ease forwards;
}

@keyframes wd-fade-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes wd-zoom-in {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

/* Toast Notifications */
.wd-toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 10000;
    display: flex;
    flex-direction: column-reverse;
    gap: 0.75rem;
}

.wd-toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--wd-white);
    border-radius: var(--wd-radius-md);
    box-shadow: var(--wd-shadow-xl);
    font-size: 0.9375rem;
    animation: wd-toast-in 0.3s ease;
    max-width: 350px;
}

.wd-toast.wd-toast-out {
    animation: wd-toast-out 0.3s ease forwards;
}

.wd-toast-success {
    border-left: 4px solid var(--wd-accent-green);
}

.wd-toast-error {
    border-left: 4px solid var(--wd-accent-red);
}

.wd-toast-info {
    border-left: 4px solid var(--wd-secondary);
}

@keyframes wd-toast-in {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes wd-toast-out {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .wd-form-row {
        grid-template-columns: 1fr;
    }
    
    .wd-form-options {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .wd-btn-group {
        flex-direction: column;
    }
    
    .wd-btn-group .wd-btn {
        width: 100%;
    }
    
    .wd-toast-container {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
    
    .wd-toast {
        max-width: none;
    }
    
    .wd-input,
    .wd-textarea {
        font-size: 16px; /* Prevents iOS zoom on focus */
    }
    
    .wd-btn {
        padding: 0.875rem 1.25rem;
    }
    
    .wd-btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 0.9375rem;
    }
}

@media (max-width: 480px) {
    .wd-title {
        font-size: 1.5rem;
    }
    
    .wd-subtitle {
        font-size: 0.875rem;
    }
    
    .wd-input-group {
        margin-bottom: 1rem;
    }
    
    .wd-input,
    .wd-textarea {
        padding: 0.75rem;
    }
}

/* Ensure proper touch targets on mobile */
@media (pointer: coarse) {
    .wd-btn,
    .wd-checkbox,
    .wd-link {
        min-height: 44px;
    }
    
    .wd-checkbox input {
        width: 22px;
        height: 22px;
    }
}
