/* =========================================================================
   WooCommerce Custom My Account Stylesheet (Hardcoded Colors & Layouts)
   ========================================================================= */

.custom-account-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    width: 100%;
    max-width: 1200px;
    margin: 40px auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #111111;
    box-sizing: border-box;
}

@media (min-width: 1024px) {
    .custom-account-wrapper {
        grid-template-columns: 280px 1fr;
        align-items: start;
    }
}

/* =========================================================================
   Sidebar Styling
   ========================================================================= */
.custom-account-sidebar {
    background-color: #ffffff;
    border: 1px solid #E5E5E5;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

@media (min-width: 1024px) {
    .custom-account-sidebar {
        position: sticky;
        top: 100px;
    }
}

/* Profile Display */
.custom-account-profile {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid #E5E5E5;
}

.custom-account-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7B3FE4, #5A2DB0);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.custom-account-userinfo {
    display: flex;
    flex-direction: column;
}

.custom-account-greeting {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #555555;
}

.custom-account-username {
    font-size: 1rem;
    font-weight: 700;
    color: #111111;
    word-break: break-all;
}

/* Sidebar Menu */
.custom-account-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.custom-account-menu-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    color: #555555;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.25s ease;
}

.custom-account-menu-item a:hover {
    color: #7B3FE4;
    background-color: #F8F8FC;
}

.custom-account-menu-item.is-active a {
    color: #7B3FE4;
    background-color: #EDE9FF;
    font-weight: 600;
}

.custom-account-menu-item a .material-symbols-outlined {
    font-size: 1.25rem;
    transition: all 0.25s ease;
}

.custom-account-menu-item.is-active a .material-symbols-outlined {
    font-variation-settings: 'FILL' 1;
}

/* =========================================================================
   Content Pane Styling
   ========================================================================= */
.custom-account-content {
    background-color: #ffffff;
    border: 1px solid #E5E5E5;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 30px;
    min-height: 400px;
}

@media (max-width: 768px) {
    .custom-account-content {
        padding: 20px;
    }
}

/* Hide WooCommerce native navigation completely since we replace it */
.woocommerce-MyAccount-navigation {
    display: none !important;
}

.woocommerce-MyAccount-content {
    width: 100% !important;
    float: none !important;
}

/* =========================================================================
   Dashboard Tab (Overview)
   ========================================================================= */
.custom-dashboard-welcome {
    background: linear-gradient(135deg, #7B3FE4, #5A2DB0);
    color: #ffffff;
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(123, 63, 228, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.custom-dashboard-welcome h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 8px 0 !important;
    color: #ffffff !important;
    line-height: 1.2 !important;
}

.custom-dashboard-welcome p {
    font-size: 0.875rem;
    margin: 0 !important;
    opacity: 0.9;
    line-height: 1.5 !important;
}

/* Quick Action Grid */
.custom-dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

@media (min-width: 600px) {
    .custom-dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .custom-dashboard-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.custom-dashboard-card {
    background-color: #ffffff;
    border: 1px solid #E5E5E5;
    border-radius: 10px;
    padding: 24px;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.custom-dashboard-card:hover {
    transform: translateY(-2px);
    border-color: #7B3FE4;
    box-shadow: 0 8px 24px rgba(123, 63, 228, 0.08);
}

.custom-dashboard-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.custom-dashboard-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background-color: #EDE9FF;
    color: #7B3FE4;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-dashboard-card-icon .material-symbols-outlined {
    font-size: 1.5rem;
}

.custom-dashboard-card-arrow {
    color: #555555;
    font-size: 1.25rem;
    transition: all 0.25s ease;
}

.custom-dashboard-card:hover .custom-dashboard-card-arrow {
    color: #7B3FE4;
    transform: translateX(4px);
}

.custom-dashboard-card-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.custom-dashboard-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #111111;
}

.custom-dashboard-card-desc {
    font-size: 0.8rem;
    color: #555555;
    line-height: 1.4;
}

/* =========================================================================
   WooCommerce Global Element Styling
   ========================================================================= */

/* Alert messages */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
    position: relative !important;
    border-top: 0 !important;
    background-color: #F8F8FC !important;
    border: 1px solid #E5E5E5 !important;
    border-radius: 10px;
    padding: 16px 20px 16px 52px !important;
    /* Padding left creates room for the icon */
    color: #111111 !important;
    list-style: none !important;
    margin-bottom: 24px !important;
    font-size: 0.875rem;
    line-height: 1.6 !important;
    display: flow-root !important;
    /* Establishes block layout and clears floats */
    box-sizing: border-box !important;
}

.woocommerce-message::before,
.woocommerce-error::before,
.woocommerce-info::before {
    position: absolute !important;
    left: 20px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    display: inline-block !important;
    margin: 0 !important;
}

/* Float notice buttons to the right */
.woocommerce-message .button,
.woocommerce-error .button,
.woocommerce-info .button,
.woocommerce-message .wc-forward,
.woocommerce-error .wc-forward,
.woocommerce-info .wc-forward {
    float: right !important;
    margin-top: -4px !important;
    margin-bottom: -4px !important;
    margin-left: 16px !important;
}

.woocommerce-message {
    border-left: 4px solid #10b981 !important;
}

.woocommerce-error {
    border-left: 4px solid #ef4444 !important;
    padding-left: 20px !important;
}

.woocommerce-error::before {
    display: none !important;
    /* Hide icon for multiple errors lists to save space */
}

.woocommerce-info {
    border-left: 4px solid #7B3FE4 !important;
}

/* Specific buttons theme styling */
.woocommerce .custom-account-wrapper .button,
.woocommerce-page .custom-account-wrapper .button,
.custom-account-wrapper .button,
.woocommerce .custom-account-wrapper button.button,
.woocommerce-page .custom-account-wrapper button.button,
.custom-account-wrapper button.button,
.woocommerce .custom-account-wrapper input.button,
.woocommerce-page .custom-account-wrapper input.button,
.custom-account-wrapper input.button,
.custom-account-wrapper input[type="submit"] {
    background-color: #7B3FE4 !important;
    color: #ffffff !important;
    padding: 10px 20px !important;
    border-radius: 10px !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    transition: all 0.25s ease !important;
}

.woocommerce .custom-account-wrapper .button:hover,
.woocommerce-page .custom-account-wrapper .button:hover,
.custom-account-wrapper .button:hover,
.woocommerce .custom-account-wrapper button.button:hover,
.woocommerce-page .custom-account-wrapper button.button:hover,
.custom-account-wrapper button.button:hover,
.woocommerce .custom-account-wrapper input.button:hover,
.woocommerce-page .custom-account-wrapper input.button:hover,
.custom-account-wrapper input.button:hover,
.custom-account-wrapper input[type="submit"]:hover {
    background-color: #5A2DB0 !important;
    color: #ffffff !important;
}

/* Tables */
.woocommerce-MyAccount-content table.shop_table,
.custom-account-content table.shop_table {
    border-collapse: collapse;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #E5E5E5 !important;
    margin-bottom: 24px;
}

.woocommerce-MyAccount-content table.shop_table thead th,
.custom-account-content table.shop_table thead th {
    background-color: #F8F8FC;
    color: #111111;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 16px 20px;
    border-bottom: 2px solid #E5E5E5;
    text-align: left;
}

.woocommerce-MyAccount-content table.shop_table tbody th,
.custom-account-content table.shop_table tbody th {
    background-color: transparent !important;
    font-weight: 500;
    text-transform: none;
    font-size: 0.875rem;
    letter-spacing: normal;
    padding: 16px 20px;
    border-bottom: 1px solid #E5E5E5;
    text-align: left;
    color: #111111;
}

.woocommerce-MyAccount-content table.shop_table td,
.custom-account-content table.shop_table td {
    padding: 16px 20px;
    border-bottom: 1px solid #E5E5E5;
    font-size: 0.875rem;
    color: #555555;
}

.woocommerce-MyAccount-content table.shop_table tbody tr:hover td,
.woocommerce-MyAccount-content table.shop_table tbody tr:hover th,
.custom-account-content table.shop_table tbody tr:hover td,
.custom-account-content table.shop_table tbody tr:hover th {
    background-color: #F8F8FC !important;
    color: #111111;
}

.woocommerce-orders-table__cell-order-number a,
.woocommerce-orders-table__cell-subscription-id a,
.woocommerce-MyAccount-content table.shop_table .woocommerce-orders-table__cell-order-number a,
.custom-account-content table.shop_table .woocommerce-orders-table__cell-order-number a,
.custom-account-content table.shop_table .woocommerce-orders-table__cell-subscription-id a {
    color: #7B3FE4 !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

.woocommerce-orders-table__cell-order-number a:hover,
.woocommerce-orders-table__cell-subscription-id a:hover,
.woocommerce-MyAccount-content table.shop_table .woocommerce-orders-table__cell-order-number a:hover,
.custom-account-content table.shop_table .woocommerce-orders-table__cell-order-number a:hover,
.custom-account-content table.shop_table .woocommerce-orders-table__cell-subscription-id a:hover {
    text-decoration: underline !important;
}

/* Order status badge */
.woocommerce-MyAccount-content .status-badge,
.custom-account-content .status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.woocommerce-MyAccount-content .status-badge.status-completed,
.custom-account-content .status-badge.status-completed {
    background-color: #ecfdf5;
    color: #10b981;
}

.woocommerce-MyAccount-content .status-badge.status-processing,
.woocommerce-MyAccount-content .status-badge.status-on-hold,
.custom-account-content .status-badge.status-processing,
.custom-account-content .status-badge.status-on-hold {
    background-color: #fffbeb;
    color: #f59e0b;
}

.woocommerce-MyAccount-content .status-badge.status-cancelled,
.woocommerce-MyAccount-content .status-badge.status-failed,
.custom-account-content .status-badge.status-cancelled,
.custom-account-content .status-badge.status-failed {
    background-color: #fef2f2;
    color: #ef4444;
}

/* Forms & Fields */
.custom-account-wrapper form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.custom-account-wrapper fieldset {
    border: 1px solid #E5E5E5;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 20px;
}

.custom-account-wrapper legend {
    font-weight: 700;
    font-size: 1rem;
    padding: 0 10px;
    color: #111111;
}

/* Scoped form row containers for both standard and billing address forms */
.custom-account-wrapper .form-row,
.woocommerce-form-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    width: 100% !important;
    margin-bottom: 20px !important;
    box-sizing: border-box !important;
}

.custom-account-wrapper .form-row label,
.woocommerce-form-row label {
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    color: #111111 !important;
    margin-bottom: 0 !important;
    display: block !important;
}

/* Universal Inputs, selects (excluding Select2 single selection containers from height overrides to prevent conflict) */
.custom-account-wrapper input[type="text"],
.custom-account-wrapper input[type="email"],
.custom-account-wrapper input[type="password"],
.custom-account-wrapper input[type="tel"],
.custom-account-wrapper select,
.custom-account-wrapper textarea,
.woocommerce-form-row input.input-text,
.woocommerce-form-row select {
    width: 100% !important;
    box-sizing: border-box !important;
    border-radius: 10px !important;
    border: 1px solid #E5E5E5 !important;
    background-color: #ffffff !important;
    color: #111111 !important;
    padding: 10px 16px !important;
    height: 42px !important;
    font-family: inherit !important;
    font-size: 0.875rem !important;
    transition: all 0.25s ease !important;
}

/* Textarea height adjustment */
.custom-account-wrapper textarea {
    height: auto !important;
    min-height: 100px !important;
}

/* Select2 selection layout fixes with high specificity */
html body .select2.select2-container,
html body .woocommerce-page .select2.select2-container {
    height: 42px !important;
    display: inline-block !important;
}

body>.select2-container.select2-container--open,
.select2-container.select2-container--open {
    height: auto !important;
}

html body .select2-container--default .select2-selection--single,
html body .woocommerce-page .select2-container--default .select2-selection--single {
    height: 42px !important;
    padding: 0 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    border: 1px solid #E5E5E5 !important;
    border-radius: 10px !important;
    background-color: #ffffff !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

html body .select2-container--default .select2-selection--single .select2-selection__rendered,
html body .woocommerce-page .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding: 0 !important;
    margin: 0 !important;
    line-height: 40px !important;
    height: 40px !important;
    color: #111111 !important;
    display: block !important;
    width: 100% !important;
    text-align: left !important;
}

html body .select2-container--default .select2-selection--single .select2-selection__placeholder,
html body .woocommerce-page .select2-container--default .select2-selection--single .select2-selection__placeholder {
    line-height: 40px !important;
    height: 40px !important;
    display: block !important;
    color: #999999 !important;
}

html body .select2-container--default .select2-selection--single .select2-selection__arrow,
html body .woocommerce-page .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}

/* Focus and active highlights (Purple) */
.custom-account-wrapper input[type="text"]:focus,
.custom-account-wrapper input[type="email"]:focus,
.custom-account-wrapper input[type="password"]:focus,
.custom-account-wrapper input[type="tel"]:focus,
.custom-account-wrapper select:focus,
.custom-account-wrapper textarea:focus,
.woocommerce-form-row input.input-text:focus,
.woocommerce-form-row select:focus,
.custom-account-wrapper .select2-container--default.select2-container--focus .select2-selection--single,
.custom-account-wrapper .select2-container--default.select2-container--open .select2-selection--single {
    outline: none !important;
    border-color: #7B3FE4 !important;
    box-shadow: 0 0 0 1px #7B3FE4 !important;
}

/* WooCommerce Address Form Fields Layout */
.woocommerce-address-fields__field-wrapper,
.woocommerce-billing-fields__field-wrapper,
.woocommerce-shipping-fields__field-wrapper {
    display: block !important;
    width: 100% !important;
    clear: both !important;
}

.woocommerce-address-fields__field-wrapper::after,
.woocommerce-billing-fields__field-wrapper::after,
.woocommerce-shipping-fields__field-wrapper::after {
    content: "" !important;
    display: table !important;
    clear: both !important;
}

/* Default full width rows */
.custom-account-wrapper .form-row,
.woocommerce-form-row {
    width: 100% !important;
    float: none !important;
    clear: both !important;
    margin-bottom: 20px !important;
    display: block !important;
}

/* Half width row styling on desktop */
@media (min-width: 768px) {

    .custom-account-wrapper .form-row-first,
    .woocommerce-address-fields__field-wrapper .form-row-first,
    .woocommerce-billing-fields__field-wrapper .form-row-first {
        width: 48% !important;
        float: left !important;
        clear: none !important;
        margin-right: 4% !important;
        display: block !important;
    }

    .custom-account-wrapper .form-row-last,
    .woocommerce-address-fields__field-wrapper .form-row-last,
    .woocommerce-billing-fields__field-wrapper .form-row-last {
        width: 48% !important;
        float: right !important;
        clear: none !important;
        margin-right: 0 !important;
        display: block !important;
    }
}

.woocommerce .custom-account-wrapper a.button.edit {
    background-color: #F8F8FC !important;
    color: #7B3FE4 !important;
    border: 1px solid #E5E5E5 !important;
}

.woocommerce .custom-account-wrapper a.button.edit:hover {
    background-color: #EDE9FF !important;
    border-color: #7B3FE4 !important;
}

/* Addresses */
.woocommerce-Addresses {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
}

@media (min-width: 768px) {
    .woocommerce-Addresses {
        grid-template-columns: repeat(2, 1fr);
    }
}

.woocommerce-Address {
    background-color: #F8F8FC;
    border: 1px solid #E5E5E5;
    border-radius: 10px;
    padding: 24px;
}

.woocommerce-Address-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    border-bottom: 1px solid #E5E5E5;
    padding-bottom: 10px;
}

.woocommerce-Address-title h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #111111;
}

.woocommerce-Address address {
    font-style: normal;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #555555;
}

/* =========================================================================
   WooCommerce Subscriptions Compatibility
   ========================================================================= */
.my_account_subscriptions .subscription-id a {
    color: #7B3FE4;
    font-weight: 600;
    text-decoration: none;
}

.my_account_subscriptions .subscription-id a:hover {
    text-decoration: underline;
}

/* Actions inside Subscriptions details */
.woocommerce-MyAccount-content .subscription-actions,
.custom-account-content .subscription-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.woocommerce-MyAccount-content .subscription-actions a.button,
.custom-account-content .subscription-actions a.button {
    padding: 8px 16px !important;
    font-size: 0.8rem !important;
}

/* =========================================================================
   Universal Layout Helper Classes
   ========================================================================= */
.custom-recent-order-box {
    margin-top: 40px;
    padding: 24px;
    border: 1px solid #E5E5E5;
    border-radius: 10px;
}

/* =========================================================================
   Select2 Dropdown Panels (Appended to body, styled globally to Purple)
   ========================================================================= */
/* Desktop only: negative margin to pull dropdown flush against the select box */
@media (min-width: 768px) {
    body>.select2-container.select2-container--open {
        margin-top: -24px !important;
    }
}

.select2-dropdown {
    border: 1px solid #E5E5E5 !important;
    border-radius: 10px !important;
    box-shadow: 0 8px 24px rgba(123, 63, 228, 0.08) !important;
    background-color: #ffffff !important;
    box-sizing: border-box !important;
    z-index: 999999 !important;
    /* Ensure dropdown displays on top of other content */
}

/* Normalize search container and search field layout to prevent absolute offsets */
body .select2-dropdown .select2-search--dropdown {
    position: static !important;
    display: block !important;
    padding: 10px 12px !important;
    margin: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    background-color: #ffffff !important;
}

body .select2-dropdown .select2-search--dropdown .select2-search__field {
    position: static !important;
    display: block !important;
    width: 100% !important;
    height: 38px !important;
    padding: 8px 12px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    border: 1px solid #E5E5E5 !important;
    border-radius: 6px !important;
    outline: none !important;
    font-family: inherit !important;
    font-size: 0.875rem !important;
}

body .select2-dropdown .select2-search--dropdown .select2-search__field:focus {
    border-color: #7B3FE4 !important;
    box-shadow: 0 0 0 1px #7B3FE4 !important;
}

/* Reset option list containers to follow block flow */
body .select2-dropdown .select2-results {
    position: static !important;
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
}

body .select2-dropdown .select2-results__options {
    position: static !important;
    display: block !important;
    max-height: 220px !important;
    overflow-y: auto !important;
    margin: 0 !important;
    padding: 4px 0 !important;
    list-style: none !important;
}

/* Highly specific reset for option items to remove spacing gaps */
body .select2-container .select2-results__options .select2-results__option,
body .select2-container--default .select2-results__options .select2-results__option,
body .select2-dropdown .select2-results__options .select2-results__option,
body .select2-results__options li,
body .select2-results__option,
li.select2-results__option {
    padding: 8px 16px !important;
    margin: 0 !important;
    line-height: 1.4 !important;
    list-style: none !important;
    display: block !important;
    font-size: 0.875rem !important;
    color: #111111 !important;
    min-height: 0 !important;
    height: auto !important;
    box-sizing: border-box !important;
}

/* Highlighted and Selected Options */
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted[data-selected],
body .select2-container--default .select2-results__options .select2-results__option--highlighted {
    background-color: #7B3FE4 !important;
    color: #ffffff !important;
}

/* Global Selection Accent Color */
.custom-account-wrapper ::selection {
    background-color: #EDE9FF !important;
    color: #7B3FE4 !important;
}

/* =========================================================================
   Order & Subscription Details Premium Styling
   ========================================================================= */

/* Custom mark elements (avoids default browser highlights) */
.custom-account-content mark {
    background: #EDE9FF !important;
    color: #7B3FE4 !important;
    padding: 2px 8px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    display: inline-block !important;
}

.custom-account-content mark.order-status {
    background: #ecfdf5 !important;
    color: #10b981 !important;
}

/* Sub-headings and Title Sections */
.custom-account-content h2,
.custom-account-content .woocommerce-order-details__title,
.custom-account-content .woocommerce-column__title,
.custom-account-content section.woocommerce-order-details h2,
.custom-account-content section.woocommerce-customer-details h2 {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    margin-top: 32px !important;
    margin-bottom: 16px !important;
    color: #111111 !important;
}

/* Table Footer / Summary alignment */
.custom-account-content table.shop_table tfoot th {
    font-weight: 600 !important;
    text-transform: none !important;
    font-size: 0.875rem !important;
    letter-spacing: 0 !important;
    background-color: #ffffff !important;
    border-top: 1px solid #E5E5E5 !important;
    border-bottom: none !important;
    color: #111111 !important;
    padding: 14px 20px !important;
}

.custom-account-content table.shop_table tfoot td {
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    border-top: 1px solid #E5E5E5 !important;
    border-bottom: none !important;
    color: #111111 !important;
    padding: 14px 20px !important;
}

.custom-account-content table.shop_table tfoot tr:last-child th,
.custom-account-content table.shop_table tfoot tr:last-child td {
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #7B3FE4 !important;
}

/* Address Card Design */
.custom-account-content address {
    font-style: normal !important;
    background-color: #F8F8FC !important;
    border: 1px solid #E5E5E5 !important;
    border-radius: 12px !important;
    padding: 20px !important;
    color: #555555 !important;
    line-height: 1.6 !important;
    font-size: 0.875rem !important;
    max-width: 480px !important;
    margin-top: 10px !important;
}

.custom-account-content address p {
    margin: 8px 0 0 0 !important;
    color: #111111 !important;
    font-weight: 500 !important;
}

/* Premium Status Colors (Active, On-hold, Completed, etc.) */
.custom-account-content td.woocommerce-orders-table__cell-order-status,
.custom-account-content td.woocommerce-orders-table__cell-subscription-status {
    font-weight: 600 !important;
}

.woocommerce-orders-table__row--status-completed td.woocommerce-orders-table__cell-order-status,
.woocommerce-orders-table__row--status-active td.woocommerce-orders-table__cell-subscription-status,
.woocommerce-orders-table__row--status-active td.woocommerce-orders-table__cell-order-status {
    color: #10b981 !important;
}

.woocommerce-orders-table__row--status-processing td.woocommerce-orders-table__cell-order-status,
.woocommerce-orders-table__row--status-on-hold td.woocommerce-orders-table__cell-order-status,
.woocommerce-orders-table__row--status-on-hold td.woocommerce-orders-table__cell-subscription-status {
    color: #f59e0b !important;
}

.woocommerce-orders-table__row--status-cancelled td.woocommerce-orders-table__cell-order-status,
.woocommerce-orders-table__row--status-failed td.woocommerce-orders-table__cell-order-status {
    color: #ef4444 !important;
}

/* Action Cell Spacing in Order & Subscription Tables */
.custom-account-content td.order-actions,
.custom-account-content td.subscription-actions,
.custom-account-content td.woocommerce-orders-table__cell-order-actions,
.custom-account-content td.woocommerce-orders-table__cell-subscription-actions {
    white-space: nowrap !important;
}

/* Action buttons inside tables (Anzeigen/View, Rechnung/Invoice, etc.) */
.custom-account-content table.shop_table .button.view,
.custom-account-content table.shop_table .button.invoice,
.custom-account-content table.shop_table .button.order-actions-button,
.custom-account-content table.shop_table .woocommerce-button,
.custom-account-content td.order-actions a.button,
.custom-account-content td.subscription-actions a.button,
.custom-account-content td.woocommerce-orders-table__cell-order-actions a,
.custom-account-content td.woocommerce-orders-table__cell-subscription-actions a {
    background-color: #F8F8FC !important;
    color: #7B3FE4 !important;
    border: 1px solid #E5E5E5 !important;
    padding: 6px 14px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    margin-right: 8px !important;
    margin-top: 2px !important;
    margin-bottom: 2px !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    height: auto !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
}

.custom-account-content table.shop_table .button.view:last-child,
.custom-account-content table.shop_table .button.invoice:last-child,
.custom-account-content table.shop_table .button.order-actions-button:last-child,
.custom-account-content td.order-actions a:last-child,
.custom-account-content td.subscription-actions a:last-child,
.custom-account-content td.woocommerce-orders-table__cell-order-actions a:last-child,
.custom-account-content td.woocommerce-orders-table__cell-subscription-actions a:last-child {
    margin-right: 0 !important;
}

.custom-account-content table.shop_table .button.view:hover,
.custom-account-content table.shop_table .button.invoice:hover,
.custom-account-content table.shop_table .button.order-actions-button:hover,
.custom-account-content table.shop_table .woocommerce-button:hover,
.custom-account-content td.order-actions a.button:hover,
.custom-account-content td.subscription-actions a.button:hover,
.custom-account-content td.woocommerce-orders-table__cell-order-actions a:hover,
.custom-account-content td.woocommerce-orders-table__cell-subscription-actions a:hover {
    background-color: #EDE9FF !important;
    border-color: #7B3FE4 !important;
    color: #7B3FE4 !important;
}

/* =========================================================================
   Login Form Styling (WooCommerce & WordPress Native Login)
   ========================================================================= */
.custom-account-login-box {
    padding: 36px 32px !important;
}

.custom-account-login-box form#loginform,
.custom-account-login-box form.woocommerce-form-login {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0;
}

.custom-account-login-box form#loginform p {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.custom-account-login-box form#loginform label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111111;
}

.custom-account-login-box form#loginform input.input {
    width: 100%;
    box-sizing: border-box;
    border-radius: 10px;
    border: 1px solid #E5E5E5;
    background-color: #ffffff;
    color: #111111;
    padding: 10px 16px;
    height: 42px;
    font-family: inherit;
    font-size: 0.875rem;
    transition: all 0.25s ease;
}

.custom-account-login-box form#loginform input.input:focus {
    outline: none;
    border-color: #7B3FE4;
    box-shadow: 0 0 0 1px #7B3FE4;
}

.custom-account-login-box form#loginform p.login-remember {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin: 4px 0;
}

.custom-account-login-box form#loginform p.login-remember label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 400;
    color: #555555;
    cursor: pointer;
}

.custom-account-login-box form#loginform p.login-remember input[type="checkbox"] {
    accent-color: #7B3FE4;
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
}

.custom-account-login-box form#loginform p.login-submit {
    margin-top: 8px;
}

.custom-account-login-box form#loginform input#wp-submit {
    width: 100%;
    background-color: #7B3FE4 !important;
    color: #ffffff !important;
    padding: 12px 20px !important;
    border-radius: 10px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    cursor: pointer;
    border: none !important;
    box-shadow: 0 2px 6px rgba(123, 63, 228, 0.2) !important;
    text-shadow: none !important;
    transition: all 0.25s ease !important;
    height: auto !important;
}

.custom-account-login-box form#loginform input#wp-submit:hover {
    background-color: #5A2DB0 !important;
    box-shadow: 0 4px 12px rgba(123, 63, 228, 0.3) !important;
}

/* =========================================================================
   Custom Edit Account (Kontodetails) Form Styling
   ========================================================================= */
.custom-account-edit-header {
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 1px solid #E5E5E5;
}

.custom-account-section-title {
    font-size: 1.35rem !important;
    font-weight: 700 !important;
    color: #111111 !important;
    margin: 0 0 6px 0 !important;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.01em;
}

.custom-account-section-title .material-symbols-outlined {
    font-size: 1.5rem;
    color: #7B3FE4;
}

.custom-account-section-subtitle {
    font-size: 0.875rem !important;
    color: #64748B !important;
    margin: 0 !important;
    line-height: 1.5;
}

.custom-account-edit-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.custom-account-fieldset {
    background: #FFFFFF;
    border: 1px solid #E5E5E5 !important;
    border-radius: 12px !important;
    padding: 24px 26px !important;
    margin: 0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.custom-account-legend {
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    padding: 0 10px !important;
    color: #111111 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.custom-account-legend .material-symbols-outlined {
    font-size: 1.2rem;
    color: #7B3FE4;
}

.custom-account-fieldset-intro {
    font-size: 0.8125rem;
    color: #64748B;
    margin: -6px 0 18px 0;
    line-height: 1.45;
}

.custom-account-form-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    width: 100%;
}

@media (min-width: 768px) {
    .custom-account-form-grid-2 {
        grid-template-columns: 1fr 1fr;
    }
}

.custom-account-lock-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background-color: #F1F5F9;
    color: #64748B;
    border: 1px solid #CBD5E1;
    border-radius: 6px;
    font-size: 0.725rem;
    font-weight: 600;
    margin-left: 8px;
    vertical-align: middle;
    line-height: 1.2;
}

.custom-account-content input[readonly],
.custom-account-content .input-text.is-readonly {
    background-color: #F8F8FC !important;
    color: #64748B !important;
    border-color: #E2E8F0 !important;
    cursor: not-allowed !important;
    user-select: all;
}

.custom-account-content input[readonly]:focus,
.custom-account-content .input-text.is-readonly:focus {
    border-color: #CBD5E1 !important;
    box-shadow: none !important;
    outline: none !important;
}

.custom-account-field-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.775rem;
    color: #64748B;
    margin-top: 4px;
    line-height: 1.4;
}

.custom-account-field-hint .hint-icon {
    font-size: 15px;
    color: #94A3B8;
    flex-shrink: 0;
}

/* Password Input Wrapper with Toggle */
.custom-account-content .password-input-wrapper {
    position: relative;
    display: block;
    width: 100%;
}

.custom-account-content .password-input-wrapper input[type="password"],
.custom-account-content .password-input-wrapper input[type="text"] {
    padding-right: 2.75rem !important;
    width: 100% !important;
}

.custom-account-content .password-toggle-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%) !important;
    height: 2rem;
    width: 2rem;
    background-color: transparent !important;
    border: none !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748B !important;
    transition: all 0.2s ease;
    border-radius: 6px !important;
    box-shadow: none !important;
}

.custom-account-content .password-toggle-btn:hover,
.custom-account-content .password-toggle-btn:focus-visible {
    color: #7B3FE4 !important;
    background-color: #EDE9FF !important;
}

.custom-account-content .password-toggle-btn .material-symbols-outlined {
    font-size: 1.25rem;
}

/* Form Action Button */
.custom-account-form-actions {
    display: flex;
    justify-content: flex-start;
    margin-top: 8px;
}

.btn-account-save {
    background-color: #7B3FE4 !important;
    color: #ffffff !important;
    padding: 12px 24px !important;
    border-radius: 10px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    box-shadow: 0 2px 6px rgba(123, 63, 228, 0.25) !important;
}

.btn-account-save:hover {
    background-color: #5A2DB0 !important;
    box-shadow: 0 4px 12px rgba(123, 63, 228, 0.35) !important;
    transform: translateY(-1px);
}

.btn-account-save .material-symbols-outlined {
    font-size: 1.2rem;
}

/* Alert Boxes within Custom Account Content */
.custom-account-content .praxis-message-box {
    display: none;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 24px;
    border-radius: 8px;
    font-size: 0.875rem;
    line-height: 1.55;
    font-weight: 500;
    box-sizing: border-box;
    animation: praxisFadeSlideIn 0.25s ease-out;
}

@keyframes praxisFadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom-account-content .praxis-message-box.praxis-message-box--visible {
    display: flex;
}

.custom-account-content .praxis-message-box--success {
    background-color: #ECFDF5;
    border: 1px solid #A7F3D0;
    color: #065F46;
}

.custom-account-content .praxis-message-box--success .material-symbols-outlined {
    color: #059669;
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}

.custom-account-content .praxis-message-box--warning,
.custom-account-content .praxis-message-box--error {
    background-color: #FEF2F2;
    border: 1px solid #FECACA;
    color: #991B1B;
}

.custom-account-content .praxis-message-box--warning .material-symbols-outlined,
.custom-account-content .praxis-message-box--error .material-symbols-outlined {
    color: #DC2626;
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}

.custom-account-content .praxis-message-content {
    flex: 1;
    font-weight: 500;
    line-height: 1.55;
}