/**
 * WooCommerce My Account - Modern UI/UX Redesign
 *
 * Extends the WK Moto Finder design system to WooCommerce My Account pages.
 * Mobile-first approach with UIkit-aligned breakpoints.
 *
 * IMPORTANT: This file only affects My Account pages, NOT Flux Checkout.
 * Loaded with priority 999 to override theme styles.
 *
 * NOTE on !important usage (HOCH-04):
 * This stylesheet serves as a theme override for YOOtheme Pro which has
 * very high specificity selectors. The !important declarations are
 * necessary to ensure our styles take precedence. Where possible, we use
 * CSS custom properties from the design system for maintainability.
 * Future refactoring should explore scoped styles or CSS layers (@layer).
 *
 * @package WK_Moto_Finder
 */

/* Design System Variables for My Account */
:root {
    --wk-account-nav-width: 250px;
    --wk-account-nav-width-mobile: 100%;
    --wk-account-gap: 24px;
    --wk-account-radius: 12px;
    --wk-account-border: #e5e5e5;
    --wk-account-bg: #fff;
    --wk-account-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   Page Layout - Override YOOtheme Grid
   ========================================================================== */

body.woocommerce-account .woocommerce {
    display: grid !important;
    grid-template-columns: var(--wk-account-nav-width) minmax(0, 1fr) !important;
    gap: var(--wk-account-gap) !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    align-items: start !important;
    box-sizing: border-box !important;
}

/* ==========================================================================
   Navigation Sidebar
   ========================================================================== */

body.woocommerce-account .woocommerce-MyAccount-navigation {
    background: var(--wk-account-bg) !important;
    border-radius: var(--wk-account-radius) !important;
    border: 1px solid var(--wk-account-border) !important;
    box-shadow: var(--wk-account-shadow) !important;
    overflow: hidden !important;
    position: sticky !important;
    top: var(--wk-account-gap) !important;
    width: 100% !important;
    min-width: 200px !important;
}

body.woocommerce-account .woocommerce-MyAccount-navigation::before,
body.woocommerce-account .woocommerce-MyAccount-navigation::after {
    display: none !important;
    content: none !important;
}

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

body.woocommerce-account .woocommerce-MyAccount-navigation ul li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul li a,
body.woocommerce-account .woocommerce-MyAccount-navigation ul li a:link,
body.woocommerce-account .woocommerce-MyAccount-navigation ul li a:visited {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 5px 8px !important;
    color: #404040 !important;
    text-decoration: none !important;
    border-bottom: 1px solid #f5f5f5 !important;
    transition: all 0.2s ease !important;
    min-height: 44px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    background: transparent !important;
    width: auto !important;
    max-width: none !important;
    overflow: visible !important;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul li:last-child a {
    border-bottom: none !important;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
    background: #fafafa !important;
    color: #0277b8 !important;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a,
body.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a:link,
body.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a:visited {
    background: rgba(3, 153, 236, 0.1) !important;
    color: #0277b8 !important;
    font-weight: 600 !important;
    border-left: 3px solid #0277b8 !important;
    padding-left: 17px !important;
}

/* ==========================================================================
   Navigation Icons
   ========================================================================== */

body.woocommerce-account .woocommerce-MyAccount-navigation ul li a::before {
    content: '' !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    background-size: 20px 20px !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
}

/* Dashboard */
body.woocommerce-account .woocommerce-MyAccount-navigation-link--dashboard a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23404040' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7'/%3E%3Crect x='14' y='3' width='7' height='7'/%3E%3Crect x='14' y='14' width='7' height='7'/%3E%3Crect x='3' y='14' width='7' height='7'/%3E%3C/svg%3E") !important;
}

/* Meine Garage */
body.woocommerce-account .woocommerce-MyAccount-navigation-link--meine-garage a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23404040' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpolyline points='9 22 9 12 15 12 15 22'/%3E%3C/svg%3E") !important;
}

/* Wartungsprotokoll */
body.woocommerce-account .woocommerce-MyAccount-navigation-link--wartungsprotokoll a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23404040' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z'/%3E%3C/svg%3E") !important;
}

/* Bestellungen */
body.woocommerce-account .woocommerce-MyAccount-navigation-link--orders a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23404040' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2L3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z'/%3E%3Cline x1='3' y1='6' x2='21' y2='6'/%3E%3Cpath d='M16 10a4 4 0 0 1-8 0'/%3E%3C/svg%3E") !important;
}

/* Downloads */
body.woocommerce-account .woocommerce-MyAccount-navigation-link--downloads a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23404040' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='7 10 12 15 17 10'/%3E%3Cline x1='12' y1='15' x2='12' y2='3'/%3E%3C/svg%3E") !important;
}

/* Adressen */
body.woocommerce-account .woocommerce-MyAccount-navigation-link--edit-address a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23404040' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E") !important;
}

/* Zahlungsmethoden */
body.woocommerce-account .woocommerce-MyAccount-navigation-link--payment-methods a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23404040' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='1' y='4' width='22' height='16' rx='2' ry='2'/%3E%3Cline x1='1' y1='10' x2='23' y2='10'/%3E%3C/svg%3E") !important;
}

/* Kontodetails */
body.woocommerce-account .woocommerce-MyAccount-navigation-link--edit-account a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23404040' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E") !important;
}

/* Abmelden */
body.woocommerce-account .woocommerce-MyAccount-navigation-link--customer-logout a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23404040' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpolyline points='16 17 21 12 16 7'/%3E%3Cline x1='21' y1='12' x2='9' y2='12'/%3E%3C/svg%3E") !important;
}

/* Active state icons - use CSS filter to change color */
body.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a::before {
    filter: invert(48%) sepia(79%) saturate(2476%) hue-rotate(175deg) brightness(97%) contrast(97%) !important;
}

/* Logout hover - red */
body.woocommerce-account .woocommerce-MyAccount-navigation-link--customer-logout a:hover {
    color: #dc2626 !important;
    background: #fef2f2 !important;
}

body.woocommerce-account .woocommerce-MyAccount-navigation-link--customer-logout a:hover::before {
    filter: invert(22%) sepia(93%) saturate(5765%) hue-rotate(355deg) brightness(92%) contrast(90%) !important;
}

/* ==========================================================================
   Content Area
   ========================================================================== */

body.woocommerce-account .woocommerce-MyAccount-content {
    background: #fff !important;
    border-radius: 12px !important;
    border: 1px solid #e5e5e5 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
    padding: 24px !important;
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    position: relative !important;
}

/* Remove theme's decorative line */
body.woocommerce-account .woocommerce-MyAccount-content::before,
body.woocommerce-account .woocommerce-MyAccount-content::after {
    display: none !important;
    content: none !important;
    border: none !important;
}

/* Fix for garage cards and other content */
body.woocommerce-account .woocommerce-MyAccount-content > * {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

body.woocommerce-account .woocommerce-MyAccount-content > p:first-child {
    color: #525252 !important;
    font-size: 15px !important;
    line-height: 1.6 !important;
    margin-bottom: 24px !important;
}

/* Links in content */
body.woocommerce-account .woocommerce-MyAccount-content a,
body.woocommerce-account .woocommerce-MyAccount-content a:link,
body.woocommerce-account .woocommerce-MyAccount-content a:visited {
    color: #0277b8 !important;
}

body.woocommerce-account .woocommerce-MyAccount-content a:hover {
    color: #0277b8 !important;
    text-decoration: underline !important;
}

/* Fix: Buttons need white text, override the general link color */
body.woocommerce-account .woocommerce-MyAccount-content a.wk-garage-btn-primary,
body.woocommerce-account .woocommerce-MyAccount-content a.wk-garage-btn-primary:link,
body.woocommerce-account .woocommerce-MyAccount-content a.wk-garage-btn-primary:visited,
body.woocommerce-account .woocommerce-MyAccount-content a.wk-mf-btn-primary,
body.woocommerce-account .woocommerce-MyAccount-content a.wk-mf-btn-primary:link,
body.woocommerce-account .woocommerce-MyAccount-content a.wk-mf-btn-primary:visited,
body.woocommerce-account .woocommerce-MyAccount-content .wk-garage-btn-primary,
body.woocommerce-account .woocommerce-MyAccount-content .wk-mf-btn-primary {
    color: #fff !important;
}

body.woocommerce-account .woocommerce-MyAccount-content a.wk-garage-btn-primary:hover,
body.woocommerce-account .woocommerce-MyAccount-content a.wk-mf-btn-primary:hover,
body.woocommerce-account .woocommerce-MyAccount-content .wk-garage-btn-primary:hover,
body.woocommerce-account .woocommerce-MyAccount-content .wk-mf-btn-primary:hover {
    color: #fff !important;
    text-decoration: none !important;
}

/* ==========================================================================
   Address Page
   ========================================================================== */

/* Container - Use exact classes from HTML */
body.woocommerce-account .woocommerce-MyAccount-content .u-columns.woocommerce-Addresses.col2-set.addresses {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 24px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    width: 100% !important;
}

/* Address Cards */
body.woocommerce-account .woocommerce-MyAccount-content .u-column1.col-1.woocommerce-Address,
body.woocommerce-account .woocommerce-MyAccount-content .u-column2.col-2.woocommerce-Address {
    background: #fafafa !important;
    border-radius: 12px !important;
    padding: 24px !important;
    border: 1px solid #e5e5e5 !important;
    margin: 0 !important;
    width: auto !important;
    float: none !important;
    box-sizing: border-box !important;
}

/* Address Header */
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address header.woocommerce-Address-title.title {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    margin-bottom: 16px !important;
    padding-bottom: 16px !important;
    border-bottom: 1px solid #e5e5e5 !important;
}

/* Address Title - H2 not H3! */
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address header.woocommerce-Address-title.title h2 {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #171717 !important;
    flex: 1 !important;
    line-height: 1.4 !important;
}

/* Edit Button */
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address header.woocommerce-Address-title.title a.edit,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address header.woocommerce-Address-title.title a.edit:link,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address header.woocommerce-Address-title.title a.edit:visited {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px 16px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #fff !important;
    background: #0277b8 !important;
    border: none !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
}

body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address header.woocommerce-Address-title.title a.edit:hover {
    background: #0277b8 !important;
    color: #fff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(3, 153, 236, 0.35) !important;
    text-decoration: none !important;
}

/* Address Content */
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address address {
    font-style: normal !important;
    color: #525252 !important;
    font-size: 14px !important;
    line-height: 1.7 !important;
}

/* ==========================================================================
   Orders Table
   ========================================================================== */

body.woocommerce-account .woocommerce-orders-table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    border: 1px solid #e5e5e5 !important;
}

body.woocommerce-account .woocommerce-orders-table thead {
    background: #fafafa !important;
}

body.woocommerce-account .woocommerce-orders-table th {
    padding: 16px 12px !important;
    font-weight: 600 !important;
    color: #404040 !important;
    text-align: left !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border-bottom: 1px solid #e5e5e5 !important;
}

body.woocommerce-account .woocommerce-orders-table td {
    padding: 14px 16px !important;
    border-top: 1px solid #f5f5f5 !important;
    color: #404040 !important;
    font-size: 14px !important;
    vertical-align: middle !important;
}

body.woocommerce-account .woocommerce-orders-table tbody tr:first-child td {
    border-top: none !important;
}

body.woocommerce-account .woocommerce-orders-table tbody tr:hover td {
    background: #fafafa !important;
}

/* Order Action Buttons */
body.woocommerce-account .woocommerce-orders-table .woocommerce-button,
body.woocommerce-account .woocommerce-orders-table .button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 36px !important;
    padding: 8px 14px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #0277b8 !important;
    background: rgba(3, 153, 236, 0.1) !important;
    border: 1px solid #0277b8 !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

body.woocommerce-account .woocommerce-orders-table .woocommerce-button:hover,
body.woocommerce-account .woocommerce-orders-table .button:hover {
    background: #0277b8 !important;
    color: #fff !important;
    text-decoration: none !important;
}

/* ==========================================================================
   Forms
   ========================================================================== */

body.woocommerce-account .woocommerce-EditAccountForm,
body.woocommerce-account .woocommerce-address-fields,
body.woocommerce-account .edit-account {
    max-width: 600px !important;
}

body.woocommerce-account .woocommerce-EditAccountForm .form-row,
body.woocommerce-account .woocommerce-address-fields .form-row,
body.woocommerce-account .edit-account .form-row {
    margin-bottom: 20px !important;
}

body.woocommerce-account .woocommerce-EditAccountForm label,
body.woocommerce-account .woocommerce-address-fields label,
body.woocommerce-account .edit-account label {
    display: block !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #404040 !important;
    margin-bottom: 6px !important;
}

body.woocommerce-account .woocommerce-EditAccountForm input[type="text"],
body.woocommerce-account .woocommerce-EditAccountForm input[type="email"],
body.woocommerce-account .woocommerce-EditAccountForm input[type="tel"],
body.woocommerce-account .woocommerce-EditAccountForm input[type="password"],
body.woocommerce-account .woocommerce-address-fields input[type="text"],
body.woocommerce-account .woocommerce-address-fields input[type="tel"],
body.woocommerce-account .woocommerce-address-fields select,
body.woocommerce-account .edit-account input[type="text"],
body.woocommerce-account .edit-account input[type="email"],
body.woocommerce-account .edit-account input[type="tel"],
body.woocommerce-account .edit-account input[type="password"],
body.woocommerce-account .edit-account select {
    width: 100% !important;
    height: 48px !important;
    padding: 0 14px !important;
    font-size: 15px !important;
    border: 2px solid #e5e5e5 !important;
    border-radius: 8px !important;
    background: #fff !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}

body.woocommerce-account .woocommerce-EditAccountForm input:focus,
body.woocommerce-account .woocommerce-address-fields input:focus,
body.woocommerce-account .woocommerce-address-fields select:focus,
body.woocommerce-account .edit-account input:focus,
body.woocommerce-account .edit-account select:focus {
    outline: none !important;
    border-color: #0277b8 !important;
    box-shadow: 0 0 0 3px rgba(3, 153, 236, 0.1) !important;
}

/* Select appearance */
body.woocommerce-account .woocommerce-address-fields select,
body.woocommerce-account .edit-account select {
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23525252' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    padding-right: 40px !important;
    cursor: pointer !important;
}

/* Submit Buttons */
body.woocommerce-account .woocommerce-EditAccountForm button[type="submit"],
body.woocommerce-account .woocommerce-address-fields button[type="submit"],
body.woocommerce-account .edit-account button[type="submit"],
body.woocommerce-account .woocommerce-Button,
body.woocommerce-account button.woocommerce-Button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 48px !important;
    padding: 12px 24px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #fff !important;
    background: #0277b8 !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

body.woocommerce-account .woocommerce-EditAccountForm button[type="submit"]:hover,
body.woocommerce-account .woocommerce-address-fields button[type="submit"]:hover,
body.woocommerce-account .edit-account button[type="submit"]:hover,
body.woocommerce-account .woocommerce-Button:hover,
body.woocommerce-account button.woocommerce-Button:hover {
    background: #0277b8 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(3, 153, 236, 0.35) !important;
}

/* Fieldset for password section */
body.woocommerce-account fieldset {
    border: 1px solid #e5e5e5 !important;
    border-radius: 8px !important;
    padding: 20px !important;
    margin: 24px 0 !important;
    background: #fafafa !important;
}

body.woocommerce-account fieldset legend {
    font-weight: 600 !important;
    color: #404040 !important;
    padding: 0 8px !important;
}

/* ==========================================================================
   Orders Pagination
   ========================================================================== */

body.woocommerce-account .woocommerce-pagination,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-pagination {
    display: flex !important;
    justify-content: center !important;
    gap: 12px !important;
    margin-top: 24px !important;
    padding-top: 24px !important;
    border-top: 1px solid #e5e5e5 !important;
}

body.woocommerce-account .woocommerce-button--previous,
body.woocommerce-account .woocommerce-button--next,
body.woocommerce-account .woocommerce-Button--previous,
body.woocommerce-account .woocommerce-Button--next,
body.woocommerce-account a.woocommerce-button--previous,
body.woocommerce-account a.woocommerce-button--next,
body.woocommerce-account a.woocommerce-Button--previous,
body.woocommerce-account a.woocommerce-Button--next {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    min-height: 44px !important;
    padding: 10px 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #0277b8 !important;
    background: #fff !important;
    border: 2px solid #0277b8 !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

body.woocommerce-account .woocommerce-button--previous:hover,
body.woocommerce-account .woocommerce-button--next:hover,
body.woocommerce-account .woocommerce-Button--previous:hover,
body.woocommerce-account .woocommerce-Button--next:hover,
body.woocommerce-account a.woocommerce-button--previous:hover,
body.woocommerce-account a.woocommerce-button--next:hover,
body.woocommerce-account a.woocommerce-Button--previous:hover,
body.woocommerce-account a.woocommerce-Button--next:hover {
    background: #0277b8 !important;
    color: #fff !important;
    text-decoration: none !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(3, 153, 236, 0.35) !important;
}

/* Add arrows to pagination buttons */
body.woocommerce-account .woocommerce-button--previous::before,
body.woocommerce-account .woocommerce-Button--previous::before,
body.woocommerce-account a.woocommerce-button--previous::before,
body.woocommerce-account a.woocommerce-Button--previous::before {
    content: '←' !important;
}

body.woocommerce-account .woocommerce-button--next::after,
body.woocommerce-account .woocommerce-Button--next::after,
body.woocommerce-account a.woocommerce-button--next::after,
body.woocommerce-account a.woocommerce-Button--next::after {
    content: '→' !important;
}

/* ==========================================================================
   Notices and Messages
   ========================================================================== */

body.woocommerce-account .woocommerce-message,
body.woocommerce-account .woocommerce-info,
body.woocommerce-account .woocommerce-error {
    padding: 14px 18px !important;
    margin-bottom: 20px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    list-style: none !important;
}

body.woocommerce-account .woocommerce-message {
    background: #ecfdf5 !important;
    border: 1px solid #10b981 !important;
    color: #059669 !important;
}

body.woocommerce-account .woocommerce-info {
    background: #eff6ff !important;
    border: 1px solid #3b82f6 !important;
    color: #0284c7 !important;
}

body.woocommerce-account .woocommerce-error {
    background: #fef2f2 !important;
    border: 1px solid #dc2626 !important;
    color: #dc2626 !important;
}

body.woocommerce-account .woocommerce-message::before,
body.woocommerce-account .woocommerce-info::before,
body.woocommerce-account .woocommerce-error::before {
    display: none !important;
}

/* ==========================================================================
   Downloads Table
   ========================================================================== */

body.woocommerce-account .woocommerce-table--order-downloads {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    border: 1px solid #e5e5e5 !important;
}

body.woocommerce-account .woocommerce-table--order-downloads th,
body.woocommerce-account .woocommerce-table--order-downloads td {
    padding: 12px 16px !important;
    font-size: 14px !important;
    border-bottom: 1px solid #f5f5f5 !important;
}

body.woocommerce-account .woocommerce-table--order-downloads thead th {
    background: #fafafa !important;
    font-weight: 600 !important;
    color: #404040 !important;
    text-transform: uppercase !important;
    font-size: 12px !important;
    letter-spacing: 0.5px !important;
}

/* ==========================================================================
   Payment Methods
   ========================================================================== */

body.woocommerce-account .woocommerce-PaymentMethods {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.woocommerce-account .woocommerce-PaymentMethod {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
    padding: 16px !important;
    background: #fafafa !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 8px !important;
    margin-bottom: 12px !important;
}

/* ==========================================================================
   Responsive - Tablet (< 960px)
   ========================================================================== */

@media (max-width: 959px) {
    body.woocommerce-account .woocommerce {
        grid-template-columns: 200px 1fr !important;
        gap: 16px !important;
    }

    body.woocommerce-account .woocommerce-MyAccount-navigation {
        position: static !important;
    }

    body.woocommerce-account .woocommerce-MyAccount-content .u-columns.woocommerce-Addresses.col2-set.addresses {
        gap: 16px !important;
    }
}

/* ==========================================================================
   Responsive - Mobile (< 640px)
   ========================================================================== */

@media screen and (max-width: 639px) {
    /* =========================================
       YOOtheme/UIkit Override - Remove excess padding
       ========================================= */

    /* Remove section padding completely */
    body.woocommerce-account .uk-section {
        padding-top: 0 !important;
        padding-bottom: 10px !important;
    }

    /* Also target main content area */
    body.woocommerce-account #tm-main {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    /* Remove container side padding */
    body.woocommerce-account .uk-container {
        padding-left: 12px !important;
        padding-right: 12px !important;
        max-width: 100% !important;
    }

    /* Remove grid margins */
    body.woocommerce-account .uk-grid {
        margin-left: 0 !important;
        margin-top: 0 !important;
    }

    body.woocommerce-account .uk-grid > * {
        padding-left: 0 !important;
    }

    /* =========================================
       WooCommerce Layout
       ========================================= */

    /* Stack layout */
    body.woocommerce-account .woocommerce {
        display: block !important;
        padding: 0 !important;
        grid-template-columns: none !important;
    }

    /* Navigation: Horizontal Scroll with Snap Scrolling (HOCH-02) */
    body.woocommerce-account .woocommerce-MyAccount-navigation {
        position: relative !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        margin-bottom: 0px !important;
        margin-top: 0 !important;
        border-radius: 8px !important;
        width: calc(100% + 24px) !important; /* Extend to edges */
        margin-left: -12px !important;
        margin-right: -12px !important;
        max-width: none !important;
        min-width: 0 !important;
        /* Scroll snap for better UX */
        scroll-snap-type: x mandatory !important;
        scroll-behavior: smooth !important;
        /* Remove border on mobile for cleaner look */
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
    }

    body.woocommerce-account .woocommerce-MyAccount-navigation::-webkit-scrollbar {
        display: none !important;
    }

    /* MOB-04: Fade edges removed - caused issues with scrolling */
    body.woocommerce-account .woocommerce-MyAccount-navigation::before,
    body.woocommerce-account .woocommerce-MyAccount-navigation::after {
        display: none !important;
        content: none !important;
    }

    body.woocommerce-account nav.woocommerce-MyAccount-navigation ul,
    body.woocommerce-account .woocommerce-MyAccount-navigation > ul {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 6px !important;
        padding: 8px 12px !important;
        white-space: nowrap !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        overflow-x: visible !important;
    }

    body.woocommerce-account nav.woocommerce-MyAccount-navigation ul li,
    body.woocommerce-account .woocommerce-MyAccount-navigation > ul > li {
        flex-shrink: 0 !important;
        flex-grow: 0 !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        display: inline-block !important;
        float: none !important;
        /* Snap alignment for each item */
        scroll-snap-align: start !important;
    }

    body.woocommerce-account nav.woocommerce-MyAccount-navigation ul li a,
    body.woocommerce-account .woocommerce-MyAccount-navigation > ul > li > a {
        padding: 10px 14px !important;
        border-radius: 22px !important;
        border: 1px solid #e5e5e5 !important;
        font-size: 13px !important;
        min-height: 44px !important;
        height: auto !important;
        width: auto !important;
        min-width: max-content !important; /* MOB-01: Prevent text truncation */
        max-width: none !important;
        display: inline-flex !important;
        background: #fff !important;
        white-space: nowrap !important;
        color: #404040 !important;
        align-items: center !important;
    }

    body.woocommerce-account nav.woocommerce-MyAccount-navigation ul li.is-active a,
    body.woocommerce-account .woocommerce-MyAccount-navigation > ul > li.is-active > a {
        border-color: #0277b8 !important;
        background: rgba(3, 153, 236, 0.1) !important;
        color: #0277b8 !important;
    }

    /* Show icons on mobile - 16x16px with 4px gap to text */
    body.woocommerce-account .woocommerce-MyAccount-navigation ul li a::before {
        display: inline-block !important;
        content: '' !important;
        width: 16px !important;
        height: 16px !important;
        min-width: 16px !important;
        background-size: 16px 16px !important;
        flex-shrink: 0 !important;
        margin-right: 4px !important;
    }

    /* Content Area - MOB-06: Optimized for mobile */
    body.woocommerce-account .woocommerce-MyAccount-content {
        padding: 12px !important;
        border-radius: 0 !important;
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
        margin: 0 -12px !important; /* Extend to edges */
        width: calc(100% + 24px) !important;
    }

    /* Address Cards: Stack */
    body.woocommerce-account .woocommerce-MyAccount-content .u-columns.woocommerce-Addresses.col2-set.addresses {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    body.woocommerce-account .woocommerce-MyAccount-content .u-column1.col-1.woocommerce-Address,
    body.woocommerce-account .woocommerce-MyAccount-content .u-column2.col-2.woocommerce-Address {
        padding: 16px !important;
    }

    /* Orders Table: Card Layout */
    body.woocommerce-account .woocommerce-orders-table,
    body.woocommerce-account .woocommerce-orders-table thead,
    body.woocommerce-account .woocommerce-orders-table tbody,
    body.woocommerce-account .woocommerce-orders-table th,
    body.woocommerce-account .woocommerce-orders-table td,
    body.woocommerce-account .woocommerce-orders-table tr {
        display: block !important;
    }

    body.woocommerce-account .woocommerce-orders-table {
        border: none !important;
    }

    body.woocommerce-account .woocommerce-orders-table thead {
        display: none !important;
    }

    body.woocommerce-account .woocommerce-orders-table tbody tr {
        background: #fff !important;
        border: 1px solid #e5e5e5 !important;
        border-radius: 10px !important;
        padding: 12px !important;
        margin-bottom: 10px !important;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    }

    /* Order number - make it stand out */
    body.woocommerce-account .woocommerce-orders-table td.woocommerce-orders-table__cell-order-number {
        padding-bottom: 8px !important;
        margin-bottom: 8px !important;
        border-bottom: 1px solid #f0f0f0 !important;
    }

    body.woocommerce-account .woocommerce-orders-table td.woocommerce-orders-table__cell-order-number a {
        font-weight: 700 !important;
        font-size: 15px !important;
    }

    body.woocommerce-account .woocommerce-orders-table td.woocommerce-orders-table__cell-order-number::before {
        display: none !important;
    }

    body.woocommerce-account .woocommerce-orders-table td {
        border: none !important;
        padding: 6px 0 !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    body.woocommerce-account .woocommerce-orders-table td::before {
        content: attr(data-title) !important;
        font-weight: 600 !important;
        color: #737373 !important;
        font-size: 11px !important;
        text-transform: uppercase !important;
        flex-shrink: 0 !important;
    }

    /* Actions cell - buttons side by side */
    body.woocommerce-account .woocommerce-orders-table td.woocommerce-orders-table__cell-order-actions {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 8px !important;
        padding-top: 12px !important;
        justify-content: flex-start !important;
        align-items: center !important;
    }

    body.woocommerce-account .woocommerce-orders-table td.woocommerce-orders-table__cell-order-actions::before {
        display: none !important;
    }

    /* Fix: Buttons side by side, not stacked - STRONG overrides */
    body.woocommerce-account .woocommerce-orders-table td.woocommerce-orders-table__cell-order-actions a,
    body.woocommerce-account .woocommerce-orders-table td.woocommerce-orders-table__cell-order-actions a.woocommerce-button,
    body.woocommerce-account .woocommerce-orders-table td.woocommerce-orders-table__cell-order-actions a.button,
    body.woocommerce-account .woocommerce-orders-table td.woocommerce-orders-table__cell-order-actions .woocommerce-button,
    body.woocommerce-account .woocommerce-orders-table td.woocommerce-orders-table__cell-order-actions .button {
        display: inline-flex !important;
        flex: 0 0 auto !important;
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
        text-align: center !important;
        padding: 10px 14px !important;
        font-size: 13px !important;
        white-space: nowrap !important;
        margin: 0 !important;
    }

    /* Forms full width */
    body.woocommerce-account .woocommerce-EditAccountForm,
    body.woocommerce-account .woocommerce-address-fields,
    body.woocommerce-account .edit-account {
        max-width: 100% !important;
    }

    body.woocommerce-account .woocommerce-EditAccountForm button[type="submit"],
    body.woocommerce-account .woocommerce-address-fields button[type="submit"],
    body.woocommerce-account .edit-account button[type="submit"],
    body.woocommerce-account .woocommerce-Button,
    body.woocommerce-account button.woocommerce-Button {
        width: 100% !important;
    }
}

/* ==========================================================================
   Login / Register Page
   ========================================================================== */

/* On login page, don't use sidebar layout */
body.woocommerce-account:not(.logged-in) .woocommerce {
    display: block !important;
    max-width: 900px !important;
}

/* Hide navigation on login page (there is none anyway) */
body.woocommerce-account:not(.logged-in) .woocommerce-MyAccount-navigation {
    display: none !important;
}

/* Login/Register container */
body.woocommerce-account:not(.logged-in) .woocommerce-MyAccount-content,
body.woocommerce-account:not(.logged-in) .u-columns.col2-set {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 32px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* Login and Register columns */
body.woocommerce-account:not(.logged-in) .u-column1.col-1,
body.woocommerce-account:not(.logged-in) .u-column2.col-2 {
    background: #fff !important;
    border-radius: 12px !important;
    border: 1px solid #e5e5e5 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
    padding: 32px !important;
    width: auto !important;
    float: none !important;
    margin: 0 !important;
}

/* Headings */
body.woocommerce-account:not(.logged-in) .u-column1 h2,
body.woocommerce-account:not(.logged-in) .u-column2 h2 {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #171717 !important;
    margin: 0 0 24px 0 !important;
    padding: 0 !important;
}

/* Form rows */
body.woocommerce-account:not(.logged-in) .woocommerce-form .form-row {
    margin-bottom: 20px !important;
}

/* Labels */
body.woocommerce-account:not(.logged-in) .woocommerce-form label {
    display: block !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #404040 !important;
    margin-bottom: 8px !important;
}

/* Inputs */
body.woocommerce-account:not(.logged-in) .woocommerce-form input[type="text"],
body.woocommerce-account:not(.logged-in) .woocommerce-form input[type="email"],
body.woocommerce-account:not(.logged-in) .woocommerce-form input[type="password"] {
    width: 100% !important;
    height: 48px !important;
    padding: 0 14px !important;
    font-size: 15px !important;
    border: 2px solid #e5e5e5 !important;
    border-radius: 8px !important;
    background: #fff !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}

body.woocommerce-account:not(.logged-in) .woocommerce-form input:focus {
    outline: none !important;
    border-color: #0277b8 !important;
    box-shadow: 0 0 0 3px rgba(3, 153, 236, 0.1) !important;
}

/* Password field wrapper */
body.woocommerce-account:not(.logged-in) .woocommerce-form .password-input {
    position: relative !important;
}

body.woocommerce-account:not(.logged-in) .woocommerce-form .show-password-input {
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    padding: 8px !important;
    color: #737373 !important;
}

/* Checkbox row */
body.woocommerce-account:not(.logged-in) .woocommerce-form .woocommerce-form-login__rememberme {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 16px 0 !important;
}

body.woocommerce-account:not(.logged-in) .woocommerce-form .woocommerce-form-login__rememberme input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    margin: 0 !important;
    appearance: auto !important;
    -webkit-appearance: checkbox !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: static !important;
    cursor: pointer !important;
    accent-color: #0277b8 !important;
}

body.woocommerce-account:not(.logged-in) .woocommerce-form .woocommerce-form-login__rememberme span {
    font-size: 14px !important;
    color: #525252 !important;
}

/* Submit buttons */
body.woocommerce-account:not(.logged-in) .woocommerce-form button[type="submit"],
body.woocommerce-account:not(.logged-in) .woocommerce-form .woocommerce-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 48px !important;
    padding: 12px 24px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #fff !important;
    background: #0277b8 !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    margin-top: 8px !important;
}

body.woocommerce-account:not(.logged-in) .woocommerce-form button[type="submit"]:hover,
body.woocommerce-account:not(.logged-in) .woocommerce-form .woocommerce-button:hover {
    background: #0277b8 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(3, 153, 236, 0.35) !important;
}

/* Lost password link */
body.woocommerce-account:not(.logged-in) .woocommerce-LostPassword {
    margin-top: 16px !important;
    text-align: center !important;
}

body.woocommerce-account:not(.logged-in) .woocommerce-LostPassword a {
    font-size: 14px !important;
    color: #0277b8 !important;
    text-decoration: none !important;
}

body.woocommerce-account:not(.logged-in) .woocommerce-LostPassword a:hover {
    text-decoration: underline !important;
}

/* Privacy policy text */
body.woocommerce-account:not(.logged-in) .woocommerce-privacy-policy-text {
    font-size: 13px !important;
    color: #737373 !important;
    line-height: 1.6 !important;
    margin: 16px 0 !important;
}

body.woocommerce-account:not(.logged-in) .woocommerce-privacy-policy-text p {
    margin: 0 !important;
}

/* Mobile: Stack columns */
@media (max-width: 768px) {
    body.woocommerce-account:not(.logged-in) .woocommerce-MyAccount-content,
    body.woocommerce-account:not(.logged-in) .u-columns.col2-set {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    body.woocommerce-account:not(.logged-in) .u-column1.col-1,
    body.woocommerce-account:not(.logged-in) .u-column2.col-2 {
        padding: 24px !important;
    }

    body.woocommerce-account:not(.logged-in) .u-column1 h2,
    body.woocommerce-account:not(.logged-in) .u-column2 h2 {
        font-size: 20px !important;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    body.woocommerce-account .woocommerce-MyAccount-navigation {
        display: none !important;
    }

    body.woocommerce-account .woocommerce {
        display: block !important;
    }

    body.woocommerce-account .woocommerce-MyAccount-content {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }
}
