/**
 * WrickX My Account Custom Styling
 * Handles: Header/Footer white text + Modern Orders/Account Details redesign
 */

/* ============================================
   1️⃣ HEADER & FOOTER WHITE TEXT (My Account Pages Only)
   ============================================ */

/* Target only My Account pages */
.woocommerce-account .site-header,
.woocommerce-account .ast-header-break-point .site-header {
    /* Header navigation links */
}

.woocommerce-account .site-header .main-header-menu a,
.woocommerce-account .site-header .main-navigation a,
.woocommerce-account .site-header .ast-masthead-custom-menu-items a,
.woocommerce-account .ast-header-break-point .main-header-menu a,
.woocommerce-account .ast-header-break-point .main-navigation a {
    color: #ffffff !important;
}

/* Header icons - search, cart, wishlist, mobile menu */
.woocommerce-account .site-header .ast-search-icon,
.woocommerce-account .site-header .astra-search-icon,
.woocommerce-account .site-header .ast-icon,
.woocommerce-account .site-header svg,
.woocommerce-account .site-header .ast-cart-menu-wrap,
.woocommerce-account .site-header .ast-cart-menu-wrap .count,
.woocommerce-account .site-header .ast-mobile-menu-buttons,
.woocommerce-account .ast-header-break-point .ast-mobile-menu-buttons button,
.woocommerce-account .ast-header-break-point .menu-toggle {
    color: #ffffff !important;
    fill: #ffffff !important;
}

/* Cart count badge */
.woocommerce-account .site-header .ast-cart-menu-wrap .count,
.woocommerce-account .site-header .header-main-layout-2 .ast-cart-menu-wrap .count {
    background-color: #e74c3c !important;
    color: #ffffff !important;
}

/* Hover states for header links */
.woocommerce-account .site-header .main-header-menu a:hover,
.woocommerce-account .site-header .main-navigation a:hover {
    color: #f1f1f1 !important;
    opacity: 0.8;
}

/* Mobile menu toggle */
.woocommerce-account .ast-header-break-point .main-header-bar-navigation .menu-item > a {
    color: #ffffff !important;
}

/* Search icon and button */
.woocommerce-account .site-header .ast-search-menu-icon,
.woocommerce-account .site-header button.search-submit {
    color: #ffffff !important;
}

/* Footer text - white */
.woocommerce-account .site-footer,
.woocommerce-account .ast-small-footer {
    color: #ffffff !important;
}

.woocommerce-account .site-footer a,
.woocommerce-account .ast-small-footer a,
.woocommerce-account .site-footer .widget-title,
.woocommerce-account .site-footer p,
.woocommerce-account .ast-small-footer p {
    color: #ffffff !important;
}

.woocommerce-account .site-footer a:hover,
.woocommerce-account .ast-small-footer a:hover {
    color: #f1f1f1 !important;
    opacity: 0.9;
}

/* Mobile responsive adjustments */
@media (max-width: 921px) {
    .woocommerce-account .ast-header-break-point .ast-mobile-menu-buttons button,
    .woocommerce-account .ast-header-break-point .ast-button-wrap .menu-toggle {
        color: #ffffff !important;
    }
    
    .woocommerce-account .ast-header-break-point .ast-mobile-menu-buttons .ast-mobile-menu-toggle {
        border-color: #ffffff !important;
    }
}


/* ============================================
   2️⃣ MODERN ORDERS PAGE REDESIGN
   ============================================ */

.woocommerce-account .woocommerce-orders-table {
    background: transparent;
    border: none;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    margin-bottom: 30px;
}

/* Table header */
.woocommerce-account .woocommerce-orders-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px 10px 0 0;
}

.woocommerce-account .woocommerce-orders-table thead th {
    padding: 18px 20px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ffffff;
    border: none;
    text-align: left;
}

.woocommerce-account .woocommerce-orders-table thead th:first-child {
    border-radius: 10px 0 0 0;
}

.woocommerce-account .woocommerce-orders-table thead th:last-child {
    border-radius: 0 10px 0 0;
    text-align: center;
}

/* Table body - card style rows */
.woocommerce-account .woocommerce-orders-table tbody tr {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.woocommerce-account .woocommerce-orders-table tbody tr:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.woocommerce-account .woocommerce-orders-table tbody td {
    padding: 20px;
    vertical-align: middle;
    border: none;
    border-bottom: 1px solid #f5f5f5;
    font-size: 14px;
    color: #333;
}

/* Order number styling */
.woocommerce-account .woocommerce-orders-table .woocommerce-orders-table__cell-order-number a {
    font-weight: 700;
    color: #667eea;
    text-decoration: none;
    font-size: 15px;
    transition: color 0.3s ease;
}

.woocommerce-account .woocommerce-orders-table .woocommerce-orders-table__cell-order-number a:hover {
    color: #764ba2;
}

/* Order date */
.woocommerce-account .woocommerce-orders-table .woocommerce-orders-table__cell-order-date {
    color: #666;
    font-size: 13px;
}

/* Status badges */
.woocommerce-account .woocommerce-orders-table .woocommerce-orders-table__cell-order-status {
    font-weight: 600;
    text-transform: capitalize;
}

.woocommerce-account .woocommerce-orders-table mark {
    background: none;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

/* Status colors */
.woocommerce-account .woocommerce-orders-table mark.order-status-pending {
    background: #FFA500;
    color: #ffffff;
}

.woocommerce-account .woocommerce-orders-table mark.order-status-processing {
    background: #3498db;
    color: #ffffff;
}

.woocommerce-account .woocommerce-orders-table mark.order-status-on-hold {
    background: #f39c12;
    color: #ffffff;
}

.woocommerce-account .woocommerce-orders-table mark.order-status-completed {
    background: #27ae60;
    color: #ffffff;
}

.woocommerce-account .woocommerce-orders-table mark.order-status-cancelled {
    background: #e74c3c;
    color: #ffffff;
}

.woocommerce-account .woocommerce-orders-table mark.order-status-refunded {
    background: #95a5a6;
    color: #ffffff;
}

.woocommerce-account .woocommerce-orders-table mark.order-status-failed {
    background: #c0392b;
    color: #ffffff;
}

/* Order total */
.woocommerce-account .woocommerce-orders-table .woocommerce-orders-table__cell-order-total {
    font-weight: 700;
    color: #2c3e50;
    font-size: 15px;
}

/* Action buttons container */
.woocommerce-account .woocommerce-orders-table .woocommerce-orders-table__cell-order-actions {
    text-align: center;
}

/* Modern button styling */
.woocommerce-account .woocommerce-orders-table .woocommerce-button {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    margin: 3px;
    text-decoration: none;
}

/* View button */
.woocommerce-account .woocommerce-orders-table .woocommerce-button.view,
.woocommerce-account .woocommerce-orders-table .button.view {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.woocommerce-account .woocommerce-orders-table .woocommerce-button.view:hover,
.woocommerce-account .woocommerce-orders-table .button.view:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Pay button */
.woocommerce-account .woocommerce-orders-table .woocommerce-button.pay,
.woocommerce-account .woocommerce-orders-table .button.pay {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

.woocommerce-account .woocommerce-orders-table .woocommerce-button.pay:hover,
.woocommerce-account .woocommerce-orders-table .button.pay:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4);
}

/* Cancel button */
.woocommerce-account .woocommerce-orders-table .woocommerce-button.cancel,
.woocommerce-account .woocommerce-orders-table .button.cancel {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.woocommerce-account .woocommerce-orders-table .woocommerce-button.cancel:hover,
.woocommerce-account .woocommerce-orders-table .button.cancel:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

/* Mobile responsive - Orders table */
@media (max-width: 768px) {
    .woocommerce-account .woocommerce-orders-table thead {
        display: none;
    }
    
    .woocommerce-account .woocommerce-orders-table tbody tr {
        display: block;
        margin-bottom: 20px;
        border-radius: 10px;
        padding: 15px;
    }
    
    .woocommerce-account .woocommerce-orders-table tbody td {
        display: block;
        text-align: left;
        padding: 10px 0;
        border: none;
    }
    
    .woocommerce-account .woocommerce-orders-table tbody td::before {
        content: attr(data-title);
        font-weight: 700;
        display: block;
        margin-bottom: 5px;
        color: #667eea;
        font-size: 12px;
        text-transform: uppercase;
    }
    
    .woocommerce-account .woocommerce-orders-table .woocommerce-orders-table__cell-order-actions {
        text-align: left;
    }
    
    .woocommerce-account .woocommerce-orders-table .woocommerce-button {
        display: block;
        width: 100%;
        margin: 8px 0;
        padding: 14px 20px;
    }
}


/* ============================================
   3️⃣ MODERN ACCOUNT DETAILS PAGE REDESIGN
   ============================================ */

/* Account details form container */
.woocommerce-account .woocommerce-EditAccountForm {
    background: #ffffff;
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    max-width: 800px;
}

/* Form row spacing */
.woocommerce-account .woocommerce-EditAccountForm p,
.woocommerce-account .woocommerce-EditAccountForm .form-row {
    margin-bottom: 25px;
}

/* Labels */
.woocommerce-account .woocommerce-EditAccountForm label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    display: block;
    font-size: 14px;
}

.woocommerce-account .woocommerce-EditAccountForm label .required {
    color: #e74c3c;
    font-weight: 700;
}

/* Input fields */
.woocommerce-account .woocommerce-EditAccountForm input[type="text"],
.woocommerce-account .woocommerce-EditAccountForm input[type="email"],
.woocommerce-account .woocommerce-EditAccountForm input[type="password"],
.woocommerce-account .woocommerce-EditAccountForm input[type="tel"],
.woocommerce-account .woocommerce-EditAccountForm select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background: #ffffff;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.woocommerce-account .woocommerce-EditAccountForm input[type="text"]:focus,
.woocommerce-account .woocommerce-EditAccountForm input[type="email"]:focus,
.woocommerce-account .woocommerce-EditAccountForm input[type="password"]:focus,
.woocommerce-account .woocommerce-EditAccountForm input[type="tel"]:focus,
.woocommerce-account .woocommerce-EditAccountForm select:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Phone field with country code */
.woocommerce-account .woocommerce-EditAccountForm .form-row-first,
.woocommerce-account .woocommerce-EditAccountForm .form-row-last {
    width: 48%;
    float: left;
    clear: none;
}

.woocommerce-account .woocommerce-EditAccountForm .form-row-first {
    margin-right: 4%;
}

.woocommerce-account .woocommerce-EditAccountForm .form-row-wide {
    width: 100%;
    clear: both;
}

/* Display name field */
.woocommerce-account .woocommerce-EditAccountForm .woocommerce-form-row--wide {
    clear: both;
}

/* Password fields section */
.woocommerce-account .woocommerce-EditAccountForm fieldset {
    border: 2px dashed #e8e8e8;
    border-radius: 10px;
    padding: 25px;
    margin-top: 30px;
    background: #f9f9f9;
}

.woocommerce-account .woocommerce-EditAccountForm fieldset legend {
    font-weight: 700;
    color: #667eea;
    font-size: 16px;
    padding: 0 10px;
    background: #ffffff;
}

/* Save changes button */
.woocommerce-account .woocommerce-EditAccountForm button[type="submit"],
.woocommerce-account .woocommerce-EditAccountForm input[type="submit"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 15px 40px;
    border-radius: 8px;
    border: none;
    font-weight: 700;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    margin-top: 20px;
}

.woocommerce-account .woocommerce-EditAccountForm button[type="submit"]:hover,
.woocommerce-account .woocommerce-EditAccountForm input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Clear floats */
.woocommerce-account .woocommerce-EditAccountForm::after {
    content: "";
    display: table;
    clear: both;
}

/* Mobile responsive - Account Details */
@media (max-width: 768px) {
    .woocommerce-account .woocommerce-EditAccountForm {
        padding: 25px 20px;
    }
    
    .woocommerce-account .woocommerce-EditAccountForm .form-row-first,
    .woocommerce-account .woocommerce-EditAccountForm .form-row-last {
        width: 100%;
        margin-right: 0;
        float: none;
    }
    
    .woocommerce-account .woocommerce-EditAccountForm button[type="submit"],
    .woocommerce-account .woocommerce-EditAccountForm input[type="submit"] {
        width: 100%;
        padding: 16px 30px;
    }
    
    .woocommerce-account .woocommerce-EditAccountForm fieldset {
        padding: 20px 15px;
    }
}

/* Additional polish */
.woocommerce-account .woocommerce-EditAccountForm .woocommerce-form-row {
    margin-bottom: 20px;
}

.woocommerce-account .woocommerce-EditAccountForm .show-password-input {
    margin-top: 10px;
}

/* Success/error messages styling */
.woocommerce-account .woocommerce-message,
.woocommerce-account .woocommerce-error,
.woocommerce-account .woocommerce-info {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 4px solid;
}

.woocommerce-account .woocommerce-message {
    background: #d4edda;
    border-color: #27ae60;
    color: #155724;
}

.woocommerce-account .woocommerce-error {
    background: #f8d7da;
    border-color: #e74c3c;
    color: #721c24;
}

.woocommerce-account .woocommerce-info {
    background: #d1ecf1;
    border-color: #3498db;
    color: #0c5460;
}






/* ============================================================
   FIX: Header & Footer text/icon colors on My Account page
   Targets ElementKit (Elementor) header + Astra footer builder
   ONLY applies to .woocommerce-account body class
   ============================================================ */

/* --- ELEMENTOR / ELEMENTKIT HEADER --- */

/* Force white on all text inside the Elementor header template */
body.woocommerce-account #ast-desktop-header *,
body.woocommerce-account #ast-desktop-header a,
body.woocommerce-account #ast-desktop-header a:visited,
body.woocommerce-account .elementor-location-header *,
body.woocommerce-account .elementor-location-header a,
body.woocommerce-account .elementor-location-header a:visited {
    color: #ffffff !important;
}

/* ElementKit nav links - desktop */
body.woocommerce-account .elementor-location-header .elementskit-navbar-nav > li > a,
body.woocommerce-account .elementor-location-header .ekit-menu-nav-link,
body.woocommerce-account .elementor-location-header .elementskit-navbar-nav li a {
    color: #ffffff !important;
}

/* Dropdown indicator arrows */
body.woocommerce-account .elementor-location-header .elementskit-submenu-indicator,
body.woocommerce-account .elementor-location-header .elementskit-submenu-indicator i,
body.woocommerce-account .elementor-location-header .elementskit-submenu-indicator svg {
    color: #ffffff !important;
    fill: #ffffff !important;
}

/* Submenu / dropdown panel */
body.woocommerce-account .elementor-location-header .elementskit-submenu-panel,
body.woocommerce-account .elementor-location-header .elementskit-submenu-panel li a {
    background-color: #000000 !important;
    color: #ffffff !important;
}

/* SVG icons in header (search, cart, wishlist, etc.) */
body.woocommerce-account .elementor-location-header svg,
body.woocommerce-account .elementor-location-header svg path,
body.woocommerce-account .elementor-location-header svg circle,
body.woocommerce-account .elementor-location-header svg rect {
    fill: #ffffff !important;
    color: #ffffff !important;
}

/* Search input placeholder and text */
body.woocommerce-account .elementor-location-header input[type="search"],
body.woocommerce-account .elementor-location-header .dgwt-wcas-search-wrapp input {
    color: #333333 !important; /* Keep search input text dark for readability */
}

/* Mobile menu toggle button */
body.woocommerce-account .elementor-location-header .elementskit-menu-hamburger,
body.woocommerce-account .elementor-location-header .elementskit-menu-hamburger span,
body.woocommerce-account .elementor-location-header button.menu-toggle {
    color: #ffffff !important;
    border-color: #ffffff !important;
}
body.woocommerce-account .elementor-location-header .elementskit-menu-hamburger span {
    background-color: #ffffff !important;
}

/* --- ASTRA FOOTER BUILDER --- */

body.woocommerce-account #ast-footer-overlay *,
body.woocommerce-account .ast-footer-overlay *,
body.woocommerce-account footer.site-footer *,
body.woocommerce-account footer.site-footer a,
body.woocommerce-account footer.site-footer a:visited,
body.woocommerce-account .ast-small-footer *,
body.woocommerce-account .ast-small-footer a {
    color: #ffffff !important;
}

/* Footer SVG icons */
body.woocommerce-account footer.site-footer svg,
body.woocommerce-account footer.site-footer svg path {
    fill: #ffffff !important;
}

/* Hover states */
body.woocommerce-account .elementor-location-header a:hover,
body.woocommerce-account footer.site-footer a:hover,
body.woocommerce-account .ast-small-footer a:hover {
    color: rgba(255, 255, 255, 0.8) !important;
    opacity: 1 !important; /* override any opacity conflicts */
}

/* --- MOBILE BREAKPOINT --- */
@media (max-width: 1024px) {
    body.woocommerce-account .elementor-location-header .elementskit-menu-offcanvas-elements,
    body.woocommerce-account .elementor-location-header .elementskit-menu-offcanvas-elements * {
        background-color: #000000 !important;
        color: #ffffff !important;
    }
    body.woocommerce-account .elementor-location-header .elementskit-mobile-builder-content a,
    body.woocommerce-account .elementor-location-header .elementskit-mobile-builder-content li a {
        color: #ffffff !important;
    }
}