/**
 * Writers Dashboard - Authentication Styles
 * Login, Signup, and Pending Approval pages
 */

/* Auth Wrapper */
.wd-auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 50%, #E2E8F0 100%);
    position: relative;
    overflow: hidden;
}

/* Background Decorations */
.wd-auth-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.wd-auth-bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
}

.wd-auth-bg-shape:nth-child(1) {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931A 100%);
    top: -200px;
    right: -100px;
    animation: wd-float 15s ease-in-out infinite;
}

.wd-auth-bg-shape:nth-child(2) {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    bottom: -150px;
    left: -100px;
    animation: wd-float 18s ease-in-out infinite reverse;
}

.wd-auth-bg-shape:nth-child(3) {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #10B981 0%, #06B6D4 100%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: wd-pulse 10s ease-in-out infinite;
}

@keyframes wd-float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(20px, -20px) rotate(5deg); }
    50% { transform: translate(-10px, 10px) rotate(-3deg); }
    75% { transform: translate(15px, 15px) rotate(3deg); }
}

@keyframes wd-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.3; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.5; }
}

/* Auth Container */
.wd-auth-container {
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 1;
}

.wd-auth-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--wd-radius-xl);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    animation: wd-slide-up 0.6s ease;
}

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

/* Decorative top border */
.wd-auth-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--wd-gradient-primary);
}

/* Auth Header */
.wd-auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.wd-auth-logo {
    margin-bottom: 1.5rem;
}

.wd-auth-logo-icon {
    width: 70px;
    height: 70px;
    background: var(--wd-gradient-primary);
    border-radius: var(--wd-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.25);
    animation: wd-bounce-in 0.8s ease;
}

@keyframes wd-bounce-in {
    0% { transform: scale(0); }
    50% { transform: scale(1.1); }
    70% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

.wd-auth-logo-icon svg {
    width: 36px;
    height: 36px;
    color: white;
}

.wd-auth-header h1 {
    font-family: var(--wd-font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--wd-gray-900);
    margin: 0 0 0.5rem;
}

.wd-auth-header p {
    color: var(--wd-gray-500);
    margin: 0;
    font-size: 0.9375rem;
}

/* Auth Form */
.wd-auth-form {
    margin-bottom: 1.5rem;
}

/* Input with icon */
.wd-input-icon {
    position: relative;
}

.wd-input-icon svg {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--wd-gray-400);
    transition: color var(--wd-transition-fast);
    pointer-events: none;
}

.wd-input-icon .wd-input {
    padding-left: 2.75rem;
}

.wd-input-icon:focus-within svg {
    color: var(--wd-primary);
}

/* Password toggle */
.wd-password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: var(--wd-gray-400);
    transition: color var(--wd-transition-fast);
}

.wd-password-toggle:hover {
    color: var(--wd-gray-600);
}

.wd-password-toggle svg {
    width: 18px;
    height: 18px;
}

/* Password strength meter */
.wd-password-strength {
    margin-top: 0.5rem;
}

.wd-password-strength-bar {
    height: 4px;
    background: var(--wd-gray-200);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.wd-password-strength-fill {
    height: 100%;
    width: 0;
    transition: all var(--wd-transition-base);
    border-radius: 2px;
}

.wd-password-strength[data-strength="weak"] .wd-password-strength-fill {
    width: 25%;
    background: var(--wd-accent-red);
}

.wd-password-strength[data-strength="fair"] .wd-password-strength-fill {
    width: 50%;
    background: var(--wd-accent-yellow);
}

.wd-password-strength[data-strength="good"] .wd-password-strength-fill {
    width: 75%;
    background: var(--wd-accent-cyan);
}

.wd-password-strength[data-strength="strong"] .wd-password-strength-fill {
    width: 100%;
    background: var(--wd-accent-green);
}

.wd-password-strength-text {
    font-size: 0.75rem;
    color: var(--wd-gray-500);
}

/* Remember me checkbox */
.wd-remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

/* Social login */
.wd-social-login {
    display: flex;
    gap: 0.75rem;
}

.wd-social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--wd-white);
    border: 2px solid var(--wd-gray-200);
    border-radius: var(--wd-radius-md);
    font-family: var(--wd-font-primary);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--wd-gray-700);
    cursor: pointer;
    transition: all var(--wd-transition-fast);
}

.wd-social-btn:hover {
    border-color: var(--wd-gray-300);
    background: var(--wd-gray-50);
}

.wd-social-btn svg {
    width: 20px;
    height: 20px;
}

/* Auth footer */
.wd-auth-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--wd-gray-200);
    color: var(--wd-gray-600);
    font-size: 0.9375rem;
}

/* Signup extras */
.wd-signup-terms {
    margin-bottom: 1.5rem;
}

.wd-signup-terms .wd-checkbox {
    font-size: 0.8125rem;
    line-height: 1.4;
}

/* Pending approval page */
.wd-pending-wrapper {
    text-align: center;
}

.wd-pending-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    animation: wd-pending-pulse 2s ease-in-out infinite;
}

@keyframes wd-pending-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(245, 158, 11, 0); }
}

.wd-pending-icon svg {
    width: 50px;
    height: 50px;
    color: #D97706;
}

.wd-pending-content h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--wd-gray-900);
    margin: 0 0 0.75rem;
}

.wd-pending-content p {
    color: var(--wd-gray-600);
    margin: 0 0 1.5rem;
    line-height: 1.6;
}

/* Pending timeline */
.wd-pending-timeline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 2rem 0;
    padding: 0 1rem;
}

.wd-timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.wd-timeline-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 18px;
    left: calc(50% + 22px);
    width: calc(100% - 10px);
    height: 2px;
    background: var(--wd-gray-200);
}

.wd-timeline-step.completed:not(:last-child)::after {
    background: var(--wd-accent-green);
}

.wd-timeline-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--wd-gray-200);
    color: var(--wd-gray-500);
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.wd-timeline-step.completed .wd-timeline-icon {
    background: var(--wd-accent-green);
    color: white;
}

.wd-timeline-step.current .wd-timeline-icon {
    background: var(--wd-accent-yellow);
    color: white;
    animation: wd-pending-pulse 2s ease-in-out infinite;
}

.wd-timeline-icon svg {
    width: 18px;
    height: 18px;
}

.wd-timeline-label {
    font-size: 0.75rem;
    color: var(--wd-gray-500);
    max-width: 80px;
}

.wd-timeline-step.completed .wd-timeline-label {
    color: var(--wd-accent-green);
}

.wd-timeline-step.current .wd-timeline-label {
    color: var(--wd-accent-yellow);
    font-weight: 600;
}

/* Writer info preview */
.wd-writer-preview {
    background: var(--wd-gray-50);
    border-radius: var(--wd-radius-md);
    padding: 1rem;
    margin: 1.5rem 0;
    text-align: left;
}

.wd-writer-preview-item {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.wd-writer-preview-item:last-child {
    margin-bottom: 0;
}

.wd-writer-preview-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--wd-gray-400);
    min-width: 80px;
}

.wd-writer-preview-value {
    font-size: 0.875rem;
    color: var(--wd-gray-700);
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .wd-auth-wrapper {
        padding: 1rem 0.75rem;
        align-items: flex-start;
        padding-top: 1.5rem;
    }
    
    .wd-auth-container {
        max-width: 100%;
    }
    
    .wd-auth-box {
        padding: 1.75rem 1.25rem;
        border-radius: var(--wd-radius-lg);
    }
    
    .wd-auth-logo-icon {
        width: 60px;
        height: 60px;
    }
    
    .wd-auth-logo-icon svg {
        width: 30px;
        height: 30px;
    }
    
    .wd-auth-header h1 {
        font-size: 1.5rem;
    }
    
    .wd-auth-header p {
        font-size: 0.875rem;
    }
    
    .wd-social-login {
        flex-direction: column;
    }
    
    .wd-pending-timeline {
        flex-direction: column;
        gap: 0;
    }
    
    .wd-timeline-step:not(:last-child)::after {
        top: auto;
        left: 17px;
        width: 2px;
        height: 30px;
        bottom: -30px;
    }
    
    .wd-timeline-step {
        flex-direction: row;
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .wd-timeline-step:last-child {
        margin-bottom: 0;
    }
    
    .wd-timeline-icon {
        margin-bottom: 0;
    }
    
    .wd-timeline-label {
        max-width: none;
        text-align: left;
    }
}

/* Decorative elements on auth pages */
.wd-auth-decor {
    position: absolute;
    pointer-events: none;
}

.wd-auth-decor-dots {
    position: absolute;
    right: -40px;
    bottom: -40px;
    width: 120px;
    height: 120px;
    background-image: radial-gradient(var(--wd-gray-300) 1.5px, transparent 1.5px);
    background-size: 12px 12px;
    opacity: 0.5;
}

.wd-auth-decor-circle {
    position: absolute;
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    border: 2px dashed var(--wd-gray-200);
    border-radius: 50%;
    animation: wd-rotate 20s linear infinite;
}

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

/* Form Messages */
.wd-form-error {
    background: #fef2f2 !important;
    border: 1px solid #fecaca !important;
    color: #dc2626 !important;
    padding: 12px 16px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    margin-bottom: 16px !important;
}

.wd-form-success {
    background: #ecfdf5 !important;
    border: 1px solid #a7f3d0 !important;
    color: #059669 !important;
    padding: 12px 16px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    margin-bottom: 16px !important;
}

/* Spinner animation */
.wd-spinner {
    animation: wdSpin 1s linear infinite !important;
}

@keyframes wdSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Button loader state */
.wd-btn-loader {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.wd-btn-loader svg {
    stroke: currentColor !important;
}

/* ═══════════════════════════════════════════════════════════════
   AUTH CARD STYLES - Ensuring consistency with main styles
   ═══════════════════════════════════════════════════════════════ */
.wd-auth-card {
    background: #fff !important;
    border-radius: 20px !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08) !important;
    padding: 40px !important;
    position: relative !important;
    overflow: hidden !important;
}

.wd-auth-card::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 4px !important;
    background: linear-gradient(90deg, #f59e0b, #f97316) !important;
}

.wd-auth-title {
    font-size: 28px !important;
    font-weight: 800 !important;
    color: #1f2937 !important;
    margin: 0 0 8px !important;
    text-align: center !important;
}

.wd-title-gradient {
    background: linear-gradient(135deg, #f59e0b, #f97316) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

.wd-auth-subtitle {
    color: #6b7280 !important;
    font-size: 15px !important;
    margin: 0 0 28px !important;
    text-align: center !important;
}

/* Form Elements */
.wd-form-group {
    margin-bottom: 20px !important;
}

.wd-form-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 16px !important;
    margin-bottom: 20px !important;
}

.wd-form-row .wd-form-group {
    margin-bottom: 0 !important;
}

.wd-label {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    margin-bottom: 8px !important;
}

.wd-label svg {
    color: #9ca3af !important;
}

.wd-input,
.wd-textarea {
    width: 100% !important;
    padding: 14px 16px !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    font-family: inherit !important;
    background: #fff !important;
    color: #1f2937 !important;
    transition: all 0.2s ease !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.wd-input:focus,
.wd-textarea:focus {
    outline: none !important;
    border-color: #f59e0b !important;
    box-shadow: 0 0 0 4px rgba(245,158,11,0.15) !important;
}

.wd-textarea {
    min-height: 100px !important;
    resize: vertical !important;
}

.wd-password-wrap {
    position: relative !important;
}

.wd-toggle-password {
    position: absolute !important;
    right: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: none !important;
    border: none !important;
    padding: 4px !important;
    cursor: pointer !important;
    color: #9ca3af !important;
}

.wd-toggle-password:hover {
    color: #6b7280 !important;
}

/* Form Options */
.wd-form-options {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 20px !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
}

.wd-checkbox {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    color: #4b5563 !important;
}

.wd-checkbox input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    accent-color: #f59e0b !important;
}

.wd-forgot-link {
    font-size: 14px !important;
    color: #f59e0b !important;
    font-weight: 500 !important;
}

.wd-forgot-link:hover {
    color: #d97706 !important;
}

/* Divider */
.wd-form-divider {
    display: flex !important;
    align-items: center !important;
    margin: 24px 0 !important;
}

.wd-form-divider::before,
.wd-form-divider::after {
    content: '' !important;
    flex: 1 !important;
    height: 1px !important;
    background: #e5e7eb !important;
}

.wd-form-divider span {
    padding: 0 16px !important;
    font-size: 13px !important;
    color: #9ca3af !important;
    font-weight: 500 !important;
}

/* Buttons */
.wd-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 14px 24px !important;
    border: none !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.wd-btn-primary {
    background: linear-gradient(135deg, #f59e0b, #f97316) !important;
    color: #fff !important;
}

.wd-btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(249,115,22,0.35) !important;
}

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

.wd-btn-lg {
    padding: 16px 28px !important;
    font-size: 16px !important;
}

/* Notice */
.wd-approval-notice {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    background: #fffbeb !important;
    border: 1px solid #fcd34d !important;
    border-radius: 10px !important;
    padding: 12px 16px !important;
    margin-top: 16px !important;
    font-size: 13px !important;
    color: #92400e !important;
}

/* Footer */
.wd-auth-footer {
    text-align: center !important;
    padding-top: 24px !important;
    margin-top: 24px !important;
    border-top: 1px solid #e5e7eb !important;
}

.wd-auth-footer p {
    font-size: 14px !important;
    color: #6b7280 !important;
    margin: 0 !important;
}

.wd-link {
    color: #f59e0b !important;
    font-weight: 600 !important;
}

.wd-link:hover {
    color: #d97706 !important;
}

/* Features section */
.wd-auth-features {
    margin-top: 32px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
}

.wd-feature {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    background: rgba(255,255,255,0.8) !important;
    backdrop-filter: blur(10px) !important;
    padding: 16px 20px !important;
    border-radius: 14px !important;
    border: 1px solid rgba(0,0,0,0.05) !important;
}

.wd-feature-icon {
    font-size: 28px !important;
}

.wd-feature h4 {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    margin: 0 0 2px !important;
}

.wd-feature p {
    font-size: 13px !important;
    color: #6b7280 !important;
    margin: 0 !important;
}

/* Decoration circles */
.wd-auth-decoration {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    pointer-events: none !important;
    overflow: hidden !important;
}

.wd-decoration-circle {
    position: absolute !important;
    border-radius: 50% !important;
    opacity: 0.4 !important;
    filter: blur(60px) !important;
}

.wd-circle-1 {
    width: 300px !important;
    height: 300px !important;
    background: #f59e0b !important;
    top: -100px !important;
    right: -100px !important;
}

.wd-circle-2 {
    width: 200px !important;
    height: 200px !important;
    background: #f97316 !important;
    bottom: -50px !important;
    left: -50px !important;
}

.wd-circle-3 {
    width: 150px !important;
    height: 150px !important;
    background: #10b981 !important;
    top: 50% !important;
    left: 30% !important;
}

/* ═══════════════════════════════════════════════════════════════
   AUTH MOBILE RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .wd-auth-container {
        max-width: 100% !important;
        padding: 0 !important;
    }
    
    .wd-auth-card {
        padding: 28px 20px !important;
        border-radius: 16px !important;
        margin: 0 !important;
    }
    
    .wd-auth-title {
        font-size: 24px !important;
    }
    
    .wd-auth-subtitle {
        font-size: 14px !important;
    }
    
    .wd-form-row {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }
    
    .wd-form-row .wd-form-group {
        margin-bottom: 20px !important;
    }
    
    .wd-input,
    .wd-textarea {
        padding: 12px 14px !important;
        font-size: 16px !important; /* Prevents iOS zoom */
    }
    
    .wd-btn-lg {
        padding: 14px 24px !important;
        font-size: 15px !important;
    }
    
    .wd-auth-features {
        margin-top: 24px !important;
        gap: 12px !important;
    }
    
    .wd-feature {
        padding: 14px 16px !important;
    }
    
    .wd-feature-icon {
        font-size: 24px !important;
    }
    
    .wd-feature h4 {
        font-size: 14px !important;
    }
    
    .wd-feature p {
        font-size: 12px !important;
    }
}

@media (max-width: 480px) {
    .wd-auth-wrapper {
        padding: 12px !important;
    }
    
    .wd-auth-card {
        padding: 24px 16px !important;
    }
    
    .wd-auth-title {
        font-size: 22px !important;
    }
    
    .wd-label {
        font-size: 13px !important;
    }
    
    .wd-form-options {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    
    .wd-approval-notice {
        flex-direction: column !important;
        text-align: center !important;
    }
    
    .wd-feature {
        flex-direction: column !important;
        text-align: center !important;
    }
}
