/* ========================================
   ENHANCED DARK THEME FOR MY ACCOUNT PAGE
   Includes both logged-in dashboard and logged-out forms
   ======================================== */

/* ========================================
   LOGGED-OUT FORMS DARK THEME
   ======================================== */

/* Dark theme for logged-out users (login/register forms) */
body:not(.logged-in).woocommerce-account.dark-theme {
    background: #0f0f23 !important;
    color: #e5e7eb;
}

body:not(.logged-in).woocommerce-account.dark-theme .site-main,
body:not(.logged-in).woocommerce-account.dark-theme #primary {
    background: #0f0f23 !important;
    min-height: 100vh;
}

body:not(.logged-in).woocommerce-account.dark-theme .woocommerce {
    background: transparent;
}

/* Enhanced Account Forms Container */
body:not(.logged-in).woocommerce-account.dark-theme .vccsell-account-forms {
    background: #1a1b3e;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.3);
    border: 1px solid #2a2b5e;
}

body:not(.logged-in).woocommerce-account.dark-theme .account-forms-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white !important;
}

body:not(.logged-in).woocommerce-account.dark-theme .account-forms-header h1 {
    color: white !important;
}

body:not(.logged-in).woocommerce-account.dark-theme .account-subtitle {
    color: rgba(255, 255, 255, 0.9) !important;
}

body:not(.logged-in).woocommerce-account.dark-theme .account-forms-container,
body:not(.logged-in).woocommerce-account.dark-theme .form-container {
    background: #1a1b3e;
}

/* Form Tabs Dark Theme */
body:not(.logged-in).woocommerce-account.dark-theme .form-tabs {
    background: #141536;
    border-bottom-color: #2a2b5e;
}

body:not(.logged-in).woocommerce-account.dark-theme .tab-button {
    color: #9ca3af;
    border-bottom-color: transparent;
}

body:not(.logged-in).woocommerce-account.dark-theme .tab-button.active {
    background: #1a1b3e;
    color: #8b5cf6 !important;
    border-bottom-color: #8b5cf6;
}

body:not(.logged-in).woocommerce-account.dark-theme .tab-button:hover:not(.active) {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6 !important;
}

/* Enhanced Button Dark Theme */
body:not(.logged-in).woocommerce-account.dark-theme .btn-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

body:not(.logged-in).woocommerce-account.dark-theme .btn-primary:hover {
    background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
    color: #ffffff !important;
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.5);
}

body:not(.logged-in).woocommerce-account.dark-theme .btn-secondary {
    background: #374151;
    color: #e5e7eb !important;
    border-color: #4b5563;
}

body:not(.logged-in).woocommerce-account.dark-theme .btn-secondary:hover {
    background: #4b5563;
    color: #f9fafb !important;
    border-color: #6b7280;
}

/* Enhanced Account Forms Container */
body:not(.logged-in).woocommerce-account.dark-theme .vccsell-account-forms {
    background: #1a1b3e;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.3);
    border: 1px solid #2a2b5e;
}

body:not(.logged-in).woocommerce-account.dark-theme .account-forms-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white !important;
}

body:not(.logged-in).woocommerce-account.dark-theme .account-forms-header h1 {
    color: white !important;
}

body:not(.logged-in).woocommerce-account.dark-theme .account-subtitle {
    color: rgba(255, 255, 255, 0.9) !important;
}

body:not(.logged-in).woocommerce-account.dark-theme .account-forms-container,
body:not(.logged-in).woocommerce-account.dark-theme .form-container {
    background: #1a1b3e;
}

/* Form Tabs Dark Theme */
body:not(.logged-in).woocommerce-account.dark-theme .form-tabs {
    background: #141536;
    border-bottom-color: #2a2b5e;
}

body:not(.logged-in).woocommerce-account.dark-theme .tab-button {
    color: #9ca3af;
    border-bottom-color: transparent;
}

body:not(.logged-in).woocommerce-account.dark-theme .tab-button.active {
    background: #1a1b3e;
    color: #8b5cf6 !important;
    border-bottom-color: #8b5cf6;
}

body:not(.logged-in).woocommerce-account.dark-theme .tab-button:hover:not(.active) {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6 !important;
}

/* Form Elements Dark Theme */
body:not(.logged-in).woocommerce-account.dark-theme .form-group label {
    color: #e5e7eb;
}

body:not(.logged-in).woocommerce-account.dark-theme .form-group .required {
    color: #f87171;
}

body:not(.logged-in).woocommerce-account.dark-theme .form-group input[type="text"],
body:not(.logged-in).woocommerce-account.dark-theme .form-group input[type="email"],
body:not(.logged-in).woocommerce-account.dark-theme .form-group input[type="password"] {
    background: #141536;
    color: #e5e7eb;
    border-color: #2a2b5e;
}

body:not(.logged-in).woocommerce-account.dark-theme .form-group input[type="text"]:focus,
body:not(.logged-in).woocommerce-account.dark-theme .form-group input[type="email"]:focus,
body:not(.logged-in).woocommerce-account.dark-theme .form-group input[type="password"]:focus {
    background: #1a1b3e;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

/* Checkbox Dark Theme */
body:not(.logged-in).woocommerce-account.dark-theme .checkbox-wrapper label {
    color: #9ca3af;
}

body:not(.logged-in).woocommerce-account.dark-theme .checkbox-wrapper label a {
    color: #8b5cf6;
}

/* Enhanced Button Dark Theme */
body:not(.logged-in).woocommerce-account.dark-theme .btn-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

body:not(.logged-in).woocommerce-account.dark-theme .btn-primary:hover {
    background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
    color: #ffffff !important;
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.5);
}

body:not(.logged-in).woocommerce-account.dark-theme .btn-secondary {
    background: #374151;
    color: #e5e7eb !important;
    border-color: #4b5563;
}

body:not(.logged-in).woocommerce-account.dark-theme .btn-secondary:hover {
    background: #4b5563;
    color: #f9fafb !important;
    border-color: #6b7280;
}

/* Form Switch and Links Dark Theme */
body:not(.logged-in).woocommerce-account.dark-theme .form-switch {
    color: #9ca3af;
    border-top-color: #2a2b5e;
}

body:not(.logged-in).woocommerce-account.dark-theme .form-switch button {
    color: #8b5cf6;
}

body:not(.logged-in).woocommerce-account.dark-theme .form-switch button:hover {
    color: #a78bfa;
}

body:not(.logged-in).woocommerce-account.dark-theme .forgot-password a {
    color: #8b5cf6;
}

/* Form Messages Dark Theme */
body:not(.logged-in).woocommerce-account.dark-theme .form-message.success {
    background: #064e3b;
    color: #a7f3d0;
    border-color: #047857;
}

body:not(.logged-in).woocommerce-account.dark-theme .form-message.error {
    background: #7f1d1d;
    color: #fca5a5;
    border-color: #b91c1c;
}

/* ========================================
   LOGGED-IN DASHBOARD DARK THEME
   ======================================== */

/* Dark theme for logged-in users (dashboard) */
body.logged-in.woocommerce-account.dark-theme {
    background: #0f0f23 !important;
    color: #e5e7eb;
}

body.logged-in.woocommerce-account.dark-theme .site-main,
body.logged-in.woocommerce-account.dark-theme #primary {
    background: #0f0f23 !important;
}

body.logged-in.woocommerce-account.dark-theme .woocommerce {
    background: transparent;
}

/* Enhanced Dashboard Header */
body.logged-in.woocommerce-account.dark-theme .dashboard-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white !important;
    box-shadow: 0 8px 30px rgba(79, 70, 229, 0.4);
}

body.logged-in.woocommerce-account.dark-theme .dashboard-header h1 {
    color: white !important;
}

body.logged-in.woocommerce-account.dark-theme .dashboard-subtitle {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Dashboard Stats Dark Theme */
body.logged-in.woocommerce-account.dark-theme .stat-item {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.3);
}

body.logged-in.woocommerce-account.dark-theme .stat-number {
    color: white !important;
}

body.logged-in.woocommerce-account.dark-theme .stat-label {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Dashboard Cards Dark Theme */
body.logged-in.woocommerce-account.dark-theme .dashboard-card {
    background: #1a1b3e;
    border-color: #2a2b5e;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.2);
}

body.logged-in.woocommerce-account.dark-theme .dashboard-card:hover {
    background: #1f2048;
    border-color: #3a3b6e;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

body.logged-in.woocommerce-account.dark-theme .dashboard-card h3 {
    color: #e5e7eb;
}

body.logged-in.woocommerce-account.dark-theme .dashboard-card h3 i {
    color: #8b5cf6;
}

/* Action Items Dark Theme */
body.logged-in.woocommerce-account.dark-theme .action-item {
    background: #1a1b3e;
    border-color: #2a2b5e;
    color: #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.logged-in.woocommerce-account.dark-theme .action-item:hover {
    background: #1f2048;
    border-color: #8b5cf6;
    color: #8b5cf6;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

body.logged-in.woocommerce-account.dark-theme .action-item i {
    color: #8b5cf6;
}

/* View All Links Dark Theme */
body.logged-in.woocommerce-account.dark-theme .view-all-link {
    color: #8b5cf6 !important;
}

body.logged-in.woocommerce-account.dark-theme .view-all-link:hover {
    color: #a78bfa !important;
}

/* Enhanced No Orders/Reviews States Dark Theme */
body.logged-in.woocommerce-account.dark-theme .no-orders,
body.logged-in.woocommerce-account.dark-theme .no-reviews {
    background: #1a1b3e;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.2);
    border: 1px solid #2a2b5e;
}

body.logged-in.woocommerce-account.dark-theme .no-orders-icon,
body.logged-in.woocommerce-account.dark-theme .no-reviews-icon {
    color: #4b5563;
}

body.logged-in.woocommerce-account.dark-theme .no-orders h3,
body.logged-in.woocommerce-account.dark-theme .no-reviews h3 {
    color: #e5e7eb;
}

body.logged-in.woocommerce-account.dark-theme .no-orders p,
body.logged-in.woocommerce-account.dark-theme .no-reviews p {
    color: #9ca3af;
}

/* WooCommerce No Orders Message Dark Theme */
body.logged-in.woocommerce-account.dark-theme .woocommerce-info,
body.logged-in.woocommerce-account.dark-theme .woocommerce-message,
body.logged-in.woocommerce-account.dark-theme .woocommerce-notice {
    background: #1a1b3e !important;
    border-color: #2a2b5e !important;
    color: #e5e7eb !important;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.2) !important;
}

body.logged-in.woocommerce-account.dark-theme .woocommerce-info .woocommerce-Button,
body.logged-in.woocommerce-account.dark-theme .woocommerce-message .woocommerce-Button,
body.logged-in.woocommerce-account.dark-theme .woocommerce-notice .woocommerce-Button {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%) !important;
    color: #ffffff !important;
}

body.logged-in.woocommerce-account.dark-theme .woocommerce-info .woocommerce-Button:hover,
body.logged-in.woocommerce-account.dark-theme .woocommerce-message .woocommerce-Button:hover,
body.logged-in.woocommerce-account.dark-theme .woocommerce-notice .woocommerce-Button:hover {
    background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.5) !important;
}

/* ========================================
   MY REVIEWS PAGE DARK THEME
   ======================================== */

body.woocommerce-account.dark-theme .vccsell-my-reviews {
    background: transparent;
}

body.woocommerce-account.dark-theme .reviews-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white !important;
    box-shadow: 0 8px 30px rgba(79, 70, 229, 0.4);
}

body.woocommerce-account.dark-theme .reviews-header h2 {
    color: white !important;
}

body.woocommerce-account.dark-theme .reviews-description {
    color: rgba(255, 255, 255, 0.9) !important;
}

body.woocommerce-account.dark-theme .reviews-stats .stat-item {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.3);
}

body.woocommerce-account.dark-theme .reviews-stats .stat-number {
    color: white !important;
}

body.woocommerce-account.dark-theme .reviews-stats .stat-label {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Review Items Dark Theme */
body.woocommerce-account.dark-theme .vccsell-my-reviews .review-item {
    background: #1a1b3e;
    border-color: #2a2b5e;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

body.woocommerce-account.dark-theme .vccsell-my-reviews .review-item:hover {
    background: #1f2048;
    border-color: #8b5cf6;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

body.woocommerce-account.dark-theme .review-type {
    background: #374151;
    color: #e5e7eb;
}

body.woocommerce-account.dark-theme .review-type i {
    color: #8b5cf6;
}

body.woocommerce-account.dark-theme .review-date {
    color: #9ca3af;
}

body.woocommerce-account.dark-theme .review-content h4 {
    color: #e5e7eb;
}

body.woocommerce-account.dark-theme .review-content h4 a {
    color: #e5e7eb;
}

body.woocommerce-account.dark-theme .review-content h4 a:hover {
    color: #8b5cf6;
}

body.woocommerce-account.dark-theme .review-text {
    color: #d1d5db;
}

body.woocommerce-account.dark-theme .review-footer {
    border-top-color: #2a2b5e;
}

body.woocommerce-account.dark-theme .view-review-link,
body.woocommerce-account.dark-theme .view-product-link {
    color: #8b5cf6;
}

body.woocommerce-account.dark-theme .view-review-link:hover,
body.woocommerce-account.dark-theme .view-product-link:hover {
    color: #a78bfa;
}

/* Review Status Dark Theme */
body.woocommerce-account.dark-theme .status-approved {
    background: #064e3b;
    color: #a7f3d0;
}

body.woocommerce-account.dark-theme .status-pending {
    background: #78350f;
    color: #fde68a;
}

body.woocommerce-account.dark-theme .status-spam {
    background: #7f1d1d;
    color: #fca5a5;
}

/* ========================================
   ACCOUNT DETAILS FORM DARK THEME
   ======================================== */

body.woocommerce-account.dark-theme .woocommerce-EditAccountForm {
    background: #1a1b3e;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    border-color: #2a2b5e;
}

body.woocommerce-account.dark-theme .woocommerce-EditAccountForm label {
    color: #e5e7eb;
}

body.woocommerce-account.dark-theme .woocommerce-EditAccountForm .required {
    color: #f87171;
}

body.woocommerce-account.dark-theme .woocommerce-EditAccountForm input[type="text"],
body.woocommerce-account.dark-theme .woocommerce-EditAccountForm input[type="email"],
body.woocommerce-account.dark-theme .woocommerce-EditAccountForm input[type="password"] {
    background: #141536;
    color: #e5e7eb;
    border-color: #2a2b5e;
}

body.woocommerce-account.dark-theme .woocommerce-EditAccountForm input[type="text"]:focus,
body.woocommerce-account.dark-theme .woocommerce-EditAccountForm input[type="email"]:focus,
body.woocommerce-account.dark-theme .woocommerce-EditAccountForm input[type="password"]:focus {
    background: #1a1b3e;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

body.woocommerce-account.dark-theme .woocommerce-EditAccountForm fieldset {
    background: #141536;
    border-color: #2a2b5e;
}

body.woocommerce-account.dark-theme .woocommerce-EditAccountForm legend {
    background: #1a1b3e;
    color: #e5e7eb;
}

body.woocommerce-account.dark-theme .woocommerce-EditAccountForm .woocommerce-Button {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%) !important;
    color: #ffffff !important;
}

body.woocommerce-account.dark-theme .woocommerce-EditAccountForm .woocommerce-Button:hover {
    background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.5) !important;
}

body.woocommerce-account.dark-theme .woocommerce-EditAccountForm #account_display_name_description {
    color: #9ca3af;
}

/* ========================================
   ACCOUNT DETAILS FORM DARK THEME ENHANCEMENT
   ======================================== */

body.woocommerce-account.dark-theme .woocommerce-EditAccountForm {
    background: #1a1b3e;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    border-color: #2a2b5e;
}

body.woocommerce-account.dark-theme .woocommerce-EditAccountForm label {
    color: #e5e7eb;
}

body.woocommerce-account.dark-theme .woocommerce-EditAccountForm .required {
    color: #f87171;
}

body.woocommerce-account.dark-theme .woocommerce-EditAccountForm input[type="text"],
body.woocommerce-account.dark-theme .woocommerce-EditAccountForm input[type="email"],
body.woocommerce-account.dark-theme .woocommerce-EditAccountForm input[type="password"] {
    background: #141536;
    color: #e5e7eb;
    border-color: #2a2b5e;
}

body.woocommerce-account.dark-theme .woocommerce-EditAccountForm input[type="text"]:focus,
body.woocommerce-account.dark-theme .woocommerce-EditAccountForm input[type="email"]:focus,
body.woocommerce-account.dark-theme .woocommerce-EditAccountForm input[type="password"]:focus {
    background: #1a1b3e;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

body.woocommerce-account.dark-theme .woocommerce-EditAccountForm fieldset {
    background: #141536;
    border-color: #2a2b5e;
}

body.woocommerce-account.dark-theme .woocommerce-EditAccountForm legend {
    background: #1a1b3e;
    color: #e5e7eb;
}

body.woocommerce-account.dark-theme .woocommerce-EditAccountForm .woocommerce-Button {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%) !important;
    color: #ffffff !important;
}

body.woocommerce-account.dark-theme .woocommerce-EditAccountForm .woocommerce-Button:hover {
    background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.5) !important;
}

body.woocommerce-account.dark-theme .woocommerce-EditAccountForm #account_display_name_description {
    color: #9ca3af;
}

/* WooCommerce No Orders Message Dark Theme Enhancement */
body.woocommerce-account.dark-theme .woocommerce-info,
body.woocommerce-account.dark-theme .woocommerce-message,
body.woocommerce-account.dark-theme .woocommerce-notice {
    background: #1a1b3e !important;
    border-color: #2a2b5e !important;
    color: #e5e7eb !important;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.2) !important;
}

body.woocommerce-account.dark-theme .woocommerce-info .woocommerce-Button,
body.woocommerce-account.dark-theme .woocommerce-message .woocommerce-Button,
body.woocommerce-account.dark-theme .woocommerce-notice .woocommerce-Button {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%) !important;
    color: #ffffff !important;
}

body.woocommerce-account.dark-theme .woocommerce-info .woocommerce-Button:hover,
body.woocommerce-account.dark-theme .woocommerce-message .woocommerce-Button:hover,
body.woocommerce-account.dark-theme .woocommerce-notice .woocommerce-Button:hover {
    background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.5) !important;
}

/* ========================================
   NAVIGATION MENU DARK THEME
   ======================================== */

body.woocommerce-account.dark-theme .woocommerce-MyAccount-navigation {
    background: #1a1b3e;
    border: 1px solid #2a2b5e;
    border-radius: 16px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.2);
}

body.woocommerce-account.dark-theme .woocommerce-MyAccount-navigation ul {
    background: transparent;
}

body.woocommerce-account.dark-theme .woocommerce-MyAccount-navigation li {
    border-bottom-color: #2a2b5e;
}

body.woocommerce-account.dark-theme .woocommerce-MyAccount-navigation a {
    color: #d1d5db;
    padding: 1rem 1.5rem;
}

body.woocommerce-account.dark-theme .woocommerce-MyAccount-navigation a:hover,
body.woocommerce-account.dark-theme .woocommerce-MyAccount-navigation .is-active a {
    background: #8b5cf6;
    color: white;
}

body.woocommerce-account.dark-theme .woocommerce-MyAccount-content {
    background: transparent;
}

/* ========================================
   GLOBAL DARK THEME ELEMENTS
   ======================================== */

/* All buttons with blue/purple backgrounds get white text */
body.dark-theme .btn-primary,
body.dark-theme .woocommerce-Button[style*="background"],
body.dark-theme .button[style*="background"],
body.dark-theme .btn[style*="667eea"],
body.dark-theme .btn[style*="4f46e5"] {
    color: #ffffff !important;
}

/* Ensure all text in blue/purple gradient backgrounds is white */
body.dark-theme [style*="linear-gradient"][style*="667eea"],
body.dark-theme [style*="linear-gradient"][style*="4f46e5"],
body.dark-theme [style*="linear-gradient"][style*="764ba2"],
body.dark-theme [style*="linear-gradient"][style*="7c3aed"] {
    color: white !important;
}

/* ========================================
   RESPONSIVE DARK THEME
   ======================================== */

@media (max-width: 768px) {
    body.dark-theme .vccsell-account-forms,
    body.dark-theme .woocommerce-EditAccountForm {
        background: #1a1b3e;
        border-color: #2a2b5e;
    }
    
    body.dark-theme .form-container,
    body.dark-theme .woocommerce-EditAccountForm {
        background: #1a1b3e;
    }
    
    body.dark-theme .dashboard-card {
        background: #1a1b3e;
        border-color: #2a2b5e;
    }
}