/* ==========================================================================
   TalPress – WooCommerce My Account Overhaul
   Version 1.0.0
   ========================================================================== */

/* ---------- CSS Variables (scoped to account page) ---------- */
.woocommerce-account {
    --tp-blue: #3858E9;
    --tp-blue-hover: #2c47c4;
    --tp-blue-light: #eef1fd;
    --tp-navy: #1c1c5c;
    --tp-orange: #ff531a;
    --tp-orange-end: #e57e17;
    --tp-green: #2ecc71;
    --tp-green-bg: #eafaf1;
    --tp-red: #e74c3c;
    --tp-red-bg: #fdedec;
    --tp-yellow: #f39c12;
    --tp-yellow-bg: #fef9e7;
    --tp-dark: #222;
    --tp-text: #444;
    --tp-text-light: #777;
    --tp-border: #e5e7eb;
    --tp-bg: #f7f8fa;
    --tp-white: #fff;
    --tp-radius: 8px;
    --tp-radius-sm: 6px;
    --tp-shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --tp-shadow-md: 0 4px 12px rgba(0,0,0,.08);
    --tp-transition: .25s ease;
    --tp-font: var(--e-global-typography-text-font-family, "Heebo", sans-serif);
}

/* ---------- Page wrapper ---------- */
.woocommerce-account .woocommerce {
    max-width: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0;
    align-items: flex-start;
    font-family: var(--tp-font);
}

/* ---------- Navigation Sidebar ---------- */
.woocommerce-MyAccount-navigation {
    width: 260px;
    min-width: 260px;
    background: var(--tp-white);
    border-radius: var(--tp-radius);
    box-shadow: var(--tp-shadow);
    overflow: hidden;
    position: sticky;
    top: 100px;
}

.woocommerce-MyAccount-navigation ul {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

.woocommerce-MyAccount-navigation ul li {
    margin: 0;
    padding: 0;
}

.woocommerce-MyAccount-navigation ul li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: var(--tp-text);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all var(--tp-transition);
    border-right: 3px solid transparent;
    position: relative;
}

[dir="ltr"] .woocommerce-MyAccount-navigation ul li a {
    border-right: none;
    border-left: 3px solid transparent;
}

.woocommerce-MyAccount-navigation ul li a:hover {
    background: var(--tp-blue-light);
    color: var(--tp-blue);
}

.woocommerce-MyAccount-navigation ul li.is-active a {
    background: var(--tp-blue-light);
    color: var(--tp-blue);
    font-weight: 600;
    border-right-color: var(--tp-blue);
}

[dir="ltr"] .woocommerce-MyAccount-navigation ul li.is-active a {
    border-right-color: transparent;
    border-left-color: var(--tp-blue);
}

/* Nav icons via ::before */
.woocommerce-MyAccount-navigation ul li a::before {
    content: "";
    display: inline-flex;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: .55;
    transition: opacity var(--tp-transition);
}

.woocommerce-MyAccount-navigation ul li a:hover::before,
.woocommerce-MyAccount-navigation ul li.is-active a::before {
    opacity: 1;
}

.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--dashboard a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233858E9' 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");
}

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

.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--downloads a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233858E9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 01-2 2H5a2 2 0 01-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");
}

.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--edit-address a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233858E9' 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 0118 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
}

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

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

.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--customer-logout a {
    color: var(--tp-red);
}

.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--customer-logout a:hover {
    background: var(--tp-red-bg);
}

/* Licenses nav icon */
.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--licenses a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233858E9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0110 0v4'/%3E%3C/svg%3E");
}

/* Subscriptions nav icon */
.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--subscriptions a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233858E9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M23 4v6h-6'/%3E%3Cpath d='M1 20v-6h6'/%3E%3Cpath d='M3.51 9a9 9 0 0114.85-3.36L23 10'/%3E%3Cpath d='M20.49 15a9 9 0 01-14.85 3.36L1 14'/%3E%3C/svg%3E");
}

/* Payment methods nav icon */
.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--payment-methods a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233858E9' 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");
}

/* ---------- Content Area ---------- */
.woocommerce-MyAccount-content {
    flex: 1;
    min-width: 0;
    max-width: calc(100% - 292px);
    background: var(--tp-white);
    border-radius: var(--tp-radius);
    box-shadow: var(--tp-shadow);
    padding: 32px;
    margin-right: 32px;
    overflow-x: auto;
    box-sizing: border-box;
}

[dir="ltr"] .woocommerce-MyAccount-content {
    margin-right: 0;
    margin-left: 32px;
}

/* Force all tables inside content to respect container width */
.woocommerce-MyAccount-content table {
    max-width: 100%;
}

/* Order detail tables */
.woocommerce-MyAccount-content .shop_table.order_details,
.woocommerce-MyAccount-content .woocommerce-table--order-details,
.woocommerce-MyAccount-content .woocommerce-customer-details {
    width: 100%;
    table-layout: auto;
}

/* ---------- Dashboard ---------- */
.woocommerce-MyAccount-content > p:first-child {
    font-size: 16px;
    line-height: 1.7;
    color: var(--tp-text);
    background: linear-gradient(135deg, var(--tp-blue-light) 0%, #f0f4ff 100%);
    padding: 24px;
    border-radius: var(--tp-radius-sm);
    margin-bottom: 24px;
    border-right: 4px solid var(--tp-blue);
}

[dir="ltr"] .woocommerce-MyAccount-content > p:first-child {
    border-right: none;
    border-left: 4px solid var(--tp-blue);
}

.woocommerce-MyAccount-content > p:first-child a {
    color: var(--tp-blue);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dashed var(--tp-blue);
    transition: all var(--tp-transition);
}

.woocommerce-MyAccount-content > p:first-child a:hover {
    border-bottom-style: solid;
}

/* ---------- Headings ---------- */
.woocommerce-MyAccount-content h2,
.woocommerce-MyAccount-content h3 {
    font-family: var(--tp-font);
    color: var(--tp-dark);
    margin-top: 0;
}

/* ---------- General Buttons ---------- */
.woocommerce-account .woocommerce-button,
.woocommerce-account .button,
.woocommerce-account button[type="submit"],
.woocommerce-account input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--tp-blue);
    color: var(--tp-white) !important;
    border: none;
    border-radius: var(--tp-radius-sm);
    font-family: var(--tp-font);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--tp-transition);
    text-decoration: none;
    line-height: 1.4;
    min-height: 44px;
    letter-spacing: .2px;
    text-shadow: 0 1px 1px rgba(0,0,0,.1);
    white-space: nowrap;
}

.woocommerce-account .woocommerce-button:hover,
.woocommerce-account .button:hover,
.woocommerce-account button[type="submit"]:hover,
.woocommerce-account input[type="submit"]:hover {
    background: var(--tp-blue-hover);
    box-shadow: var(--tp-shadow-md);
    transform: translateY(-1px);
}

.woocommerce-account .woocommerce-button:active,
.woocommerce-account .button:active,
.woocommerce-account button[type="submit"]:active,
.woocommerce-account input[type="submit"]:active {
    transform: translateY(0);
}

/* Anchor links styled as buttons – force readable white text */
.woocommerce-account a.button,
.woocommerce-account a.woocommerce-button,
.woocommerce-account .order-again a.button {
    background: var(--tp-blue) !important;
    color: var(--tp-white) !important;
    text-decoration: none !important;
    border-bottom: none !important;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--tp-radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    line-height: 1.4;
}

.woocommerce-account a.button:hover,
.woocommerce-account a.woocommerce-button:hover,
.woocommerce-account .order-again a.button:hover {
    background: var(--tp-blue-hover) !important;
    color: var(--tp-white) !important;
    box-shadow: var(--tp-shadow-md);
    transform: translateY(-1px);
}

.woocommerce-account .order-again {
    margin-top: 24px;
}

/* Secondary / outline buttons */
.woocommerce-account .woocommerce-button--secondary,
.woocommerce-account .button.alt {
    background: transparent;
    color: var(--tp-blue) !important;
    border: 1.5px solid var(--tp-blue);
}

.woocommerce-account .woocommerce-button--secondary:hover,
.woocommerce-account .button.alt:hover {
    background: var(--tp-blue);
    color: var(--tp-white) !important;
}

/* ---------- Forms ---------- */
.woocommerce-account .woocommerce-form-row,
.woocommerce-account .form-row {
    margin-bottom: 20px;
}

.woocommerce-account .woocommerce-form-row label,
.woocommerce-account .form-row label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--tp-dark);
    margin-bottom: 6px;
}

.woocommerce-account .woocommerce-form-row label .required,
.woocommerce-account .form-row label .required {
    color: var(--tp-red);
}

.woocommerce-account input[type="text"],
.woocommerce-account input[type="email"],
.woocommerce-account input[type="tel"],
.woocommerce-account input[type="password"],
.woocommerce-account input[type="number"],
.woocommerce-account input[type="url"],
.woocommerce-account select,
.woocommerce-account textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--tp-border);
    border-radius: var(--tp-radius-sm);
    font-family: var(--tp-font);
    font-size: 15px;
    color: var(--tp-dark);
    background: var(--tp-white);
    transition: border-color var(--tp-transition), box-shadow var(--tp-transition);
    box-sizing: border-box;
    min-height: 44px;
}

.woocommerce-account input[type="text"]:focus,
.woocommerce-account input[type="email"]:focus,
.woocommerce-account input[type="tel"]:focus,
.woocommerce-account input[type="password"]:focus,
.woocommerce-account input[type="number"]:focus,
.woocommerce-account input[type="url"]:focus,
.woocommerce-account select:focus,
.woocommerce-account textarea:focus {
    outline: none;
    border-color: var(--tp-blue);
    box-shadow: 0 0 0 3px rgba(56, 88, 233, .12);
}

/* Password fieldset */
.woocommerce-account fieldset {
    border: 1.5px solid var(--tp-border);
    border-radius: var(--tp-radius);
    padding: 24px;
    margin: 28px 0;
    background: var(--tp-bg);
}

.woocommerce-account fieldset legend {
    font-size: 16px;
    font-weight: 700;
    color: var(--tp-dark);
    padding: 0 8px;
}

/* ---------- Shared table foundation ---------- */
.woocommerce-orders-table,
.woocommerce-MyAccount-content table.shop_table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: none;
    border-radius: var(--tp-radius);
    overflow: hidden;
    font-size: 14px;
    box-shadow: 0 0 0 1.5px var(--tp-border);
    table-layout: auto;
}

.woocommerce-orders-table thead,
.woocommerce-MyAccount-content table.shop_table thead {
    background: var(--tp-navy);
}

.woocommerce-orders-table thead th,
.woocommerce-MyAccount-content table.shop_table thead th {
    padding: 16px 20px;
    font-weight: 600;
    color: var(--tp-white);
    text-align: start;
    font-size: 13px;
    letter-spacing: .4px;
    border: none;
    white-space: nowrap;
    line-height: 1.4;
}

.woocommerce-orders-table tbody tr,
.woocommerce-MyAccount-content table.shop_table tbody tr {
    transition: background var(--tp-transition);
}

.woocommerce-orders-table tbody tr:nth-child(odd),
.woocommerce-MyAccount-content table.shop_table tbody tr:nth-child(odd) {
    background: var(--tp-white);
}

.woocommerce-orders-table tbody tr:nth-child(even),
.woocommerce-MyAccount-content table.shop_table tbody tr:nth-child(even) {
    background: var(--tp-bg);
}

.woocommerce-orders-table tbody tr:hover,
.woocommerce-MyAccount-content table.shop_table tbody tr:hover {
    background: var(--tp-blue-light);
}

.woocommerce-orders-table tbody td,
.woocommerce-MyAccount-content table.shop_table tbody td {
    padding: 16px 20px;
    color: var(--tp-text);
    border-bottom: 1px solid var(--tp-border);
    vertical-align: middle;
    line-height: 1.6;
    font-size: 14px;
}

.woocommerce-orders-table tbody tr:last-child td,
.woocommerce-MyAccount-content table.shop_table tbody tr:last-child td {
    border-bottom: none;
}

/* Order number link */
.woocommerce-orders-table .woocommerce-orders-table__cell-order-number a {
    color: var(--tp-blue);
    font-weight: 700;
    text-decoration: none;
    font-size: 15px;
}

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

/* Order status badges */
.woocommerce-orders-table .woocommerce-orders-table__cell-order-status {
    white-space: nowrap;
}

/* Table action buttons – compact, high contrast, readable labels */
.woocommerce-orders-table .woocommerce-button,
.woocommerce-MyAccount-content table.shop_table .woocommerce-button,
.woocommerce-orders-table .button,
.woocommerce-MyAccount-content table.shop_table .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 20px;
    font-size: 13px;
    font-weight: 600;
    min-height: 38px;
    border-radius: var(--tp-radius-sm);
    background: var(--tp-blue);
    color: var(--tp-white) !important;
    border: none;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.3;
    letter-spacing: .2px;
    cursor: pointer;
    transition: all var(--tp-transition);
}

.woocommerce-orders-table .woocommerce-button:hover,
.woocommerce-MyAccount-content table.shop_table .woocommerce-button:hover,
.woocommerce-orders-table .button:hover,
.woocommerce-MyAccount-content table.shop_table .button:hover {
    background: var(--tp-blue-hover);
    box-shadow: 0 2px 8px rgba(56, 88, 233, .25);
    transform: translateY(-1px);
}

/* Actions column – keep buttons from stretching */
.woocommerce-orders-table .woocommerce-orders-table__cell-order-actions {
    white-space: nowrap;
    text-align: end;
}

/* ---------- Order Status Badges ---------- */
.woocommerce-account mark.order-status {
    background: none;
    font-weight: 600;
    font-size: 13px;
    padding: 6px 14px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
}

.woocommerce-account mark.order-status::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.woocommerce-account mark.order-status.status-processing {
    background: var(--tp-blue-light);
    color: var(--tp-blue);
}
.woocommerce-account mark.order-status.status-processing::before {
    background: var(--tp-blue);
}

.woocommerce-account mark.order-status.status-completed {
    background: var(--tp-green-bg);
    color: #1a7a42;
}
.woocommerce-account mark.order-status.status-completed::before {
    background: var(--tp-green);
}

.woocommerce-account mark.order-status.status-on-hold,
.woocommerce-account mark.order-status.status-pending {
    background: var(--tp-yellow-bg);
    color: #8a6d0b;
}
.woocommerce-account mark.order-status.status-on-hold::before,
.woocommerce-account mark.order-status.status-pending::before {
    background: var(--tp-yellow);
}

.woocommerce-account mark.order-status.status-cancelled,
.woocommerce-account mark.order-status.status-refunded,
.woocommerce-account mark.order-status.status-failed {
    background: var(--tp-red-bg);
    color: var(--tp-red);
}
.woocommerce-account mark.order-status.status-cancelled::before,
.woocommerce-account mark.order-status.status-refunded::before,
.woocommerce-account mark.order-status.status-failed::before {
    background: var(--tp-red);
}

/* ---------- Addresses ---------- */
.woocommerce-account .woocommerce-Addresses {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.woocommerce-account .woocommerce-Address {
    border: 1.5px solid var(--tp-border);
    border-radius: var(--tp-radius);
    padding: 24px;
    position: relative;
    transition: box-shadow var(--tp-transition);
}

.woocommerce-account .woocommerce-Address:hover {
    box-shadow: var(--tp-shadow-md);
}

.woocommerce-account .woocommerce-Address .woocommerce-Address-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1.5px solid var(--tp-border);
}

.woocommerce-account .woocommerce-Address .woocommerce-Address-title h3 {
    margin: 0;
    font-size: 17px;
    color: var(--tp-dark);
}

.woocommerce-account .woocommerce-Address .woocommerce-Address-title .edit {
    color: var(--tp-blue);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    padding: 6px 14px;
    border: 1.5px solid var(--tp-blue);
    border-radius: var(--tp-radius-sm);
    transition: all var(--tp-transition);
}

.woocommerce-account .woocommerce-Address .woocommerce-Address-title .edit:hover {
    background: var(--tp-blue);
    color: var(--tp-white);
}

.woocommerce-account .woocommerce-Address address {
    font-style: normal;
    color: var(--tp-text);
    line-height: 1.8;
    font-size: 14px;
}

/* ---------- WooCommerce Notices ---------- */
.woocommerce-account .woocommerce-message,
.woocommerce-account .woocommerce-info,
.woocommerce-account .woocommerce-error {
    padding: 16px 20px;
    border-radius: var(--tp-radius-sm);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    line-height: 1.5;
    border: none;
    list-style: none;
}

.woocommerce-account .woocommerce-message::before,
.woocommerce-account .woocommerce-info::before,
.woocommerce-account .woocommerce-error::before {
    font-size: 18px;
    flex-shrink: 0;
}

.woocommerce-account .woocommerce-message {
    background: var(--tp-green-bg);
    color: #1a7a42;
    border-right: 4px solid var(--tp-green);
}

[dir="ltr"] .woocommerce-account .woocommerce-message {
    border-right: none;
    border-left: 4px solid var(--tp-green);
}

.woocommerce-account .woocommerce-info {
    background: var(--tp-blue-light);
    color: var(--tp-navy);
    border-right: 4px solid var(--tp-blue);
}

[dir="ltr"] .woocommerce-account .woocommerce-info {
    border-right: none;
    border-left: 4px solid var(--tp-blue);
}

.woocommerce-account .woocommerce-error {
    background: var(--tp-red-bg);
    color: #c0392b;
    border-right: 4px solid var(--tp-red);
}

[dir="ltr"] .woocommerce-account .woocommerce-error {
    border-right: none;
    border-left: 4px solid var(--tp-red);
}

.woocommerce-account .woocommerce-error li {
    list-style: none;
}

/* ---------- Login / Register Forms ---------- */
.woocommerce-account .u-columns {
    display: flex;
    gap: 32px;
}

.woocommerce-account .u-columns .u-column1,
.woocommerce-account .u-columns .u-column2 {
    flex: 1;
    min-width: 0;
}

.woocommerce-account .woocommerce-form-login,
.woocommerce-account .woocommerce-form-register {
    background: var(--tp-white);
    border: 1.5px solid var(--tp-border);
    border-radius: var(--tp-radius);
    padding: 32px;
}

.woocommerce-account .woocommerce-form-login h2,
.woocommerce-account .woocommerce-form-register h2 {
    font-size: 22px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--tp-blue);
    display: inline-block;
}

/* Remember me checkbox */
.woocommerce-account .woocommerce-form-login .woocommerce-form-login__rememberme {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 16px 0;
    font-size: 14px;
    color: var(--tp-text);
}

.woocommerce-account .lost_password a {
    color: var(--tp-blue);
    font-size: 14px;
    text-decoration: none;
}

.woocommerce-account .lost_password a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   TalPress Licenses Table (.tlm-licenses-table)
   ========================================================================== */
.tlm-licenses-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: none;
    border-radius: var(--tp-radius);
    overflow: hidden;
    font-size: 14px;
    box-shadow: 0 0 0 1.5px var(--tp-border), var(--tp-shadow-md);
    table-layout: fixed;
}

.tlm-licenses-table thead {
    background: linear-gradient(135deg, var(--tp-navy) 0%, #2d2d7c 100%);
}

.tlm-licenses-table thead th {
    padding: 16px 20px;
    font-weight: 600;
    color: var(--tp-white);
    text-align: start;
    font-size: 13px;
    letter-spacing: .4px;
    border: none;
    line-height: 1.4;
}

/* Column widths for consistent alignment */
.tlm-licenses-table thead th:nth-child(1) { width: 22%; }
.tlm-licenses-table thead th:nth-child(2) { width: 30%; }
.tlm-licenses-table thead th:nth-child(3) { width: 20%; }
.tlm-licenses-table thead th:nth-child(4) { width: 15%; }
.tlm-licenses-table thead th:nth-child(5) { width: 13%; }

.tlm-licenses-table tbody tr {
    transition: background var(--tp-transition);
}

.tlm-licenses-table tbody tr:nth-child(odd) {
    background: var(--tp-white);
}

.tlm-licenses-table tbody tr:nth-child(even) {
    background: var(--tp-bg);
}

.tlm-licenses-table tbody tr:hover {
    background: var(--tp-blue-light);
}

.tlm-licenses-table tbody td {
    padding: 18px 20px;
    color: var(--tp-text);
    border-bottom: 1px solid var(--tp-border);
    vertical-align: middle;
    line-height: 1.6;
    font-size: 14px;
}

.tlm-licenses-table tbody tr:last-child td {
    border-bottom: none;
}

/* Product name – bold, dark, right-aligned */
.tlm-licenses-table tbody td:first-child {
    font-weight: 700;
    color: var(--tp-dark);
    font-size: 14px;
    text-align: right;
}

[dir="ltr"] .tlm-licenses-table tbody td:first-child {
    text-align: left;
}

/* License key – monospace pill with proper alignment */
.tlm-license-key {
    display: inline-block;
    background: linear-gradient(135deg, #f0f2f5 0%, #e8eaf0 100%);
    border: 1px solid var(--tp-border);
    border-radius: 6px;
    padding: 8px 14px;
    font-family: "SF Mono", "Fira Code", "Courier New", Courier, monospace;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1.5px;
    color: var(--tp-navy);
    word-break: break-all;
    user-select: all;
    direction: ltr;
    line-height: 1.3;
    vertical-align: middle;
}

/* Copy button */
.tlm-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto;
    height: 36px;
    padding: 0 14px;
    margin-right: 10px;
    background: var(--tp-navy);
    border: none;
    border-radius: var(--tp-radius-sm);
    cursor: pointer;
    color: var(--tp-white);
    transition: all var(--tp-transition);
    vertical-align: middle;
    flex-shrink: 0;
    font-family: var(--tp-font);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .2px;
}

[dir="ltr"] .tlm-copy-btn {
    margin-right: 0;
    margin-left: 10px;
}

.tlm-copy-btn::after {
    content: "העתק";
    display: inline;
}

[dir="ltr"] .tlm-copy-btn::after {
    content: "Copy";
}

.tlm-copy-btn:hover {
    background: var(--tp-blue);
    box-shadow: 0 3px 10px rgba(56, 88, 233, .3);
    transform: translateY(-1px);
}

.tlm-copy-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(56, 88, 233, .2);
}

.tlm-copy-btn .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: var(--tp-white);
    transition: transform var(--tp-transition);
    line-height: 1;
}

.tlm-copy-btn:hover .dashicons {
    transform: scale(1.1);
}

/* Authorized site – subtle styling */
.tlm-licenses-table tbody td:nth-child(3) {
    font-size: 13px;
    color: var(--tp-text);
    direction: ltr;
}

/* Expiry date */
.tlm-licenses-table tbody td:nth-child(4) {
    white-space: nowrap;
    font-size: 13px;
}

/* License status badges */
.tlm-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: .2px;
    line-height: 1;
}

.tlm-status--active {
    background: var(--tp-green-bg);
    color: #1a7a42;
    border: 1px solid rgba(46, 204, 113, .25);
}

.tlm-status--active::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--tp-green);
    border-radius: 50%;
    flex-shrink: 0;
    animation: tlm-pulse 2s ease-in-out infinite;
}

.tlm-status--expired {
    background: var(--tp-red-bg);
    color: var(--tp-red);
    border: 1px solid rgba(231, 76, 60, .2);
}

.tlm-status--expired::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--tp-red);
    border-radius: 50%;
    flex-shrink: 0;
}

.tlm-status--suspended,
.tlm-status--inactive {
    background: var(--tp-yellow-bg);
    color: #8a6d0b;
    border: 1px solid rgba(243, 156, 18, .2);
}

.tlm-status--suspended::before,
.tlm-status--inactive::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--tp-yellow);
    border-radius: 50%;
    flex-shrink: 0;
}

@keyframes tlm-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .4; }
}

/* ---------- No orders / empty states ---------- */
.woocommerce-account .woocommerce-info {
    text-align: center;
    padding: 40px 20px;
}

.woocommerce-account .woocommerce-info .woocommerce-button {
    margin-top: 16px;
}

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

.woocommerce-account .woocommerce-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--tp-radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--tp-text);
    text-decoration: none;
    border: 1.5px solid var(--tp-border);
    transition: all var(--tp-transition);
}

.woocommerce-account .woocommerce-pagination .page-numbers:hover {
    background: var(--tp-blue-light);
    border-color: var(--tp-blue);
    color: var(--tp-blue);
}

.woocommerce-account .woocommerce-pagination .page-numbers.current {
    background: var(--tp-blue);
    border-color: var(--tp-blue);
    color: var(--tp-white);
}

/* ---------- Table horizontal scroll guard (medium screens) ---------- */
@media (max-width: 1024px) and (min-width: 601px) {
    .tlm-licenses-table {
        table-layout: auto;
    }

    .woocommerce-MyAccount-content {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ==========================================================================
   Responsive – Tablet (<=900px)
   ========================================================================== */
@media (max-width: 900px) {
    .woocommerce-account .woocommerce {
        flex-direction: column;
        padding: 24px 16px;
        gap: 0;
    }

    .woocommerce-MyAccount-navigation {
        width: 100%;
        min-width: 100%;
        position: static;
    }

    .woocommerce-MyAccount-navigation ul {
        display: flex;
        overflow-x: auto;
        gap: 0;
        padding: 0;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .woocommerce-MyAccount-navigation ul::-webkit-scrollbar {
        display: none;
    }

    .woocommerce-MyAccount-navigation ul li {
        flex-shrink: 0;
    }

    .woocommerce-MyAccount-navigation ul li a {
        padding: 12px 18px;
        white-space: nowrap;
        font-size: 14px;
        border-right: none;
        border-bottom: 3px solid transparent;
    }

    [dir="ltr"] .woocommerce-MyAccount-navigation ul li a {
        border-left: none;
        border-bottom: 3px solid transparent;
    }

    .woocommerce-MyAccount-navigation ul li.is-active a {
        border-right-color: transparent;
        border-bottom-color: var(--tp-blue);
    }

    [dir="ltr"] .woocommerce-MyAccount-navigation ul li.is-active a {
        border-left-color: transparent;
        border-bottom-color: var(--tp-blue);
    }

    .woocommerce-MyAccount-content {
        padding: 24px;
        margin-right: 0;
        margin-left: 0;
        margin-top: 24px;
        max-width: 100%;
    }

    .woocommerce-account .woocommerce-Addresses {
        grid-template-columns: 1fr;
    }

    .woocommerce-account .u-columns {
        flex-direction: column;
    }
}

/* ==========================================================================
   Responsive – Mobile (<=600px)
   ========================================================================== */
@media (max-width: 600px) {
    .woocommerce-account .woocommerce {
        padding: 16px 12px;
        gap: 16px;
    }

    .woocommerce-MyAccount-navigation ul li a {
        padding: 10px 14px;
        font-size: 13px;
    }

    .woocommerce-MyAccount-navigation ul li a::before {
        width: 16px;
        height: 16px;
    }

    .woocommerce-MyAccount-content {
        padding: 20px 16px;
    }

    /* Orders table → stacked cards */
    .woocommerce-orders-table,
    .woocommerce-orders-table thead,
    .woocommerce-orders-table tbody,
    .woocommerce-orders-table tr,
    .woocommerce-orders-table td,
    .woocommerce-MyAccount-content table.shop_table,
    .woocommerce-MyAccount-content table.shop_table thead,
    .woocommerce-MyAccount-content table.shop_table tbody,
    .woocommerce-MyAccount-content table.shop_table tr,
    .woocommerce-MyAccount-content table.shop_table td {
        display: block;
    }

    .woocommerce-orders-table thead,
    .woocommerce-MyAccount-content table.shop_table thead {
        display: none;
    }

    .woocommerce-orders-table,
    .woocommerce-MyAccount-content table.shop_table {
        box-shadow: none;
        border: none;
        background: transparent;
    }

    .woocommerce-orders-table tbody tr,
    .woocommerce-MyAccount-content table.shop_table tbody tr {
        border: 1.5px solid var(--tp-border);
        border-radius: var(--tp-radius);
        margin-bottom: 16px;
        padding: 20px;
        background: var(--tp-white) !important;
        box-shadow: var(--tp-shadow);
    }

    .woocommerce-orders-table tbody td,
    .woocommerce-MyAccount-content table.shop_table tbody td {
        padding: 10px 0;
        border-bottom: 1px solid #f0f0f0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
    }

    .woocommerce-orders-table tbody td::before,
    .woocommerce-MyAccount-content table.shop_table tbody td::before {
        content: attr(data-title);
        font-weight: 700;
        color: var(--tp-dark);
        font-size: 12px;
        letter-spacing: .3px;
        flex-shrink: 0;
        min-width: 80px;
    }

    .woocommerce-orders-table tbody td:last-child,
    .woocommerce-MyAccount-content table.shop_table tbody td:last-child {
        border-bottom: none;
        padding-top: 14px;
    }

    .woocommerce-orders-table .woocommerce-button,
    .woocommerce-orders-table .button,
    .woocommerce-MyAccount-content table.shop_table .woocommerce-button,
    .woocommerce-MyAccount-content table.shop_table .button {
        width: 100%;
        justify-content: center;
    }

    /* Licenses table → stacked cards */
    .tlm-licenses-table,
    .tlm-licenses-table thead,
    .tlm-licenses-table tbody,
    .tlm-licenses-table tr,
    .tlm-licenses-table td {
        display: block;
    }

    .tlm-licenses-table {
        box-shadow: none;
        border: none;
        background: transparent;
        table-layout: auto;
    }

    .tlm-licenses-table thead {
        display: none;
    }

    .tlm-licenses-table tbody tr {
        border: 1.5px solid var(--tp-border);
        border-radius: var(--tp-radius);
        margin-bottom: 16px;
        padding: 20px;
        background: var(--tp-white) !important;
        box-shadow: var(--tp-shadow);
        position: relative;
    }

    .tlm-licenses-table tbody tr:hover {
        background: var(--tp-white) !important;
        box-shadow: var(--tp-shadow-md);
    }

    .tlm-licenses-table tbody td {
        padding: 10px 0;
        border-bottom: 1px solid #f0f0f0;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 4px;
    }

    .tlm-licenses-table tbody td::before {
        content: attr(data-title);
        font-weight: 700;
        color: var(--tp-text-light);
        font-size: 11px;
        letter-spacing: .5px;
        text-transform: uppercase;
        flex-shrink: 0;
        display: block;
        width: 100%;
        margin-bottom: 4px;
    }

    .tlm-licenses-table tbody td:first-child {
        padding-top: 0;
        font-size: 15px;
        border-bottom: 2px solid var(--tp-border);
        padding-bottom: 14px;
        margin-bottom: 4px;
    }

    .tlm-licenses-table tbody td:last-child {
        border-bottom: none;
        padding-top: 14px;
    }

    .tlm-license-key {
        font-size: 12px;
        padding: 6px 10px;
        letter-spacing: 1px;
    }

    .tlm-copy-btn {
        width: 32px;
        height: 32px;
    }

    /* Forms */
    .woocommerce-account .woocommerce-form-login,
    .woocommerce-account .woocommerce-form-register {
        padding: 24px 20px;
    }

    .woocommerce-account fieldset {
        padding: 20px 16px;
    }

    .woocommerce-account .woocommerce-button,
    .woocommerce-account .button,
    .woocommerce-account button[type="submit"],
    .woocommerce-account input[type="submit"] {
        width: 100%;
    }
}

/* ==========================================================================
   Print – hide nav, clean up content
   ========================================================================== */
@media print {
    .woocommerce-MyAccount-navigation {
        display: none;
    }

    .woocommerce-MyAccount-content {
        box-shadow: none;
        padding: 0;
    }

    .woocommerce-account .woocommerce {
        padding: 0;
    }
}
