/**
 * FabricLab Customers Module - Extra Styles
 * Order statuses, animations, responsive fixes
 * @version 1.1.0
 */

/* ==========================================================================
   Gray Background for My Account Page (like checkout)
   ========================================================================== */
.woocommerce-account .entry-content,
.woocommerce-account .page-content,
.woocommerce-account .site-content,
.woocommerce-account article.page {
    background: #f9fafb !important;
    padding: 32px 24px !important;
    margin: 0 !important;
}

.woocommerce-account .page-inner {
    background: #f9fafb !important;
}

/* Ensure proper max-width and centering */
.woocommerce-account .woocommerce {
    max-width: 1200px;
    margin: 0 auto;
}

/* ==========================================================================
   Order Status Badges
   ========================================================================== */
.fl-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    white-space: nowrap;
}

.fl-status-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Completed */
.fl-status-completed {
    background: #dcfce7;
    color: #166534;
}
.fl-status-completed::before {
    background: #22c55e;
}

/* Processing */
.fl-status-processing {
    background: #fef3c7;
    color: #92400e;
}
.fl-status-processing::before {
    background: #f59e0b;
}

/* On-hold */
.fl-status-on-hold {
    background: #e0e7ff;
    color: #3730a3;
}
.fl-status-on-hold::before {
    background: #6366f1;
}

/* Pending */
.fl-status-pending {
    background: #fef3c7;
    color: #92400e;
}
.fl-status-pending::before {
    background: #f59e0b;
}

/* Cancelled */
.fl-status-cancelled {
    background: #fee2e2;
    color: #991b1b;
}
.fl-status-cancelled::before {
    background: #ef4444;
}

/* Failed */
.fl-status-failed {
    background: #fee2e2;
    color: #991b1b;
}
.fl-status-failed::before {
    background: #ef4444;
}

/* Refunded */
.fl-status-refunded {
    background: #f3f4f6;
    color: #4b5563;
}
.fl-status-refunded::before {
    background: #9ca3af;
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes fl-fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fl-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.fl-collection-item {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.fl-collection-item.fl-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Spinner */
.fl-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: fl-spin 0.8s linear infinite;
}

.fl-btn-loading {
    position: relative;
    pointer-events: none;
}

/* ==========================================================================
   Password Toggle
   ========================================================================== */
.fl-password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--fl-text-muted);
    transition: color 0.2s;
}

.fl-password-toggle:hover {
    color: var(--fl-primary);
}

.fl-password-toggle svg {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   Empty States
   ========================================================================== */
.fl-empty-orders {
    text-align: center;
    padding: 40px 20px;
    background: var(--fl-bg);
    border-radius: var(--fl-radius);
}

.fl-empty-orders p {
    color: var(--fl-text-muted);
    margin: 0 0 16px 0;
}

.fl-login-required {
    text-align: center;
    padding: 40px 20px;
    background: #fef3c7;
    border-radius: var(--fl-radius);
    color: #92400e;
}

/* ==========================================================================
   WooCommerce Overrides - Show navigation on all pages
   ========================================================================== */
.woocommerce-account .woocommerce-MyAccount-navigation {
    display: block !important;
}

.woocommerce-account .woocommerce-MyAccount-content {
    width: 100%;
    padding: 0;
}

/* ==========================================================================
   PrivBox Integration
   ========================================================================== */
.fl-privbox-section {
    margin-bottom: 32px;
}

.fl-privbox-section > * {
    border-radius: var(--fl-radius) !important;
}

/* ==========================================================================
   Responsive Fixes
   ========================================================================== */
@media (max-width: 480px) {
    .fl-login-card {
        padding: 24px 20px;
    }
    
    .fl-login-title {
        font-size: 20px;
    }
    
    .fl-welcome-title {
        font-size: 22px;
    }
    
    .fl-stat-card {
        padding: 16px;
    }
    
    .fl-stat-number {
        font-size: 24px;
    }
    
    .fl-tile {
        padding: 16px;
    }
    
    .fl-tile-icon {
        width: 36px;
        height: 36px;
    }
    
    .fl-collection-info {
        padding: 10px;
    }
    
    .fl-collection-name {
        font-size: 12px;
    }
    
    .woocommerce-account .entry-content,
    .woocommerce-account .page-content {
        padding: 20px 16px !important;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
    .fl-tile-logout,
    .fl-collection-btn {
        display: none;
    }
}
