
/* ThePropic Customer Account — v3.0
   Isolated RTL account interface.
   No modifications to WooCommerce checkout or product pages.
*/

body.tp-customer-account {
    --tp-accent: #df8900;
    --tp-accent-hover: #bd7400;
    --tp-accent-soft: #fff4e2;
    --tp-text: #22252a;
    --tp-muted: #62666d;
    --tp-border: #e4e7ec;
    --tp-surface: #fff;
    --tp-background: #f8f9fb;
    --tp-radius: 12px;
}

/* ========================================
   ACCOUNT LAYOUT
   ======================================== */

body.tp-account-authenticated .post_content > .woocommerce {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    direction: rtl !important;
    gap: 26px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    padding: 15px 0 40px !important;
    margin: 0 !important;
}

body.tp-account-authenticated .post_content > .woocommerce::before,
body.tp-account-authenticated .post_content > .woocommerce::after {
    content: none !important;
    display: none !important;
}

body.tp-account-authenticated .post_content > .woocommerce
> .woocommerce-MyAccount-navigation {
    display: block !important;
    flex: 0 0 235px !important;
    order: 0 !important;
    width: 235px !important;
    min-width: 235px !important;
    max-width: 235px !important;
    float: none !important;
    clear: none !important;
    position: static !important;
    margin: 0 !important;
    padding: 12px !important;
    box-sizing: border-box !important;
}

body.tp-account-authenticated .post_content > .woocommerce
> .woocommerce-MyAccount-content {
    display: block !important;
    flex: 1 1 0% !important;
    order: 1 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    float: none !important;
    clear: none !important;
    position: static !important;
    margin: 0 !important;
    padding: 30px !important;
    box-sizing: border-box !important;
    direction: rtl;
    text-align: right;
    word-break: normal;
    overflow-wrap: break-word;
}

/* ========================================
   NAVIGATION
   ======================================== */

.tp-customer-account .woocommerce-MyAccount-navigation {
    background: var(--tp-surface);
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius);
    box-shadow: 0 3px 16px rgba(0,0,0,.035);
}

.tp-customer-account .woocommerce-MyAccount-navigation ul {
    display: flex !important;
    flex-direction: column;
    gap: 4px;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.tp-customer-account .woocommerce-MyAccount-navigation li {
    display: block;
    list-style: none !important;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

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

.tp-customer-account .woocommerce-MyAccount-navigation li a {
    display: flex !important;
    align-items: center;
    gap: 11px;
    min-height: 48px;
    padding: 10px 13px !important;
    margin: 0 !important;
    box-sizing: border-box;
    border: 0;
    border-radius: 8px;
    color: var(--tp-text);
    font-family: inherit;
    font-size: 15px !important;
    line-height: 1.6;
    font-weight: 500;
    text-align: right;
    text-decoration: none !important;
    transition: background .15s ease, color .15s ease;
}

.tp-customer-account .woocommerce-MyAccount-navigation li a::before {
    display: block !important;
    content: "" !important;
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    position: static !important;
    margin: 0 !important;
    background-color: currentColor;
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7'%3E%3Crect x='4' y='4' width='16' height='16' rx='3'/%3E%3Cpath d='M8 12h8'/%3E%3C/svg%3E");
}

.tp-customer-account
.woocommerce-MyAccount-navigation-link--dashboard a::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E");
}

.tp-customer-account
.woocommerce-MyAccount-navigation-link--orders a::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7'%3E%3Crect x='5' y='3' width='14' height='18' rx='2'/%3E%3Cpath d='M8 8h8M8 12h8M8 16h5'/%3E%3C/svg%3E");
}

.tp-customer-account
.woocommerce-MyAccount-navigation-link--downloads a::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7'%3E%3Cpath d='M12 3v12m-5-5 5 5 5-5M4 16v4h16v-4'/%3E%3C/svg%3E");
}

.tp-customer-account
.woocommerce-MyAccount-navigation-link--edit-address a::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7'%3E%3Cpath d='M20 10c0 6-8 11-8 11S4 16 4 10a8 8 0 1 1 16 0Z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E");
}

.tp-customer-account
.woocommerce-MyAccount-navigation-link--edit-account a::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7'%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3Cpath d='M4 21v-2a8 8 0 0 1 16 0v2'/%3E%3C/svg%3E");
}

.tp-customer-account
.woocommerce-MyAccount-navigation-link--saved-cards a::before,
.tp-customer-account
.woocommerce-MyAccount-navigation-link--payment-methods a::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M3 10h18M6 15h5'/%3E%3C/svg%3E");
}

.tp-customer-account
.woocommerce-MyAccount-navigation-link--customer-logout a::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7'%3E%3Cpath d='M10 3H4v18h6M8 12h13m-5-5 5 5-5 5'/%3E%3C/svg%3E");
}

.tp-customer-account .woocommerce-MyAccount-navigation li a:hover,
.tp-customer-account .woocommerce-MyAccount-navigation li.is-active a {
    background: var(--tp-accent-soft) !important;
    color: #955900 !important;
}

.tp-customer-account .woocommerce-MyAccount-navigation li.is-active a {
    font-weight: 700 !important;
    box-shadow: inset -3px 0 var(--tp-accent);
}

.tp-customer-account
.woocommerce-MyAccount-navigation-link--customer-logout {
    border-top: 1px solid var(--tp-border) !important;
    margin-top: 8px !important;
    padding-top: 8px !important;
}

.tp-customer-account
.woocommerce-MyAccount-navigation-link--customer-logout a {
    color: #a23838 !important;
}

/* ========================================
   MAIN CONTENT
   ======================================== */

.tp-customer-account .woocommerce-MyAccount-content {
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius);
    background: #fff;
    box-shadow: 0 3px 16px rgba(0,0,0,.035);
    color: var(--tp-text);
}

.tp-customer-account .tp-account-heading {
    padding-bottom: 18px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--tp-border);
}

.tp-customer-account .tp-account-heading h2 {
    margin: 0 !important;
    padding: 0 !important;
    font-family: inherit;
    font-size: 27px !important;
    line-height: 1.5;
    font-weight: 700;
    color: var(--tp-text);
}

.tp-customer-account .woocommerce-MyAccount-content p {
    font-size: 15px;
    line-height: 1.9;
    color: var(--tp-muted);
}

/* ========================================
   DASHBOARD SHORTCUT CARDS
   ======================================== */

.tp-customer-account .tp-account-shortcuts {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 16px;
    margin-top: 26px;
}

.tp-customer-account .tp-account-shortcut {
    display: flex !important;
    flex-direction: column;
    gap: 9px;
    min-width: 0;
    min-height: 145px;
    padding: 22px;
    border: 1px solid var(--tp-border);
    border-radius: 10px;
    background: var(--tp-background);
    box-sizing: border-box;
    text-align: right;
    text-decoration: none !important;
    overflow-wrap: break-word;
    word-break: normal;
}

.tp-customer-account .tp-account-shortcut strong {
    font-size: 18px;
    line-height: 1.6;
    color: var(--tp-text);
}

.tp-customer-account .tp-account-shortcut span {
    font-size: 14px;
    line-height: 1.8;
    color: var(--tp-muted);
}

.tp-customer-account .tp-account-shortcut::after {
    content: "\2190";
    margin-top: auto;
    font-size: 23px;
    line-height: 1.4;
    color: var(--tp-accent);
}

.tp-customer-account .tp-account-shortcut:hover {
    border-color: var(--tp-accent);
    background: #fffcf7;
}

/* ========================================
   FORMS
   ======================================== */

.tp-customer-account .woocommerce form .form-row {
    margin-bottom: 20px;
}

.tp-customer-account .woocommerce form label {
    display: block;
    color: var(--tp-text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.7;
    margin-bottom: 7px;
}

.tp-customer-account .woocommerce form .input-text,
.tp-customer-account .woocommerce form input[type="email"],
.tp-customer-account .woocommerce form input[type="password"],
.tp-customer-account .woocommerce form select,
.tp-customer-account .woocommerce form textarea {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px !important;
    border: 1px solid #d5d9df !important;
    border-radius: 8px !important;
    background: #fff !important;
    color: var(--tp-text);
    font-family: inherit;
    font-size: 15px;
    box-sizing: border-box;
    box-shadow: none !important;
}

.tp-customer-account .woocommerce form input:focus,
.tp-customer-account .woocommerce form textarea:focus,
.tp-customer-account .woocommerce form select:focus {
    outline: 2px solid var(--tp-accent);
    outline-offset: 1px;
}

.tp-customer-account .woocommerce form fieldset {
    min-width: 0;
    margin: 26px 0 !important;
    padding: 22px !important;
    background: var(--tp-background);
    border: 1px solid var(--tp-border) !important;
    border-radius: 10px;
    box-sizing: border-box;
}

.tp-customer-account .woocommerce form legend {
    padding: 0 10px;
    font-size: 17px;
    font-weight: 700;
    color: var(--tp-text);
}

.tp-customer-account .woocommerce form em {
    font-style: normal;
    font-size: 13px;
    color: var(--tp-muted);
}

.tp-customer-account .woocommerce .password-input {
    display: block;
    width: 100%;
    position: relative;
}

.tp-customer-account .woocommerce .password-input input {
    padding-inline-end: 52px !important;
}

.tp-customer-account .woocommerce form .show-password-input {
    position: absolute !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    inset-inline-end: 6px !important;
    inset-inline-start: auto !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 40px !important;
    height: 36px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    color: #62666d !important;
    border: 0 !important;
    box-shadow: none !important;
}

.tp-customer-account .woocommerce form .show-password-input::after {
    content: none !important;
    display: none !important;
}

/* ========================================
   BUTTONS AND KEYBOARD ACCESSIBILITY
   ======================================== */

.tp-customer-account .woocommerce .button,
.tp-customer-account .woocommerce button.button,
.tp-customer-account .woocommerce input.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 19px !important;
    border-radius: 8px !important;
    background: var(--tp-accent) !important;
    color: #171717 !important;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    text-decoration: none !important;
    box-sizing: border-box;
}

.tp-customer-account .woocommerce .button:hover {
    background: #f5a526 !important;
}

.tp-customer-account .woocommerce a:focus-visible,
.tp-customer-account .woocommerce button:focus-visible {
    outline: 2px solid #995900;
    outline-offset: 3px;
}

/* ========================================
   ORDERS AND TABLES
   ======================================== */

.tp-customer-account .woocommerce table.shop_table {
    width: 100%;
    border: 1px solid var(--tp-border);
    border-spacing: 0;
    border-radius: 10px;
    font-size: 14px;
    margin: 0 0 24px;
    background: #fff;
    overflow: hidden;
}

.tp-customer-account .woocommerce table.shop_table th {
    background: var(--tp-background);
    color: var(--tp-text);
    font-weight: 700;
    padding: 14px 12px;
}

.tp-customer-account .woocommerce table.shop_table td {
    padding: 14px 12px;
    border-color: var(--tp-border);
    vertical-align: middle;
    word-break: normal;
    overflow-wrap: break-word;
}

.tp-customer-account .woocommerce table.shop_table tbody tr:hover td {
    background: #fcfcfc;
}

.tp-customer-account .woocommerce-orders-table__cell-order-actions .button {
    min-height: 36px;
    padding: 7px 12px !important;
    font-size: 12px;
    margin: 3px;
}

.tp-customer-account .woocommerce-orders-table__cell-order-status {
    font-weight: 600;
}

.tp-customer-account
.woocommerce-orders-table__row--status-completed
.woocommerce-orders-table__cell-order-status {
    color: #137044;
}

.tp-customer-account
.woocommerce-orders-table__row--status-processing
.woocommerce-orders-table__cell-order-status {
    color: #925900;
}

.tp-customer-account
.woocommerce-orders-table__row--status-failed
.woocommerce-orders-table__cell-order-status,
.tp-customer-account
.woocommerce-orders-table__row--status-cancelled
.woocommerce-orders-table__cell-order-status {
    color: #b42318;
}

.tp-customer-account .woocommerce-order-details,
.tp-customer-account .woocommerce-customer-details {
    margin-top: 26px;
}

.tp-customer-account .woocommerce-order-details h2,
.tp-customer-account .woocommerce-customer-details h2 {
    font-size: 21px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.tp-customer-account .woocommerce-MyAccount-content mark {
    padding: 3px 6px;
    background: var(--tp-accent-soft);
    color: #784800;
    border-radius: 5px;
    font-weight: 600;
}

/* ========================================
   ADDRESSES AND NOTIFICATIONS
   ======================================== */

.tp-customer-account .woocommerce-Address {
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--tp-border);
    border-radius: 10px;
    box-sizing: border-box;
}

.tp-customer-account .woocommerce-Address h3 {
    font-size: 19px;
}

.tp-customer-account .woocommerce-Address address {
    padding: 12px 0;
    font-style: normal;
    line-height: 1.9;
}

.tp-customer-account .woocommerce-info,
.tp-customer-account .woocommerce-message,
.tp-customer-account .woocommerce-error {
    border-radius: 9px;
    font-size: 14px;
    line-height: 1.8;
}

/* ========================================
   SAVED CARDS
   ======================================== */

.tp-customer-account .tp-account-saved-cards-empty {
    text-align: center;
    padding: 38px 20px;
    background: var(--tp-background);
    border: 1px dashed #d5d9df;
    border-radius: 12px;
    margin: 12px 0;
}

.tp-customer-account .tp-account-saved-cards-empty svg {
    width: 48px;
    height: 48px;
    color: #777;
    margin-bottom: 16px;
}

.tp-customer-account .tp-account-saved-cards-empty strong {
    display: block;
    margin-bottom: 10px;
    font-size: 19px;
    color: var(--tp-text);
}

.tp-customer-account .tp-account-saved-cards-empty p {
    margin: 0;
    font-size: 14px;
    color: var(--tp-muted);
}

.tp-customer-account .delete-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    border: 1px solid #ead8d8;
    border-radius: 7px;
    background: #fff8f8;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1050px) {

    body.tp-account-authenticated .post_content > .woocommerce {
        gap: 18px !important;
    }

    body.tp-account-authenticated .post_content > .woocommerce
    > .woocommerce-MyAccount-navigation {
        flex-basis: 205px !important;
        width: 205px !important;
        min-width: 205px !important;
        max-width: 205px !important;
    }

    body.tp-account-authenticated .post_content > .woocommerce
    > .woocommerce-MyAccount-content {
        padding: 22px !important;
    }

}

@media (max-width: 800px) {

    body.tp-account-authenticated .post_content > .woocommerce {
        flex-direction: column !important;
        gap: 18px !important;
    }

    body.tp-account-authenticated .post_content > .woocommerce
    > .woocommerce-MyAccount-navigation,

    body.tp-account-authenticated .post_content > .woocommerce
    > .woocommerce-MyAccount-content {
        flex: none !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    body.tp-account-authenticated .post_content > .woocommerce
    > .woocommerce-MyAccount-content {
        padding: 20px !important;
    }

    .tp-customer-account .woocommerce-MyAccount-navigation ul {
        display: grid !important;
        grid-template-columns: repeat(2,minmax(0,1fr));
        gap: 5px;
    }

    .tp-customer-account .woocommerce-MyAccount-navigation li a {
        padding: 10px !important;
        font-size: 13px !important;
    }

    .tp-customer-account
    .woocommerce-MyAccount-navigation-link--customer-logout {
        border: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .tp-customer-account .woocommerce-Address {
        width: 100% !important;
        float: none !important;
        margin-bottom: 15px;
    }

}

@media (max-width: 540px) {

    body.tp-account-authenticated .post_content > .woocommerce
    > .woocommerce-MyAccount-content {
        padding: 16px !important;
    }

    .tp-customer-account .tp-account-shortcuts {
        grid-template-columns: minmax(0,1fr);
        gap: 12px;
    }

    .tp-customer-account .tp-account-shortcut {
        min-height: auto;
        padding: 18px;
    }

    .tp-customer-account .tp-account-heading h2 {
        font-size: 23px !important;
    }

    .tp-customer-account .woocommerce form .form-row-first,
    .tp-customer-account .woocommerce form .form-row-last {
        float: none !important;
        width: 100% !important;
    }

    .tp-customer-account .woocommerce form fieldset {
        padding: 14px !important;
    }

}

@media (prefers-reduced-motion: reduce) {
    .tp-customer-account .woocommerce-MyAccount-navigation li a {
        transition: none;
    }
}



/* TP ACCOUNT COMPONENTS V4 */

.tp-customer-account .tp-account-order-toolbar {
    margin: 0 0 22px;
}

.tp-customer-account .tp-account-back-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    padding: 8px 15px;
    border: 1px solid var(--tp-border);
    border-radius: 8px;
    color: #784800;
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
}

.tp-customer-account .tp-account-back-link:hover {
    border-color: var(--tp-accent);
    background: var(--tp-accent-soft);
}

.tp-customer-account .tp-account-saved-cards-empty {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    padding: 35px 24px;
    box-sizing: border-box;
}

.tp-customer-account .tp-account-saved-cards-empty svg {
    width: 46px;
    height: 46px;
    color: #777;
}

.tp-customer-account .tp-account-saved-cards-empty p {
    max-width: 440px;
    line-height: 1.9;
}

.tp-customer-account .delete-card-icon img {
    width: 20px !important;
    height: 20px !important;
}

@media (max-width: 768px) {

    .tp-customer-account
    .woocommerce-MyAccount-content
    table.shop_table_responsive:has(.delete-card-icon) thead {
        display: table-header-group !important;
    }

    .tp-customer-account
    .woocommerce-MyAccount-content
    table.shop_table_responsive:has(.delete-card-icon) tr {
        display: table-row !important;
    }

    .tp-customer-account
    .woocommerce-MyAccount-content
    table.shop_table_responsive:has(.delete-card-icon) td {
        display: table-cell !important;
        text-align: right !important;
    }

    .tp-customer-account
    .woocommerce-MyAccount-content
    table.shop_table_responsive:has(.delete-card-icon) td::before {
        display: none !important;
    }

    .tp-customer-account
    .woocommerce-MyAccount-content
    table.shop_table_responsive:has(.delete-card-icon) td:last-child {
        width: 65px;
        text-align: center !important;
    }

}

