/**
 * Wellness Center - WooCommerce Integration Styles
 * Ensures seamless integration with WooCommerce My Account page
 */

/* WooCommerce My Account wrapper overrides */
.woocommerce-account .woocommerce-MyAccount-content {
    padding: 0;
}

/* Scope all wellness content within WooCommerce My Account */
.woocommerce-MyAccount-content .wellness-container {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    min-height: auto !important;
    box-shadow: none !important;
}

/* Reset WooCommerce conflicting styles */
.woocommerce-MyAccount-content .wellness-container * {
    box-sizing: border-box;
}

/* Inherit WooCommerce typography */
.woocommerce-MyAccount-content .wellness-container {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: #515151;
}

/* Override WooCommerce link styles for wellness navigation */
.woocommerce-MyAccount-content .wellness-nav-link {
    color: #515151;
    text-decoration: none;
}

.woocommerce-MyAccount-content .wellness-nav-link:hover {
    color: #cd5928;
}

.woocommerce-MyAccount-content .wellness-nav-link.active {
    color: #cd5928;
}

/* Ensure proper spacing within WooCommerce context */
.woocommerce-MyAccount-content .wellness-header {
    margin-bottom: 1.5rem;
}

.woocommerce-MyAccount-content .wellness-nav {
    margin-bottom: 1.5rem;
}

/* WooCommerce-compatible card styling */
.woocommerce-MyAccount-content .wellness-card,
.woocommerce-MyAccount-content .wellness-stat-card,
.woocommerce-MyAccount-content .wellness-quick-action,
.woocommerce-MyAccount-content .wellness-activity,
.woocommerce-MyAccount-content .wellness-upcoming-classes,
.woocommerce-MyAccount-content .wellness-member-status {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Adjust section spacing for My Account context */
.woocommerce-MyAccount-content .wellness-mb-4 {
    margin-bottom: 1.5rem !important;
}

.woocommerce-MyAccount-content .wellness-mb-5 {
    margin-bottom: 2rem !important;
}

/* WooCommerce button compatibility */
.woocommerce-MyAccount-content .wellness-btn-primary {
    background: #cd5928;
    background: linear-gradient(135deg, #cd5928 0%, #8c181b 100%);
}

.woocommerce-MyAccount-content .wellness-btn-primary:hover {
    background: #8c181b;
}

/* Success/Error colors matching WooCommerce */
.woocommerce-MyAccount-content .wellness-btn-success,
.woocommerce-MyAccount-content .wellness-stat-icon.success,
.woocommerce-MyAccount-content .wellness-notification.success {
    background: #7ad03a;
}

.woocommerce-MyAccount-content .wellness-notification.error,
.woocommerce-MyAccount-content .toast-error {
    border-left-color: #e2401c;
}

/* Ensure loader covers only wellness content */
.woocommerce-MyAccount-content .wellness-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
}

/* Fix for WooCommerce grid conflicts */
.woocommerce-MyAccount-content .wellness-stats-grid,
.woocommerce-MyAccount-content .wellness-quick-actions {
    display: grid !important;
}

/* Ensure modals appear above WooCommerce elements */
.woocommerce-MyAccount-content .modal {
    z-index: 99999;
}

.woocommerce-MyAccount-content .modal-backdrop {
    z-index: 99998;
}

/* Toast notifications positioning for My Account */
.woocommerce-MyAccount-content .toast {
    position: fixed;
    z-index: 100000;
}

/* Responsive adjustments within WooCommerce */
@media (max-width: 768px) {
    .woocommerce-MyAccount-content .wellness-header {
        padding: 1rem;
        border-radius: 4px;
    }
    
    .woocommerce-MyAccount-content .wellness-nav {
        padding: 0.5rem;
    }
    
    .woocommerce-MyAccount-content .wellness-stat-card,
    .woocommerce-MyAccount-content .wellness-quick-action {
        padding: 1rem;
    }
}

/* Dark mode support within WooCommerce */
@media (prefers-color-scheme: dark) {
    .woocommerce-MyAccount-content .wellness-container {
        color: inherit;
    }
}

/* Print styles - hide within WooCommerce printout */
@media print {
    .woocommerce-MyAccount-content .wellness-nav,
    .woocommerce-MyAccount-content .wellness-loader {
        display: none !important;
    }
}

