/* Custom account layout, shared by the shortcodes and Elementor account cards. */


body.woocommerce-account {
    --sh-orange: #ff471f;
    --sh-black: #0b0b0b;
    --sh-text: #171717;
    --sh-muted: #777;
    --sh-light: #f5f2f1;
    --sh-light-2: #f9f7f6;
    --sh-border: #ece8e6;
    --sh-white: #fff;
    --sh-green: #17a653;
    --sh-green-bg: #e8f8ef;
    --sh-blue: #1479e8;
    --sh-blue-bg: #e9f3ff;
}

body.woocommerce-account .sh-account-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
    margin: 0 0 42px;
}

body.woocommerce-account .sh-account-card {
    position: relative;
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 16px;

    min-height: 102px;
    padding: 18px 20px;

    background: var(--sh-white);
    border: 1px solid var(--sh-border);
    border-radius: 14px;

    color: var(--sh-text) !important;
    text-decoration: none !important;

    transition:
        transform .2s ease,
        border-color .2s ease,
        box-shadow .2s ease;
}

body.woocommerce-account .sh-account-card:hover {
    transform: translateY(-2px);
    border-color: var(--sh-orange);
    box-shadow: 0 10px 30px rgba(0,0,0,.05);
}

body.woocommerce-account .sh-account-card.is-active {
    border-color: var(--sh-orange);
    box-shadow: inset 0 0 0 1px var(--sh-orange);
}

body.woocommerce-account .sh-account-card-icon {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #f3e7e4;
    border-radius: 11px;

    color: var(--sh-orange);
    font-size: 27px;
    font-weight: 700;
    line-height: 1;
}

body.woocommerce-account .sh-account-card:first-child .sh-account-card-icon {
    background: var(--sh-orange);
    color: #fff;
}

body.woocommerce-account .sh-account-card-content {
    min-width: 0;
    flex: 1;
}

body.woocommerce-account .sh-account-card-content strong {
    display: block;
    margin: 0 0 5px;

    color: var(--sh-text);
    font-size: 20px;
    line-height: 1.05;
}

body.woocommerce-account .sh-account-card-content small {
    display: block;

    color: #636363;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 400;
}

body.woocommerce-account .sh-account-card-arrow {
    flex: 0 0 auto;
    margin-left: auto;

    color: var(--sh-black);
    font-size: 27px;
    line-height: 1;

    transition: transform .2s ease;
}

body.woocommerce-account .sh-account-card:hover .sh-account-card-arrow {
    transform: translateX(3px);
}

body.woocommerce-account .sh-account-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(290px, .95fr);
    align-items: start;
    gap: 20px;
    width: 100%;
}

body.woocommerce-account .sh-account-orders-panel {
    min-width: 0;

    background: var(--sh-white);
    border: 1px solid var(--sh-border);
    border-radius: 14px;

    padding: 26px;
}

body.woocommerce-account .sh-account-section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;

    margin: 0 0 22px;
}

body.woocommerce-account .sh-account-section-heading h2 {
    margin: 0;

    color: var(--sh-text);
    font-size: clamp(30px, 3vw, 44px);
    line-height: 1;
}

body.woocommerce-account .sh-account-section-heading p {
    margin: 8px 0 0;
    color: var(--sh-muted);
}

body.woocommerce-account .sh-account-section-heading > a {
    color: var(--sh-orange) !important;
    text-decoration: none !important;

    font-size: 15px;
    font-weight: 600;

    white-space: normal;
}

body.woocommerce-account .sh-account-section-heading > a:hover {
    text-decoration: underline !important;
}

body.woocommerce-account .sh-order-list {
    width: 100%;
}

body.woocommerce-account .sh-order-row {
    display: grid;
    grid-template-columns:
        minmax(0, 1.25fr)
        minmax(0, .8fr)
        minmax(0, 1.3fr)
        minmax(0, .7fr)
        minmax(0, .9fr)
        24px;

    align-items: center;
    gap: 18px;

    min-height: 104px;
    padding: 18px 10px;

    color: var(--sh-text) !important;
    text-decoration: none !important;

    border-bottom: 1px solid var(--sh-border);

    transition: background .2s ease;
}

body.woocommerce-account .sh-order-row:last-child {
    border-bottom: 0;
}

body.woocommerce-account .sh-order-row:hover {
    background: var(--sh-light-2);
}

body.woocommerce-account .sh-order-product {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

body.woocommerce-account .sh-order-thumb {
    width: 62px;
    height: 62px;
    flex: 0 0 62px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    background: var(--sh-light);
    border-radius: 12px;
}

body.woocommerce-account .sh-order-thumb img,
body.woocommerce-account .sh-order-thumb-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    margin: 0 !important;
}

body.woocommerce-account .sh-order-number {
    min-width: 0;
}

body.woocommerce-account .sh-order-number strong {
    display: block;
    margin-bottom: 4px;

    color: var(--sh-text);
    font-size: 17px;
    line-height: 1.2;
}

body.woocommerce-account .sh-order-number small {
    color: var(--sh-orange) !important;
    opacity: 1 !important;
}

body.woocommerce-account .sh-order-row small {
    display: block;
    margin: 0 0 5px;

    color: #888;
    font-size: 11px;
    line-height: 1.2;
    font-weight: 400;
}

body.woocommerce-account .sh-order-row strong {
    font-size: 15px;
    font-weight: 600;
}

body.woocommerce-account .sh-order-date,
body.woocommerce-account .sh-order-products,
body.woocommerce-account .sh-order-total {
    min-width: 0;
}

body.woocommerce-account .sh-order-products strong {
    display: block;

    white-space: normal;
    overflow-wrap: anywhere;
}

body.woocommerce-account .sh-order-status {
    width: fit-content;
    max-width: 100%;

    padding: 9px 14px;

    border-radius: 999px;

    background: #eee;
    color: #444;

    font-size: 12px;
    line-height: 1.2;
    font-weight: 600;

    white-space: normal;
}

body.woocommerce-account .sh-order-status.status-processing {
    background: #fff0eb;
    color: var(--sh-orange);
}

body.woocommerce-account .sh-order-status.status-completed {
    background: var(--sh-green-bg);
    color: var(--sh-green);
}

body.woocommerce-account .sh-order-status.status-pending {
    background: var(--sh-blue-bg);
    color: var(--sh-blue);
}

body.woocommerce-account .sh-order-status.status-on-hold {
    background: #fff7dd;
    color: #9c7100;
}

body.woocommerce-account .sh-order-status.status-cancelled,
body.woocommerce-account .sh-order-status.status-failed {
    background: #f2f2f2;
    color: #777;
}

body.woocommerce-account .sh-order-status.status-refunded {
    background: #f0eafa;
    color: #7445aa;
}

body.woocommerce-account .sh-order-arrow {
    color: var(--sh-black);
    font-size: 26px;
    line-height: 1;

    transition: transform .2s ease;
}

body.woocommerce-account .sh-order-row:hover .sh-order-arrow {
    transform: translateX(3px);
}

body.woocommerce-account .sh-account-sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;

    min-width: 0;
}

body.woocommerce-account .sh-quick-actions {
    padding: 20px;

    background: var(--sh-orange);
    border-radius: 14px;
}

body.woocommerce-account .sh-quick-actions h2 {
    margin: 0 0 16px;

    color: #fff;
    font-size: 30px;
    line-height: 1;
}

body.woocommerce-account .sh-quick-action {
    display: flex;
    align-items: center;
    gap: 13px;

    min-height: 66px;
    margin-bottom: 10px;
    padding: 11px 13px;

    background: #fff;
    border-radius: 12px;

    color: var(--sh-text) !important;
    text-decoration: none !important;

    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

body.woocommerce-account .sh-quick-action:last-child {
    margin-bottom: 0;
}

body.woocommerce-account .sh-quick-action:hover {
    transform: translateX(3px);
    box-shadow: 0 6px 18px rgba(0,0,0,.08);
}

body.woocommerce-account .sh-quick-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--sh-orange);
    border-radius: 9px;

    color: #fff;
    font-size: 24px;
    line-height: 1;
}

body.woocommerce-account .sh-quick-action > span:nth-child(2) {
    flex: 1;
    min-width: 0;
}

body.woocommerce-account .sh-quick-action strong {
    display: block;
    margin-bottom: 2px;

    color: var(--sh-text);
    font-size: 15px;
    line-height: 1.2;
}

body.woocommerce-account .sh-quick-action small {
    display: block;

    color: #919191;
    font-size: 12px;
    line-height: 1.3;
}

body.woocommerce-account .sh-quick-arrow {
    color: var(--sh-orange);
    font-size: 26px;
    line-height: 1;
}

body.woocommerce-account .sh-account-help {
    padding: 20px;

    background: #fff;
    border: 1px solid var(--sh-border);
    border-radius: 14px;
}

body.woocommerce-account .sh-account-help-heading {
    display: flex;
    align-items: flex-start;
    gap: 13px;

    margin-bottom: 17px;
}

body.woocommerce-account .sh-account-help-icon {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--sh-light);
    border-radius: 10px;

    font-size: 23px;
}

body.woocommerce-account .sh-account-help-heading > span:last-child {
    min-width: 0;
}

body.woocommerce-account .sh-account-help-heading strong {
    display: block;
    margin-bottom: 4px;

    font-size: 18px;
    line-height: 1.15;
}

body.woocommerce-account .sh-account-help-heading small {
    display: block;

    color: #626262;
    font-size: 13px;
    line-height: 1.4;
}

body.woocommerce-account .sh-account-help-primary,
body.woocommerce-account .sh-account-help-secondary {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;
    width: 100%;

    border-radius: 999px;

    font-size: 13px;
    font-weight: 600;

    text-decoration: none !important;

    transition: .2s ease;
}

body.woocommerce-account .sh-account-help-primary {
    margin-bottom: 8px;

    background: var(--sh-orange);
    color: #fff !important;
}

body.woocommerce-account .sh-account-help-primary:hover {
    background: #e93d18;
}

body.woocommerce-account .sh-account-help-secondary {
    border: 1px solid var(--sh-orange);

    background: transparent;
    color: var(--sh-orange) !important;
}

body.woocommerce-account .sh-account-help-secondary:hover {
    background: #fff2ed;
}

body.woocommerce-account .sh-account-empty {
    padding: 28px;

    background: var(--sh-light);
    border-radius: 12px;
}

body.woocommerce-account .sh-account-empty h3 {
    margin: 0 0 7px;

    font-size: 25px;
}

body.woocommerce-account .sh-account-empty p {
    margin: 0;
    color: #616161;
}

body.woocommerce-account .sh-account-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 43px;
    margin-top: 17px;
    padding: 0 20px;

    background: var(--sh-orange);
    border-radius: 999px;

    color: #fff !important;
    text-decoration: none !important;

    font-weight: 600;
}

body.woocommerce-account .sh-account-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;

    margin-top: 24px;
}

body.woocommerce-account .sh-page-number {
    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--sh-border);
    border-radius: 8px;

    background: #fff;

    color: var(--sh-text) !important;
    text-decoration: none !important;

    font-weight: 600;
}

body.woocommerce-account .sh-page-number:hover,
body.woocommerce-account .sh-page-number.is-active {
    background: var(--sh-orange);
    border-color: var(--sh-orange);
    color: #fff !important;
}

@media (max-width: 1100px) {

    body.woocommerce-account .sh-account-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.woocommerce-account .sh-account-main-grid {
        grid-template-columns: 1fr;
    }

    body.woocommerce-account .sh-account-sidebar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 767px) {

    body.woocommerce-account .sh-account-cards {
        grid-template-columns: 1fr;
        gap: 10px;

        margin-bottom: 28px;
    }

    body.woocommerce-account .sh-account-card {
        min-height: 88px;
        padding: 14px;
    }

    body.woocommerce-account .sh-account-card-icon {
        width: 50px;
        height: 50px;
        flex-basis: 50px;
    }

    body.woocommerce-account .sh-account-card-content strong {
        font-size: 18px;
    }

    body.woocommerce-account .sh-account-main-grid {
        display: block;
    }

    body.woocommerce-account .sh-account-orders-panel {
        padding: 18px 14px;
    }

    body.woocommerce-account .sh-account-section-heading {
        align-items: flex-start;
        flex-direction: column;

        margin-bottom: 14px;
    }

    body.woocommerce-account .sh-account-section-heading h2 {
        font-size: 32px;
    }

    body.woocommerce-account .sh-order-row {
        position: relative;

        display: grid;
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 8px 13px;

        margin-bottom: 12px;
        padding: 15px;

        background: var(--sh-light-2);
        border: 0;
        border-radius: 12px;
    }

    body.woocommerce-account .sh-order-row:last-child {
        margin-bottom: 0;
    }

    body.woocommerce-account .sh-order-product {
        grid-column: 1 / -1;
    }

    body.woocommerce-account .sh-order-date,
    body.woocommerce-account .sh-order-products,
    body.woocommerce-account .sh-order-total {
        grid-column: 2;
    }

    body.woocommerce-account .sh-order-status {
        grid-column: 2;

        margin-top: 5px;
    }

    body.woocommerce-account .sh-order-arrow {
        position: absolute;
        right: 14px;
        top: 50%;

        transform: translateY(-50%);
    }

    body.woocommerce-account .sh-order-row:hover .sh-order-arrow {
        transform: translate(3px, -50%);
    }

    body.woocommerce-account .sh-account-sidebar {
        display: block;
        margin-top: 18px;
    }

    body.woocommerce-account .sh-quick-actions {
        margin-bottom: 14px;
    }

}

@media (max-width: 480px) {

    body.woocommerce-account .sh-account-card-content small {
        font-size: 12px;
    }

    body.woocommerce-account .sh-account-card-arrow {
        font-size: 23px;
    }

    body.woocommerce-account .sh-account-orders-panel {
        border-radius: 10px;
    }

    body.woocommerce-account .sh-order-thumb {
        width: 54px;
        height: 54px;
        flex-basis: 54px;
    }

    body.woocommerce-account .sh-quick-actions h2 {
        font-size: 27px;
    }
}
/* The custom sections own their cards; the shortcode wrapper has no extra frame. */
body.woocommerce-account .shux-account-custom {
    min-width: 0;
    width: 100%;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
}
body.woocommerce-account :is(.shux-account-custom, .sh-account-cards, .sh-account-main-grid, .sh-account-sidebar),
body.woocommerce-account :is(.shux-account-custom, .sh-account-cards, .sh-account-main-grid, .sh-account-sidebar) * {
    box-sizing: border-box;
}
body.woocommerce-account .sh-order-row > * { min-width: 0; overflow-wrap: anywhere; }
body.woocommerce-account .sh-account-orders-panel { container-type: inline-size; }
body.woocommerce-account .sh-account-section-heading { flex-wrap: wrap; }
body.woocommerce-account .shux-account-custom .sh-account-section-heading h2 {
    margin: 0 !important;
    font-size: clamp(30px, 3vw, 44px) !important;
    line-height: 1.1 !important;
}
body.woocommerce-account .shux-account-custom a.sh-order-row:hover { text-decoration: none; }
body.woocommerce-account .sh-address-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}
body.woocommerce-account .sh-address-card {
    min-width: 0;
    padding: 24px;
    border: 1px solid var(--sh-border);
    border-radius: 14px;
    background: var(--sh-white);
}
body.woocommerce-account .sh-address-card-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
body.woocommerce-account .shux-account-custom .sh-address-card-heading h3 { margin: 0 !important; }
body.woocommerce-account .sh-address-card address { font-style: normal; overflow-wrap: anywhere; }
body.woocommerce-account .shux-account-custom :is(a, button, input, select, textarea):focus-visible,
body.woocommerce-account :is(.sh-account-card, .sh-quick-action, .sh-account-help-primary, .sh-account-help-secondary):focus-visible {
    outline: 2px solid var(--sh-orange);
    outline-offset: 3px;
}
/* Rows must fit the PANEL width, including a narrow desktop Elementor column. */
@container (max-width: 900px) {
    body.woocommerce-account .sh-order-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    body.woocommerce-account .sh-order-product { grid-column: 1 / -1; }
    body.woocommerce-account :is(.sh-order-date, .sh-order-products, .sh-order-total, .sh-order-status) { grid-column: auto; }
    body.woocommerce-account .sh-order-arrow { display: none; }
}
@media (max-width: 767px) {
    body.woocommerce-account .sh-address-grid { grid-template-columns: 1fr; }
    body.woocommerce-account .shux-account-custom .sh-account-section-heading h2 { font-size: 32px !important; }
}
@media (prefers-reduced-motion: reduce) {
    body.woocommerce-account :is(.sh-account-card, .sh-account-card-arrow, .sh-order-row, .sh-order-arrow, .sh-quick-action, .sh-account-help-primary, .sh-account-help-secondary) {
        transition: none;
        transform: none;
    }
}


/* WooCommerce 11.1+ public order-withdrawal endpoint: independent of the
   static Elementor account dashboard. */
.shux-order-withdrawal {
  width: min(100% - 40px, 840px);
  margin: 48px auto 80px;
}
.shux-order-withdrawal__header { margin-bottom: 26px; }
.shux-order-withdrawal__eyebrow {
  font-size: 12px;
  letter-spacing: .09em;
  font-weight: 700;
  margin: 0 0 12px;
}
.shux-order-withdrawal__header h1 {
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.14;
  margin: 0 0 14px;
}
.shux-order-withdrawal__header p:last-child { max-width: 680px; }
.shux-order-withdrawal__form {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 20px;
  padding: clamp(20px, 4vw, 36px);
}
.shux-order-withdrawal__form input:not([type=checkbox]):not([type=radio]),
.shux-order-withdrawal__form textarea,
.shux-order-withdrawal__form select {
  max-width: 100%;
}
@media (max-width: 480px) {
  .shux-order-withdrawal { width: calc(100% - 28px); margin: 26px auto 56px; }
  .shux-order-withdrawal__form { border-radius: 14px; }
}
