/**
 * My Account Page Styling
 * Fixes for addresses, payment methods, and account details
 */

/* ============================================
   FIX 1: Make "Add Address" Button Visible
   ============================================ */

/* Make "Add Billing address" button underlined and visible */
.woocommerce-account .woocommerce-MyAccount-content .addresses .edit {
    text-decoration: underline;
    font-weight: 600;
    color: var(--cpl-color-brand, #00f3ff) !important;
}

.woocommerce-account .woocommerce-MyAccount-content .addresses .edit:hover {
    color: #fff !important;
    text-decoration: none;
}

/* ============================================
   FIX 2: Payment Method Form Styling
   ============================================ */

/* Payment method form - Add background box and fix text contrast */
.woocommerce-account #add_payment_method {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 243, 255, 0.2);
    border-radius: 4px;
    padding: 30px;
    margin-top: 20px;
}

/* Fix dark-on-dark text issue */
.woocommerce-account #add_payment_method .woocommerce-PaymentBox,
.woocommerce-account #add_payment_method label,
.woocommerce-account #add_payment_method .input-text,
.woocommerce-account #add_payment_method select {
    color: #fff !important;
}

/* Payment method radio buttons - better visibility */
.woocommerce-account .woocommerce-PaymentMethod label {
    font-weight: 600;
    font-size: 1rem;
}

/* Payment box inside each method */
.woocommerce-account .payment_box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 243, 255, 0.15);
    padding: 20px;
    margin-top: 15px;
}

/* Form field labels inside payment box */
.woocommerce-account .payment_box label {
    color: #fff !important;
    font-weight: 500;
    display: block;
    margin-bottom: 8px;
}

/* Input fields inside payment box */
.woocommerce-account .payment_box .input-text,
.woocommerce-account .payment_box select {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
    border: 1px solid rgba(0, 243, 255, 0.3) !important;
}

/* ============================================
   FIX 3: Account Details Form Layout
   ============================================ */

/* Account details form - Responsive 2-column grid on desktop */
.woocommerce-account .woocommerce-EditAccountForm .account-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 20px 30px;
}

/* First and last name in first row */
.woocommerce-account .account-fields-grid .form-row-first,
.woocommerce-account .account-fields-grid .form-row-last {
    width: 100%;
    padding: 0;
    margin: 0;
}

/* Display name and email span full width (2 columns) */
.woocommerce-account .account-fields-grid .form-row-wide {
    grid-column: 1 / -1;
    width: 100%;
    padding: 0;
    margin: 0;
}

/* Password fieldset stays full width below grid */
.woocommerce-account .woocommerce-EditAccountForm fieldset {
    margin-top: 30px;
}

/* Mobile: Single column layout */
@media (max-width: 567.98px) {
    .woocommerce-account .woocommerce-EditAccountForm .account-fields-grid {
        grid-template-columns: 1fr;
    }

    .woocommerce-account .account-fields-grid .form-row-wide {
        grid-column: 1;
    }
}

/* ============================================
   FIX 4: Edit Address Form - Native Select Styling ONLY
   ============================================ */

/* EMERGENCY FIX: Use native browser select, no Select2/selectWoo */
.woocommerce-account select#billing_country,
.woocommerce-account select#shipping_country,
.woocommerce-checkout select#billing_country,
.woocommerce-checkout select#shipping_country {
    /* Force native select appearance */
    appearance: auto !important;
    -webkit-appearance: menulist !important;
    -moz-appearance: menulist !important;

    /* Basic styling */
    background-color: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(0, 243, 255, 0.3) !important;
    border-radius: 3px !important;
    color: #fff !important;
    padding: 10px 12px !important;
    font-size: 14px !important;
    width: 100% !important;
    min-height: 42px !important;
    cursor: pointer !important;

    /* Positioning */
    position: relative !important;
    display: block !important;
    z-index: 1 !important;
}

.woocommerce-account select#billing_country:focus,
.woocommerce-account select#shipping_country:focus,
.woocommerce-checkout select#billing_country:focus,
.woocommerce-checkout select#shipping_country:focus {
    border-color: rgba(0, 243, 255, 0.6) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(0, 243, 255, 0.1) !important;
}

/*
 * NOTE: Browser native select dropdowns don't reliably support custom styling
 * for option elements. Most browsers ignore background-color on options and use
 * their default white/light dropdown background with dark text.
 *
 * Forcing white text color here would make options unreadable (white on white).
 * Solution: Let the browser use its default option styling for readability.
 * The select itself (closed state) remains styled with our dark theme.
 */

/* CRITICAL: Force dark text on dropdown options for readability on white background */
.woocommerce-account select#billing_country option,
.woocommerce-account select#shipping_country option,
.woocommerce-checkout select#billing_country option,
.woocommerce-checkout select#shipping_country option {
    background-color: #ffffff !important;
    color: #000000 !important;
    padding: 8px 12px !important;
}

/* Form row styling for address fields - Account & Checkout pages */
.woocommerce-account .woocommerce-address-fields .form-row,
.woocommerce-checkout .woocommerce-billing-fields .form-row,
.woocommerce-checkout .woocommerce-shipping-fields .form-row,
.woocommerce-checkout .woocommerce-additional-fields .form-row {
    margin-bottom: 20px;
}

.woocommerce-account .woocommerce-address-fields .form-row label,
.woocommerce-checkout .woocommerce-billing-fields .form-row label,
.woocommerce-checkout .woocommerce-shipping-fields .form-row label,
.woocommerce-checkout .woocommerce-additional-fields .form-row label {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

.woocommerce-account .woocommerce-address-fields .form-row label .required,
.woocommerce-checkout .form-row label .required {
    color: #ff3366;
}

/* Text input fields in address form */
.woocommerce-account .woocommerce-address-fields input.input-text,
.woocommerce-account .woocommerce-address-fields select,
.woocommerce-checkout .woocommerce-billing-fields input.input-text,
.woocommerce-checkout .woocommerce-billing-fields select,
.woocommerce-checkout .woocommerce-shipping-fields input.input-text,
.woocommerce-checkout .woocommerce-shipping-fields select {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(0, 243, 255, 0.3) !important;
    color: #fff !important;
    padding: 10px 12px;
    border-radius: 3px;
    width: 100%;
}

.woocommerce-account .woocommerce-address-fields input.input-text:focus,
.woocommerce-account .woocommerce-address-fields select:focus,
.woocommerce-checkout .woocommerce-billing-fields input.input-text:focus,
.woocommerce-checkout .woocommerce-billing-fields select:focus,
.woocommerce-checkout .woocommerce-shipping-fields input.input-text:focus,
.woocommerce-checkout .woocommerce-shipping-fields select:focus {
    border-color: rgba(0, 243, 255, 0.6) !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 243, 255, 0.1);
}

/* Placeholder text */
.woocommerce-account .woocommerce-address-fields input.input-text::placeholder,
.woocommerce-checkout input.input-text::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Mobile responsiveness for country dropdowns */
@media (max-width: 767px) {
    /* Country select on mobile */
    .woocommerce-account select#billing_country,
    .woocommerce-account select#shipping_country,
    .woocommerce-checkout select#billing_country,
    .woocommerce-checkout select#shipping_country {
        font-size: 16px !important; /* Prevents iOS zoom on focus */
        padding: 12px 10px !important;
        min-height: 48px !important; /* Better touch target */
        width: 100% !important;
    }

    /* All form inputs on mobile */
    .woocommerce-account .woocommerce-address-fields input.input-text,
    .woocommerce-account .woocommerce-address-fields select,
    .woocommerce-checkout .woocommerce-billing-fields input.input-text,
    .woocommerce-checkout .woocommerce-billing-fields select,
    .woocommerce-checkout .woocommerce-shipping-fields input.input-text,
    .woocommerce-checkout .woocommerce-shipping-fields select {
        font-size: 16px !important; /* Prevents iOS zoom */
        min-height: 48px !important;
    }

    /* Form rows spacing on mobile */
    .woocommerce-account .woocommerce-address-fields .form-row,
    .woocommerce-checkout .woocommerce-billing-fields .form-row,
    .woocommerce-checkout .woocommerce-shipping-fields .form-row {
        margin-bottom: 15px;
    }

    /* Labels on mobile */
    .woocommerce-account .woocommerce-address-fields .form-row label,
    .woocommerce-checkout .woocommerce-billing-fields .form-row label,
    .woocommerce-checkout .woocommerce-shipping-fields .form-row label {
        font-size: 14px !important;
        margin-bottom: 6px;
    }
}

/* Extra small devices (phones in portrait) */
@media (max-width: 480px) {
    .woocommerce-account select#billing_country,
    .woocommerce-account select#shipping_country,
    .woocommerce-checkout select#billing_country,
    .woocommerce-checkout select#shipping_country {
        font-size: 15px !important;
        padding: 10px 8px !important;
    }
}

/* ============================================
   FIX 5: HyperPay Payment Form Styling
   ============================================ */

/* CRITICAL: Allow HyperPay select options to display */
.wpwl-control-brand option,
select.wpwl-control option {
    display: block !important;
}

/* HyperPay registration page - main container */
.woocommerce-account .woocommerce-MyAccount-content {
    color: #fff;
}

/* Payment widgets form container */
.paymentWidgets,
form.paymentWidgets {
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(0, 243, 255, 0.2) !important;
    border-radius: 8px !important;
    padding: 30px !important;
    margin: 20px auto !important;
    max-width: 600px !important;
}

/* HyperPay form wrapper */
.wpwl-form,
.wpwl-form-card {
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
}

/* All form groups in HyperPay widget */
.wpwl-group,
.wpwl-wrapper {
    margin-bottom: 20px !important;
}

/* Labels in HyperPay form - Make readable on dark background */
.wpwl-label,
.wpwl-label-brand,
.wpwl-label-cardNumber,
.wpwl-label-expiry,
.wpwl-label-cvv,
.wpwl-label-card\.holder,
.wpwl-wrapper label {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    margin-bottom: 8px !important;
    display: block !important;
    text-transform: none !important;
}

/* REGULAR INPUT FIELDS ONLY (not iframes) - Card holder name */
input.wpwl-control:not(.wpwl-control-iframe),
input.wpwl-control-card\.holder {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(0, 243, 255, 0.3) !important;
    border-radius: 4px !important;
    color: #fff !important;
    padding: 10px 12px !important;
    font-size: 14px !important;
    width: 100% !important;
    height: 40px !important;
    transition: all 0.3s ease !important;
}

input.wpwl-control:not(.wpwl-control-iframe):focus,
input.wpwl-control-card\.holder:focus {
    border-color: rgba(0, 243, 255, 0.6) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(0, 243, 255, 0.1) !important;
}

/* IFRAME CONTROLS - Card number, Expiry, CVV (DO NOT add padding/color to iframes) */
.wpwl-control-iframe,
iframe.wpwl-control-iframe {
    background: transparent !important;
    border: 1px solid rgba(0, 243, 255, 0.3) !important;
    border-radius: 4px !important;
    width: 100% !important;
    height: 40px !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Wrapper divs around iframe controls - for consistent spacing */
.wpwl-wrapper-cardNumber,
.wpwl-wrapper-expiry,
.wpwl-wrapper-cvv {
    position: relative;
}

/* Brand dropdown (select) - MUST allow options to display */
.wpwl-control-brand,
select.wpwl-control {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(0, 243, 255, 0.3) !important;
    border-radius: 4px !important;
    color: #fff !important;
    padding: 10px 36px 10px 12px !important;
    font-size: 14px !important;
    height: 40px !important;
    width: 100% !important;
    cursor: pointer !important;
    /* Native select styling */
    appearance: auto !important;
    -webkit-appearance: menulist !important;
    -moz-appearance: menulist !important;
}

/* Dropdown options MUST be visible */
.wpwl-control-brand option,
select.wpwl-control option {
    background: #1a1a2e !important;
    color: #fff !important;
    padding: 8px !important;
}

/* Brand icon wrapper */
.wpwl-wrapper-brand {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

/* Brand logo image */
.wpwl-brand-card,
.wpwl-brand-VISA,
.wpwl-brand-MASTER,
.wpwl-brand img {
    max-height: 24px !important;
    width: auto !important;
    filter: brightness(1.2) !important;
}

/* Submit button */
.wpwl-button,
.wpwl-button-pay,
button.wpwl-button-pay {
    background: linear-gradient(135deg, #00f3ff 0%, #0099cc 100%) !important;
    border: none !important;
    color: #000 !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    padding: 14px 30px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: all 0.3s ease !important;
    margin-top: 20px !important;
    width: auto !important;
    min-width: 200px !important;
    box-shadow: 0 4px 15px rgba(0, 243, 255, 0.3) !important;
}

.wpwl-button:hover,
.wpwl-button-pay:hover,
button.wpwl-button-pay:hover {
    background: linear-gradient(135deg, #00d4ff 0%, #0088bb 100%) !important;
    box-shadow: 0 6px 20px rgba(0, 243, 255, 0.5) !important;
    transform: translateY(-2px) !important;
}

.wpwl-button:active,
.wpwl-button-pay:active,
button.wpwl-button-pay:active {
    transform: translateY(0) !important;
}

/* Error messages */
.wpwl-hint,
.wpwl-hint-cardNumberError,
.wpwl-hint-expiryError,
.wpwl-hint-cvvError {
    color: #ff3366 !important;
    font-size: 12px !important;
    margin-top: 5px !important;
    display: block !important;
}

/* Placeholder text */
input.wpwl-control::placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
}

/* Checkbox for "Save card" */
.wpwl-checkbox {
    accent-color: #00f3ff !important;
    width: 18px !important;
    height: 18px !important;
    cursor: pointer !important;
}

.wpwl-label-custom,
label.wpwl-label-custom {
    color: rgba(255, 255, 255, 0.9) !important;
    cursor: pointer !important;
}

/* Registration groups (saved cards) */
.wpwl-group-registration {
    background: rgba(0, 0, 0, 0.2) !important;
    border: 2px solid rgba(0, 243, 255, 0.2) !important;
    border-radius: 8px !important;
    padding: 16px !important;
    margin-bottom: 15px !important;
    transition: all 0.3s ease !important;
}

.wpwl-group-registration.wpwl-selected {
    border-color: rgba(0, 243, 255, 0.8) !important;
    background: rgba(0, 243, 255, 0.05) !important;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2) !important;
}

.wpwl-group-registration .wpwl-container {
    color: #fff !important;
}

.wpwl-group-registration .card-type,
.wpwl-group-registration .card-info {
    color: #fff !important;
}

#wpwl-registrations {
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(0, 243, 255, 0.2) !important;
    border-radius: 8px !important;
    color: #fff !important;
}

/* Radio buttons */
.wpwl-container input[type="radio"] {
    accent-color: #00f3ff !important;
}

/* Custom label styling */
.customLabel {
    color: rgba(255, 255, 255, 0.9) !important;
}

.customLabel input[type="checkbox"] {
    accent-color: #00f3ff !important;
}

/* Responsive Design for HyperPay Form */
@media (max-width: 768px) {
    .paymentWidgets,
    form.paymentWidgets {
        padding: 20px !important;
        margin: 10px 0 !important;
        max-width: 100% !important;
    }

    .wpwl-button,
    .wpwl-button-pay,
    button.wpwl-button-pay {
        width: 100% !important;
        min-width: auto !important;
    }

    .wpwl-label,
    .wpwl-label-brand,
    .wpwl-label-cardNumber,
    .wpwl-label-expiry,
    .wpwl-label-cvv,
    .wpwl-label-card\.holder {
        font-size: 13px !important;
    }

    input.wpwl-control,
    .wpwl-control-brand,
    select.wpwl-control {
        font-size: 14px !important;
        height: 38px !important;
    }

    .wpwl-control-iframe,
    iframe.wpwl-control-iframe {
        height: 38px !important;
    }
}

@media (max-width: 480px) {
    .paymentWidgets,
    form.paymentWidgets {
        padding: 15px !important;
    }

    input.wpwl-control,
    .wpwl-control-brand,
    select.wpwl-control {
        font-size: 13px !important;
    }
}

/* ============================================
   FIX 6: ORDER HISTORY TABLE STYLING
   ============================================ */

/* Orders table container */
.woocommerce-orders-table.woocommerce-MyAccount-orders {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 243, 255, 0.2);
    border-radius: 8px;
    overflow: hidden;
}

/* Table header */
.woocommerce-orders-table thead {
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.15) 0%, rgba(0, 243, 255, 0.05) 100%);
}

.woocommerce-orders-table thead th {
    color: #00f3ff;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
    padding: 18px 15px;
    border-bottom: 2px solid rgba(0, 243, 255, 0.3);
    text-align: left;
}

/* Table body rows */
.woocommerce-orders-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.woocommerce-orders-table tbody tr:hover {
    background: rgba(0, 243, 255, 0.05);
}

.woocommerce-orders-table tbody tr:last-child {
    border-bottom: none;
}

.woocommerce-orders-table tbody th,
.woocommerce-orders-table tbody td {
    padding: 16px 15px;
    color: rgba(255, 255, 255, 0.9);
    vertical-align: middle;
}

/* Order number column - Link styling */
.woocommerce-orders-table__cell-order-number a {
    color: #00f3ff;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.woocommerce-orders-table__cell-order-number a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Order date */
.woocommerce-orders-table__cell-order-date time {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

/* Order status - Status badges */
.woocommerce-orders-table__cell-order-status {
    font-weight: 600;
    font-size: 13px;
    text-transform: capitalize;
}

/* Status-specific colors */
.woocommerce-orders-table__row--status-processing .woocommerce-orders-table__cell-order-status {
    color: #00f3ff;
}

.woocommerce-orders-table__row--status-completed .woocommerce-orders-table__cell-order-status {
    color: #00ff88;
}

.woocommerce-orders-table__row--status-on-hold .woocommerce-orders-table__cell-order-status {
    color: #ffaa00;
}

.woocommerce-orders-table__row--status-pending .woocommerce-orders-table__cell-order-status {
    color: #ffcc00;
}

.woocommerce-orders-table__row--status-cancelled .woocommerce-orders-table__cell-order-status,
.woocommerce-orders-table__row--status-failed .woocommerce-orders-table__cell-order-status,
.woocommerce-orders-table__row--status-refunded .woocommerce-orders-table__cell-order-status {
    color: #ff3366;
}

/* Order total */
.woocommerce-orders-table__cell-order-total {
    font-weight: 700;
    color: #00f3ff;
    font-size: 15px;
}

/* Order actions - Buttons */
.woocommerce-orders-table__cell-order-actions {
    text-align: right;
}

.woocommerce-orders-table__cell-order-actions .button {
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.2) 0%, rgba(0, 243, 255, 0.1) 100%);
    border: 1px solid rgba(0, 243, 255, 0.4);
    color: #00f3ff !important;
    font-weight: 600;
    font-size: 12px;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    display: inline-block;
    margin-left: 5px;
}

.woocommerce-orders-table__cell-order-actions .button:hover {
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.3) 0%, rgba(0, 243, 255, 0.2) 100%);
    border-color: rgba(0, 243, 255, 0.6);
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(0, 243, 255, 0.2);
    transform: translateY(-1px);
}

/* Empty state */
.woocommerce-account .woocommerce-message {
    background: rgba(0, 0, 0, 0.3);
    border-left: 4px solid #00f3ff;
    border-radius: 4px;
    padding: 20px;
    color: rgba(255, 255, 255, 0.9);
}

.woocommerce-account .woocommerce-message a.button {
    background: linear-gradient(135deg, #00f3ff 0%, #0099cc 100%);
    border: none;
    color: #000 !important;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    margin-left: 10px;
}

.woocommerce-account .woocommerce-message a.button:hover {
    background: linear-gradient(135deg, #00d4ff 0%, #0088bb 100%);
    box-shadow: 0 4px 15px rgba(0, 243, 255, 0.3);
    transform: translateY(-1px);
}

/* Pagination */
.woocommerce-pagination {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.woocommerce-pagination .button {
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid rgba(0, 243, 255, 0.3);
    color: #00f3ff !important;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.woocommerce-pagination .button:hover {
    background: rgba(0, 243, 255, 0.2);
    border-color: rgba(0, 243, 255, 0.5);
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(0, 243, 255, 0.2);
}

/* ============================================
   RESPONSIVE - ORDER HISTORY TABLE
   ============================================ */

@media (max-width: 768px) {
    /* Stack table cells vertically on mobile */
    .woocommerce-orders-table thead {
        display: none;
    }

    .woocommerce-orders-table tbody tr {
        display: block;
        margin-bottom: 20px;
        border: 1px solid rgba(0, 243, 255, 0.2);
        border-radius: 6px;
        overflow: hidden;
    }

    .woocommerce-orders-table tbody th,
    .woocommerce-orders-table tbody td {
        display: flex;
        justify-content: space-between;
        padding: 12px 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        text-align: right;
    }

    .woocommerce-orders-table tbody th:last-child,
    .woocommerce-orders-table tbody td:last-child {
        border-bottom: none;
    }

    /* Show data-title as label on mobile */
    .woocommerce-orders-table tbody th::before,
    .woocommerce-orders-table tbody td::before {
        content: attr(data-title);
        font-weight: 700;
        color: #00f3ff;
        text-transform: uppercase;
        font-size: 12px;
        letter-spacing: 0.5px;
        flex-shrink: 0;
        margin-right: 15px;
    }

    .woocommerce-orders-table__cell-order-actions {
        text-align: right;
        flex-direction: column;
        align-items: flex-end;
    }

    .woocommerce-orders-table__cell-order-actions .button {
        margin: 5px 0 0 0;
        width: auto;
    }
}

@media (max-width: 480px) {
    .woocommerce-orders-table tbody th,
    .woocommerce-orders-table tbody td {
        padding: 10px 12px;
        font-size: 13px;
    }

    .woocommerce-orders-table tbody th::before,
    .woocommerce-orders-table tbody td::before {
        font-size: 11px;
    }

    .woocommerce-orders-table__cell-order-actions .button {
        font-size: 11px;
        padding: 6px 12px;
    }
}

/* ============================================
   FIX 7: WISHLIST TABLE STYLING
   ============================================ */

/* Force full-width layout - Remove sidebar on My Account and wishlist pages */
body.woocommerce-account #primary.content-area,
body.page-id-wishlist #primary.content-area {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
}

body.woocommerce-account #main.site-main,
body.page-id-wishlist #main.site-main {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    float: none !important;
}

/* Hide sidebar on My Account pages */
body.woocommerce-account aside.sidebar,
body.woocommerce-account .widget-area,
body.page-id-wishlist aside.sidebar,
body.page-id-wishlist .widget-area {
    display: none !important;
}

/* Ensure wishlist table uses full width */
.woocommerce-account .woocommerce-MyAccount-content .wishlist_table {
    max-width: 100%;
}

/* Main wishlist container */
.wishlist_table.wishlist_view {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 243, 255, 0.2);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
}

/* Table header */
.wishlist_table thead {
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.15) 0%, rgba(0, 243, 255, 0.05) 100%);
}

.wishlist_table thead th {
    color: #00f3ff !important;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
    padding: 18px 15px;
    border-bottom: 2px solid rgba(0, 243, 255, 0.3);
    text-align: left;
}

/* Table body rows */
.wishlist_table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.wishlist_table tbody tr:hover {
    background: rgba(0, 243, 255, 0.05);
}

.wishlist_table tbody tr:last-child {
    border-bottom: none;
}

.wishlist_table tbody th,
.wishlist_table tbody td {
    padding: 16px 15px;
    color: rgba(255, 255, 255, 0.9);
    vertical-align: middle;
}

/* Product thumbnail */
.wishlist_table .product-thumbnail {
    width: 100px;
}

.wishlist_table .product-thumbnail img {
    border-radius: 4px;
    border: 1px solid rgba(0, 243, 255, 0.2);
    transition: all 0.3s ease;
}

.wishlist_table .product-thumbnail img:hover {
    border-color: rgba(0, 243, 255, 0.5);
    box-shadow: 0 4px 15px rgba(0, 243, 255, 0.2);
    transform: scale(1.05);
}

/* Product name */
.wishlist_table .product-name a {
    color: #00f3ff;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.wishlist_table .product-name a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Product price */
.wishlist_table .product-price {
    font-weight: 700;
    color: #00f3ff;
    font-size: 15px;
}

.wishlist_table .product-price .amount {
    color: #00f3ff;
}

/* Stock status */
.wishlist_table .product-stock-status {
    font-weight: 600;
    font-size: 13px;
}

.wishlist_table .wishlist-in-stock {
    color: #00ff88;
}

.wishlist_table .wishlist-out-of-stock {
    color: #ff3366;
}

/* Remove button */
.wishlist_table .product-remove a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: rgba(255, 51, 102, 0.15);
    border: 1px solid rgba(255, 51, 102, 0.3);
    border-radius: 4px;
    color: #ff3366 !important;
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    line-height: 1;
}

.wishlist_table .product-remove a:hover {
    background: rgba(255, 51, 102, 0.25);
    border-color: rgba(255, 51, 102, 0.5);
    color: #fff !important;
    transform: scale(1.1);
}

/* Add to cart button in table */
.wishlist_table .product-add-to-cart .button {
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.2) 0%, rgba(0, 243, 255, 0.1) 100%);
    border: 1px solid rgba(0, 243, 255, 0.4);
    color: #00f3ff !important;
    font-weight: 600;
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    display: inline-block;
}

.wishlist_table .product-add-to-cart .button:hover {
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.3) 0%, rgba(0, 243, 255, 0.2) 100%);
    border-color: rgba(0, 243, 255, 0.6);
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(0, 243, 255, 0.2);
    transform: translateY(-1px);
}

/* Quantity input */
.wishlist_table .product-quantity input[type="number"] {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(0, 243, 255, 0.3);
    color: #fff;
    padding: 8px 10px;
    border-radius: 4px;
    width: 70px;
    text-align: center;
}

.wishlist_table .product-quantity input[type="number"]:focus {
    border-color: rgba(0, 243, 255, 0.6);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 243, 255, 0.1);
}

/* Empty state */
.wishlist_table .wishlist-empty {
    padding: 40px 20px !important;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
}

/* Wishlist actions after table */
.wishlist-table-after-table,
.yith-wcwl-share {
    margin-top: 20px;
}

/* Edit button and other action buttons */
.woocommerce-account .wishlist_manage_table .button,
.woocommerce-account .yith-wcwl-wishlist-new button,
.woocommerce-account a.show-title-form {
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.2) 0%, rgba(0, 243, 255, 0.1) 100%);
    border: 1px solid rgba(0, 243, 255, 0.4);
    color: #00f3ff !important;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    display: inline-block;
}

.woocommerce-account .wishlist_manage_table .button:hover,
.woocommerce-account .yith-wcwl-wishlist-new button:hover,
.woocommerce-account a.show-title-form:hover {
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.3) 0%, rgba(0, 243, 255, 0.2) 100%);
    border-color: rgba(0, 243, 255, 0.6);
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(0, 243, 255, 0.2);
    transform: translateY(-1px);
}

/* Checkbox styling */
.wishlist_table .product-checkbox input[type="checkbox"],
.wishlist_table #bulk_add_to_cart {
    accent-color: #00f3ff;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Move to another wishlist dropdown */
.wishlist_table .change-wishlist {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(0, 243, 255, 0.3);
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
}

.wishlist_table .change-wishlist:focus {
    border-color: rgba(0, 243, 255, 0.6);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 243, 255, 0.1);
}

/* Date added */
.wishlist_table .dateadded {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    display: block;
    margin-bottom: 8px;
}

/* ============================================
   RESPONSIVE - WISHLIST TABLE
   ============================================ */

@media (max-width: 768px) {
    /* Stack table cells vertically on mobile */
    .wishlist_table thead {
        display: none;
    }

    .wishlist_table tbody tr {
        display: block;
        margin-bottom: 20px;
        border: 1px solid rgba(0, 243, 255, 0.2);
        border-radius: 6px;
        overflow: hidden;
    }

    .wishlist_table tbody th,
    .wishlist_table tbody td {
        display: flex;
        justify-content: space-between;
        padding: 12px 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        text-align: right;
    }

    .wishlist_table tbody th:last-child,
    .wishlist_table tbody td:last-child {
        border-bottom: none;
    }

    /* Product thumbnail takes full width on mobile */
    .wishlist_table .product-thumbnail {
        width: 100%;
        display: flex;
        justify-content: center;
        padding: 15px !important;
    }

    .wishlist_table .product-thumbnail img {
        max-width: 200px;
    }

    /* Product name, price, etc. show label */
    .wishlist_table tbody .product-name::before {
        content: "Product:";
        font-weight: 700;
        color: #00f3ff;
        text-transform: uppercase;
        font-size: 12px;
        margin-right: 10px;
    }

    .wishlist_table tbody .product-price::before {
        content: "Price:";
        font-weight: 700;
        color: #00f3ff;
        text-transform: uppercase;
        font-size: 12px;
        margin-right: 10px;
    }

    .wishlist_table tbody .product-stock-status::before {
        content: "Stock:";
        font-weight: 700;
        color: #00f3ff;
        text-transform: uppercase;
        font-size: 12px;
        margin-right: 10px;
    }

    .wishlist_table tbody .product-quantity::before {
        content: "Qty:";
        font-weight: 700;
        color: #00f3ff;
        text-transform: uppercase;
        font-size: 12px;
        margin-right: 10px;
    }

    .wishlist_table .product-add-to-cart {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .wishlist_table .product-add-to-cart .button {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .wishlist_table tbody th,
    .wishlist_table tbody td {
        padding: 10px 12px;
        font-size: 13px;
    }

    .wishlist_table .product-thumbnail img {
        max-width: 150px;
    }

    .wishlist_table .product-add-to-cart .button {
        font-size: 12px;
        padding: 8px 12px;
    }
}
