/**
 * Dublin Silver Account - Critical CSS
 * Above-the-fold styles that load first
 * Version: 2.1.0
 */

/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
    --dsa-primary: #1e3a5f;
    --dsa-primary-light: #2d4a6f;
    --dsa-primary-dark: #152a45;
    --dsa-secondary: #d4af37;
    --dsa-secondary-light: #e6c858;
    --dsa-secondary-dark: #b8941f;
    --dsa-success: #10b981;
    --dsa-warning: #f59e0b;
    --dsa-danger: #ef4444;
    --dsa-info: #3b82f6;
    --dsa-text: #1f2937;
    --dsa-text-light: #6b7280;
    --dsa-text-muted: #9ca3af;
    --dsa-bg: #f9fafb;
    --dsa-white: #ffffff;
    --dsa-border: #e5e7eb;
    --dsa-border-light: #f3f4f6;
    --dsa-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --dsa-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --dsa-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --dsa-radius-sm: 6px;
    --dsa-radius: 10px;
    --dsa-radius-lg: 16px;
    --dsa-transition: all 0.2s ease;
    --dsa-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ==========================================================================
   Base Reset for Plugin
   ========================================================================== */
.dsa-dashboard,
.dsa-dashboard *,
.dsa-account-header,
.dsa-account-header *,
.woocommerce-MyAccount-navigation,
.woocommerce-MyAccount-content {
    box-sizing: border-box;
}

/* ==========================================================================
   Account Header
   ========================================================================== */
.dsa-account-header {
    background: linear-gradient(135deg, var(--dsa-primary) 0%, var(--dsa-primary-dark) 100%);
    padding: 24px 30px;
    margin-bottom: 30px;
    border-radius: var(--dsa-radius-lg);
}

.dsa-user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dsa-user-avatar img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--dsa-shadow);
}

.dsa-user-name {
    color: var(--dsa-white);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 4px 0;
    font-family: var(--dsa-font);
}

.dsa-user-email {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin: 0;
}

/* ==========================================================================
   WooCommerce Navigation Override
   ========================================================================== */
.woocommerce-MyAccount-navigation {
    background: var(--dsa-white);
    border-radius: var(--dsa-radius);
    box-shadow: var(--dsa-shadow);
    padding: 12px;
    margin-bottom: 24px;
}

.woocommerce-MyAccount-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.woocommerce-MyAccount-navigation ul li {
    margin: 0;
    padding: 0;
}

.woocommerce-MyAccount-navigation ul li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    color: var(--dsa-text);
    text-decoration: none;
    border-radius: var(--dsa-radius-sm);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--dsa-transition);
    font-family: var(--dsa-font);
}

.woocommerce-MyAccount-navigation ul li a:hover {
    background: var(--dsa-bg);
    color: var(--dsa-primary);
}

.woocommerce-MyAccount-navigation ul li.is-active a {
    background: var(--dsa-primary);
    color: var(--dsa-white);
}

/* ==========================================================================
   Dashboard Container
   ========================================================================== */
.dsa-dashboard {
    font-family: var(--dsa-font);
    color: var(--dsa-text);
    line-height: 1.6;
}

/* Welcome Card */
.dsa-welcome-card {
    background: linear-gradient(135deg, var(--dsa-primary) 0%, var(--dsa-primary-light) 100%);
    border-radius: var(--dsa-radius-lg);
    padding: 20px 24px;
    margin-bottom: 16px;
    color: var(--dsa-white);
}

.dsa-welcome-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 4px 0;
}

.dsa-welcome-subtitle {
    opacity: 0.9;
    margin: 0;
    font-size: 0.925rem;
}

/* ==========================================================================
   Stats Grid
   ========================================================================== */
.dsa-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.dsa-stat-card {
    background: var(--dsa-white);
    border-radius: var(--dsa-radius);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--dsa-shadow-sm);
    border: 1px solid var(--dsa-border-light);
    transition: var(--dsa-transition);
}

.dsa-stat-card:hover {
    box-shadow: var(--dsa-shadow);
    transform: translateY(-2px);
}

.dsa-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--dsa-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dsa-stat-icon svg {
    width: 24px;
    height: 24px;
}

.dsa-stat-orders {
    background: rgba(59, 130, 246, 0.1);
    color: var(--dsa-info);
}

.dsa-stat-processing {
    background: rgba(245, 158, 11, 0.1);
    color: var(--dsa-warning);
}

.dsa-stat-wishlist {
    background: rgba(239, 68, 68, 0.1);
    color: var(--dsa-danger);
}

.dsa-stat-spent {
    background: rgba(16, 185, 129, 0.1);
    color: var(--dsa-success);
}

.dsa-stat-content {
    display: flex;
    flex-direction: column;
}

.dsa-stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dsa-text);
    line-height: 1.2;
}

.dsa-stat-label {
    font-size: 0.85rem;
    color: var(--dsa-text-light);
}

/* ==========================================================================
   Section Cards
   ========================================================================== */
.dsa-section-card {
    background: var(--dsa-white);
    border-radius: var(--dsa-radius);
    padding: 24px;
    box-shadow: var(--dsa-shadow-sm);
    border: 1px solid var(--dsa-border-light);
    margin-bottom: 24px;
}

.dsa-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.dsa-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dsa-text);
    margin: 0;
}

.dsa-link {
    color: var(--dsa-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--dsa-transition);
}

.dsa-link:hover {
    color: var(--dsa-secondary);
}

/* ==========================================================================
   Quick Actions
   ========================================================================== */
.dsa-quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.dsa-quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 12px;
    background: var(--dsa-bg);
    border-radius: var(--dsa-radius-sm);
    text-decoration: none;
    color: var(--dsa-text);
    transition: var(--dsa-transition);
    text-align: center;
}

.dsa-quick-action:hover {
    background: var(--dsa-primary);
    color: var(--dsa-white);
}

.dsa-quick-action-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--dsa-white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--dsa-transition);
}

.dsa-quick-action:hover .dsa-quick-action-icon {
    background: var(--dsa-secondary);
}

.dsa-quick-action-icon svg {
    width: 18px;
    height: 18px;
}

.dsa-quick-action span {
    font-size: 0.85rem;
    font-weight: 500;
}

/* ==========================================================================
   Dashboard Grid
   ========================================================================== */
.dsa-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

/* ==========================================================================
   Loading State
   ========================================================================== */
.dsa-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--dsa-text-light);
}

.dsa-loading::after {
    content: '';
    width: 32px;
    height: 32px;
    border: 3px solid var(--dsa-border);
    border-top-color: var(--dsa-primary);
    border-radius: 50%;
    animation: dsa-spin 0.8s linear infinite;
}

@keyframes dsa-spin {
    to { transform: rotate(360deg); }
}
