/* ── TBC WooCommerce — My Account ──
   Login/Register + logged-in Dashboard/Orders/Addresses/Account Details.
   Reuses the same tokens + underline-input/pill-button language as
   cart-checkout.css (--tbc-color-*, .tbc-wc-page, .tbc-btn-pill), kept in
   its own file since My Account has no BSB reference to inherit from. */

/* ══════════════════════════════════════════
   LOGIN / REGISTER
══════════════════════════════════════════ */

.tbc-login-layout {
    max-width: 460px;
    margin-inline: auto;
}

.tbc-login-layout.has-register {
    max-width: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.tbc-login-heading {
    font-family:    var(--tbc-font-heading);
    font-size:      clamp(1.2rem, 2.2vw, 1.6rem);
    font-weight:    900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color:          var(--tbc-color-text);
    margin-bottom:  1.75rem;
}

.tbc-login-row {
    display:         flex;
    flex-direction:  column;
    gap:             1.25rem;
    align-items:     stretch;
    margin-top:      0.5rem;
}

.tbc-login-layout .woocommerce-form__label-for-checkbox {
    display:        flex;
    align-items:    center;
    gap:            0.6rem;
    font-family:    var(--tbc-font-body);
    font-size:      0.9rem;
    font-weight:    500;
    color:          var(--tbc-color-text);
    cursor:         pointer;
}

.tbc-login-layout input[type="checkbox"] {
    width:        16px;
    height:       16px;
    accent-color: var(--tbc-color-text);
    flex-shrink:  0;
    cursor:       pointer;
}

.tbc-login-layout .woocommerce-LostPassword {
    margin-top: 1.25rem;
    font-family: var(--tbc-font-body);
    font-size:   0.85rem;
}

.tbc-login-layout .woocommerce-LostPassword a {
    color:           var(--tbc-color-text);
    text-decoration: underline;
}

.tbc-login-layout .woocommerce-LostPassword a:hover { color: var(--tbc-pink-accent); }

/* WooCommerce's own button styles (woocommerce-general.css / theme.json
   button element defaults) win over .tbc-btn-pill on specificity alone —
   force the pill look here, same treatment as #place_order in
   cart-checkout.css. */
.tbc-login-layout .woocommerce-form-login__submit,
.tbc-login-layout .woocommerce-form-register__submit {
    display:         flex !important;
    align-items:     center !important;
    justify-content: space-between !important;
    width:           100% !important;
    padding:         1rem 2rem !important;
    border:          1.5px solid var(--tbc-color-text) !important;
    border-radius:   50px !important;
    background:      transparent !important;
    color:           var(--tbc-color-text) !important;
    box-shadow:      none !important;
}

.tbc-login-layout .woocommerce-form-login__submit:hover,
.tbc-login-layout .woocommerce-form-register__submit:hover {
    background:   var(--tbc-pink) !important;
    border-color: var(--tbc-pink) !important;
    color:        var(--tbc-color-text) !important;
}

@media (max-width: 720px) {
    .tbc-login-layout.has-register {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

/* ══════════════════════════════════════════
   LOGGED-IN LAYOUT (nav + content)
══════════════════════════════════════════ */

.tbc-myaccount-layout {
    display:               grid;
    grid-template-columns: 260px 1fr;
    gap:                   3rem;
    align-items:           start;
}

.tbc-myaccount-layout__nav { position: sticky; top: 2rem; }

/* WooCommerce's own woocommerce-layout.css floats+percentage-widths these
   two elements for its default side-by-side account layout
   (.woocommerce-account .woocommerce-MyAccount-navigation{float:left;
   width:30%}, ...-content{float:right;width:68%}) — same specificity as the
   grid wrapper here, so it's a coin-flip on load order. Reset explicitly so
   our grid columns (not WC's float/percentage) control the width. */
.tbc-myaccount-layout .woocommerce-MyAccount-navigation,
.tbc-myaccount-layout .woocommerce-MyAccount-content {
    float: none !important;
    width: 100% !important;
}

/* ── Nav (vertical pill tabs) ── */
.woocommerce-MyAccount-navigation ul {
    list-style:     none;
    margin:         0;
    padding:        0;
    display:        flex;
    flex-direction: column;
    gap:            0.4rem;
}

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

.woocommerce-MyAccount-navigation a {
    display:        block;
    padding:        0.85rem 1.5rem;
    border-radius:  50px;
    font-family:    var(--tbc-font-body);
    font-size:      0.82rem;
    font-weight:    700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color:          var(--tbc-color-text);
    text-decoration: none;
    transition:     background 0.2s ease, color 0.2s ease;
}

.woocommerce-MyAccount-navigation a:hover {
    background: rgba(13, 13, 13, 0.06);
}

.woocommerce-MyAccount-navigation li.is-active a {
    background: var(--tbc-color-text);
    color:      #ffffff;
}

.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--customer-logout {
    margin-top:  0.75rem;
    padding-top: 0.75rem;
    border-top:  1px solid rgba(13, 13, 13, 0.1);
}

.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--customer-logout a {
    color: #e53935;
}

.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--customer-logout a:hover {
    background: rgba(229, 57, 53, 0.08);
}

/* ── Content area ── */
.woocommerce-MyAccount-content {
    font-family: var(--tbc-font-body);
    font-size:   0.95rem;
    line-height: 1.75;
    color:       var(--tbc-color-text);
}

.woocommerce-MyAccount-content > p { margin-bottom: 1.25rem; }

.woocommerce-MyAccount-content a {
    color:           var(--tbc-color-text);
    font-weight:     700;
    text-decoration: underline;
}

.woocommerce-MyAccount-content a:hover { color: var(--tbc-pink-accent); }

.woocommerce-MyAccount-content h2 {
    font-family:    var(--tbc-font-heading);
    font-size:      clamp(1.1rem, 2vw, 1.4rem);
    font-weight:    900;
    text-transform: uppercase;
    color:          var(--tbc-color-text);
    margin-bottom:  1rem;
}

@media (max-width: 900px) {
    .tbc-myaccount-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .tbc-myaccount-layout__nav { position: static; }

    .woocommerce-MyAccount-navigation ul {
        flex-direction: row;
        flex-wrap:      wrap;
        gap:            0.5rem;
    }
}

/* ══════════════════════════════════════════
   ADDRESSES
══════════════════════════════════════════ */

.woocommerce-Addresses.col2-set {
    display:               grid;
    grid-template-columns: 1fr 1fr;
    gap:                   2rem;
    list-style:             none;
    padding:                0;
}

/* WC's woocommerce-layout.css floats+width:48%'s .col-1/.col-2 for its
   default two-up layout — same fix as the nav/content columns above,
   since the parent is now a grid (not the float-based layout WC expects). */
.woocommerce-Addresses.col2-set .col-1,
.woocommerce-Addresses.col2-set .col-2 {
    float: none !important;
    width: auto !important;
}

/* WC also gives .col2-set a clearfix via ::before/::after (content:" ";
   display:table) for its float-based layout — inside a grid container
   those become two extra (invisible) grid items, pushing the real address
   cards into the wrong column/row. Remove them; grid needs no clearfix. */
.woocommerce-Addresses.col2-set::before,
.woocommerce-Addresses.col2-set::after {
    content: none !important;
    display: none !important;
}

.woocommerce-Address {
    border:        1px solid rgba(13, 13, 13, 0.15);
    border-radius:  12px;
    padding:        1.75rem;
}

.woocommerce-Address-title {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    gap:             1rem;
    margin-bottom:   1rem;
}

.woocommerce-Address-title h2 {
    font-family:    var(--tbc-font-heading);
    font-size:      1rem;
    font-weight:    900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color:          var(--tbc-color-text);
    margin:         0;
}

.woocommerce-Address-title .edit {
    flex-shrink:     0;
    display:         inline-flex;
    align-items:     center;
    padding:         0.5rem 1.25rem;
    border:          1.5px solid var(--tbc-color-text);
    border-radius:   50px;
    font-family:     var(--tbc-font-body);
    font-size:       0.72rem;
    font-weight:     700;
    letter-spacing:  0.08em;
    text-transform:  uppercase;
    color:           var(--tbc-color-text);
    text-decoration: none !important;
    white-space:     nowrap;
    transition:      background 0.2s ease, border-color 0.2s ease;
}

.woocommerce-Address-title .edit:hover {
    background:   var(--tbc-pink);
    border-color: var(--tbc-pink);
}

.woocommerce-Address address {
    font-family:  var(--tbc-font-body);
    font-size:    0.9rem;
    line-height:  1.7;
    color:        rgba(13, 13, 13, 0.75);
    font-style:   normal;
}

@media (max-width: 720px) {
    .woocommerce-Addresses.col2-set {
        grid-template-columns: 1fr;
    }
}

/* ══════════════════════════════════════════
   ACCOUNT / ADDRESS EDIT FORMS
   (form-edit-account.php, form-edit-address.php — same underline-input
   language as checkout, scoped to these WC-standard form classes since
   these templates aren't overridden.)
══════════════════════════════════════════ */

.woocommerce-EditAccountForm input[type="text"],
.woocommerce-EditAccountForm input[type="email"],
.woocommerce-EditAccountForm input[type="password"],
.woocommerce-address-fields input[type="text"],
.woocommerce-address-fields input[type="email"],
.woocommerce-address-fields input[type="tel"],
.woocommerce-address-fields select {
    width:              100%;
    padding:            0.75rem 0;
    background:         transparent !important;
    border:             none !important;
    border-bottom:      1.5px solid rgba(13, 13, 13, 0.2) !important;
    border-radius:      0 !important;
    box-shadow:         none !important;
    font-family:        var(--tbc-font-body);
    font-size:          0.95rem;
    color:              var(--tbc-color-text);
    outline:            none;
    transition:         border-bottom-color 0.2s ease;
    -webkit-appearance: none;
    appearance:         none;
}

.woocommerce-EditAccountForm input:focus,
.woocommerce-address-fields input:focus,
.woocommerce-address-fields select:focus {
    border-bottom-color: var(--tbc-color-text) !important;
    box-shadow:          none !important;
}

.woocommerce-EditAccountForm label,
.woocommerce-address-fields label {
    display:        block;
    font-family:    var(--tbc-font-body);
    font-size:      0.85rem;
    font-weight:    600;
    letter-spacing: 0.04em;
    color:          var(--tbc-color-text);
    margin-bottom:  0.35rem;
}

.woocommerce-EditAccountForm .form-row,
.woocommerce-address-fields .form-row { margin-bottom: 1.25rem; }

.woocommerce-EditAccountForm .form-row-first,
.woocommerce-EditAccountForm .form-row-last,
.woocommerce-address-fields .form-row-first,
.woocommerce-address-fields .form-row-last {
    display:        inline-block;
    width:          calc(50% - 0.5rem);
    vertical-align: top;
}

.woocommerce-EditAccountForm .form-row-first,
.woocommerce-address-fields .form-row-first { margin-right: 1rem; }

.woocommerce-EditAccountForm fieldset {
    border:        none;
    padding:        0;
    margin:         2rem 0 0;
}

.woocommerce-EditAccountForm fieldset legend {
    font-family:    var(--tbc-font-heading);
    font-size:      0.85rem;
    font-weight:    700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color:          var(--tbc-color-text);
    margin-bottom:  1.5rem;
    padding:        0;
}

.woocommerce-EditAccountForm span em,
.woocommerce-address-fields span em {
    display:     block;
    font-family: var(--tbc-font-body);
    font-size:   0.78rem;
    color:       rgba(13, 13, 13, 0.5);
    font-style:  normal;
    margin-top:  0.35rem;
}

.woocommerce-EditAccountForm button[type="submit"],
.woocommerce-address-fields button[type="submit"],
.woocommerce-EditAddress button[type="submit"] {
    display:         inline-flex;
    align-items:     center;
    justify-content: center;
    padding:         1rem 2.5rem;
    border:          1.5px solid var(--tbc-color-text);
    border-radius:   50px;
    background:      transparent;
    font-family:     var(--tbc-font-body);
    font-size:       0.85rem;
    font-weight:     700;
    letter-spacing:  0.1em;
    text-transform:  uppercase;
    color:           var(--tbc-color-text);
    cursor:          pointer;
    transition:      background 0.25s ease, border-color 0.25s ease;
    margin-top:      1rem;
}

.woocommerce-EditAccountForm button[type="submit"]:hover,
.woocommerce-address-fields button[type="submit"]:hover,
.woocommerce-EditAddress button[type="submit"]:hover {
    background:   var(--tbc-pink);
    border-color: var(--tbc-pink);
}

/* Select2 (Country field) — same underline treatment as checkout */
.woocommerce-address-fields .select2-container--default .select2-selection--single {
    background:    transparent !important;
    border:        none !important;
    border-bottom: 1.5px solid rgba(13, 13, 13, 0.2) !important;
    border-radius: 0 !important;
    height:        auto !important;
    box-shadow:    none !important;
}

.woocommerce-address-fields .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding:     0.75rem 1.5rem 0.75rem 0 !important;
    font-family: var(--tbc-font-body) !important;
    font-size:   0.95rem !important;
    color:       var(--tbc-color-text) !important;
}

@media (max-width: 600px) {
    .woocommerce-EditAccountForm .form-row-first,
    .woocommerce-EditAccountForm .form-row-last,
    .woocommerce-address-fields .form-row-first,
    .woocommerce-address-fields .form-row-last {
        width:        100%;
        margin-right: 0;
        display:      block;
    }
}

/* ══════════════════════════════════════════
   ORDERS TABLE
══════════════════════════════════════════ */

.woocommerce-orders-table.shop_table {
    width:           100%;
    border-collapse: collapse;
    font-family:     var(--tbc-font-body);
    font-size:       0.88rem;
}

.woocommerce-orders-table th {
    text-align:     left;
    padding:        0.85rem 1rem;
    font-size:      0.75rem;
    font-weight:    700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color:          rgba(13, 13, 13, 0.55);
    border-bottom:  1.5px solid rgba(13, 13, 13, 0.12);
}

.woocommerce-orders-table td {
    padding:       1rem;
    border-bottom: 1px solid rgba(13, 13, 13, 0.08);
    color:         var(--tbc-color-text);
    vertical-align: middle;
}

.woocommerce-orders-table__cell-order-actions {
    text-align: right;
    white-space: nowrap;
}

.woocommerce-orders-table__cell-order-actions .button {
    display:         inline-flex;
    align-items:     center;
    padding:         0.55rem 1.25rem;
    margin-left:     0.5rem;
    border:          1.5px solid var(--tbc-color-text);
    border-radius:   50px;
    background:      transparent;
    font-family:     var(--tbc-font-body);
    font-size:       0.72rem;
    font-weight:     700;
    letter-spacing:  0.06em;
    text-transform:  uppercase;
    color:           var(--tbc-color-text);
    text-decoration: none;
    white-space:     nowrap;
    transition:      background 0.2s ease, border-color 0.2s ease;
}

.woocommerce-orders-table__cell-order-actions .button:hover {
    background:   var(--tbc-pink);
    border-color: var(--tbc-pink);
}

/* Pagination */
.woocommerce-pagination {
    display:         flex;
    justify-content: space-between;
    margin-top:      2rem;
}

.woocommerce-pagination a {
    display:         inline-flex;
    align-items:     center;
    padding:         0.75rem 1.75rem;
    border:          1.5px solid var(--tbc-color-text);
    border-radius:   50px;
    font-family:     var(--tbc-font-body);
    font-size:       0.8rem;
    font-weight:     700;
    letter-spacing:  0.08em;
    text-transform:  uppercase;
    color:           var(--tbc-color-text);
    text-decoration: none;
    transition:      background 0.2s ease, border-color 0.2s ease;
}

.woocommerce-pagination a:hover {
    background:   var(--tbc-pink);
    border-color: var(--tbc-pink);
}

/* "No order has been made yet" notice — Browse products button */
.woocommerce-info .button.wc-forward {
    display:         inline-flex;
    align-items:     center;
    margin-left:     0.75rem;
    padding:         0.5rem 1.25rem;
    background:      var(--tbc-color-text) !important;
    color:           #ffffff !important;
    border-radius:   50px;
    font-family:     var(--tbc-font-body);
    font-size:       0.75rem;
    font-weight:     700;
    letter-spacing:  0.06em;
    text-transform:  uppercase;
    text-decoration: none !important;
    transition:      background 0.2s ease;
}

.woocommerce-info .button.wc-forward:hover { background: var(--tbc-pink-accent) !important; }

@media (max-width: 767.98px) {
    .woocommerce-orders-table.shop_table_responsive thead { display: none; }

    .woocommerce-orders-table.shop_table_responsive tr {
        display:       block;
        margin-bottom: 1.25rem;
        border:        1px solid rgba(13, 13, 13, 0.1);
        border-radius: 10px;
        padding:       0.5rem 1rem;
    }

    .woocommerce-orders-table.shop_table_responsive td {
        display:         flex;
        justify-content: space-between;
        align-items:     center;
        border-bottom:   1px solid rgba(13, 13, 13, 0.06);
        gap:             1rem;
    }

    .woocommerce-orders-table.shop_table_responsive td:last-child { border-bottom: none; }

    .woocommerce-orders-table.shop_table_responsive td::before {
        content:     attr(data-title);
        font-weight: 700;
        font-size:   0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color:       rgba(13, 13, 13, 0.5);
    }

    .woocommerce-orders-table__cell-order-actions {
        justify-content: flex-end !important;
    }
}

/* ══════════════════════════════════════════
   VIEW ORDER (single order details)
══════════════════════════════════════════ */

.woocommerce-order-details,
.woocommerce-customer-details {
    margin-top: 2rem;
}

.woocommerce-order-details__title,
.woocommerce-column__title {
    font-family:    var(--tbc-font-heading);
    font-size:      1rem;
    font-weight:    900;
    text-transform: uppercase;
    color:          var(--tbc-color-text);
    margin-bottom:  1rem;
}

table.woocommerce-table--order-details {
    width:           100%;
    border-collapse: collapse;
    font-family:     var(--tbc-font-body);
    font-size:       0.88rem;
    margin-bottom:   1.5rem;
}

table.woocommerce-table--order-details th,
table.woocommerce-table--order-details td {
    padding:       0.85rem 1rem;
    border-bottom: 1px solid rgba(13, 13, 13, 0.08);
    text-align:    left;
}

table.woocommerce-table--order-details tfoot th,
table.woocommerce-table--order-details tfoot td { border-bottom: none; }

.woocommerce-customer-details address {
    font-style:  normal;
    font-family: var(--tbc-font-body);
    font-size:   0.9rem;
    line-height: 1.7;
    color:       rgba(13, 13, 13, 0.75);
    border:      1px solid rgba(13, 13, 13, 0.15);
    border-radius: 12px;
    padding:     1.5rem;
}
