/* =============================================================================
   ACCOUNT & CART
   My Account, WC Blocks cart, checkout, subscriptions, order pages
   Source: customiser.css
============================================================================= */

/* ── Gift card cards (dashboard.php + subscriptions-dashboard.php) ─────── */

.pw-gc-cards { display: flex; flex-direction: column; gap: 12px; }
.pw-gc-card { border: 1px solid #e0e0e0; border-radius: 6px; overflow: hidden; background: #fff; }
.pw-gc-card--exhausted { opacity: .65; }
.pw-gc-card__header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 10px; border-bottom: 1px solid #f0f0f0; gap: 12px; }
.pw-gc-card__code { font-family: monospace; font-size: 1rem; font-weight: 700; letter-spacing: .04em; color: #1a1a1a; }
.pw-gc-card__status-badge { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: 20px; white-space: nowrap; }
.pw-gc-card--active .pw-gc-card__status-badge { background: #e6f4ea; color: #1e7e34; }
.pw-gc-card--exhausted .pw-gc-card__status-badge { background: #f0f0f0; color: #777; }
.pw-gc-card__body { padding: 14px 16px; }
.pw-gc-card__balance-row { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pw-gc-card__balance-label { font-size: .8rem; color: #666; }
.pw-gc-card__balance-value { font-size: 1.15rem; font-weight: 700; color: #1a1a1a; }
.pw-gc-card__balance-of { font-size: .8rem; font-weight: 400; color: #888; margin-left: 4px; }
.pw-gc-card__bar-wrap { height: 6px; border-radius: 3px; background: #eee; margin-bottom: 10px; overflow: hidden; }
.pw-gc-card__bar-fill { height: 100%; border-radius: 3px; }
.pw-gc-card--active .pw-gc-card__bar-fill { background: var(--pw-primary, #2e7d32); }
.pw-gc-card--exhausted .pw-gc-card__bar-fill { background: #bbb; }
.pw-gc-card__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: .8rem; color: #666; }
.pw-gc-card__meta-sep { color: #ccc; }

@media (max-width: 480px) {
    .pw-gc-card__balance-row { flex-direction: column; gap: 2px; }
}

/* --- Page backgrounds (cart / checkout) ---------------------------------- */

body.woocommerce-cart,
body.page-id-9,
body.woocommerce-checkout {
    background: url(/wp-content/uploads/2025/12/animal-texture-img-62.svg);
    max-width: 100%;
    margin-bottom: 0!important;
    background-color: #F9F8F6;
}

/* --- My Account nav ------------------------------------------------------ */

.woocommerce-account .woocommerce-MyAccount-navigation {
    width: 100%;
    background: #DBE4A9;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 3px 3px 15px -2px #d1d0d0;
}

/* Collapse toggle — visible ≤1199px only (d-xl-none hides it above) */
.pw-account-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: rgba(255,255,255,0.45);
    border: 1px solid rgba(40,66,65,0.2);
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 700;
    font-size: 1rem;
    color: #284241;
    cursor: pointer;
    text-align: left;
    margin-top: 10px;
}

.pw-account-nav-toggle:hover,
.pw-account-nav-toggle:focus-visible {
    background: rgba(255,255,255,0.65);
    outline: none;
}

.pw-nav-chevron svg {
    display: block;
    transition: transform 0.2s ease;
}

.pw-account-nav-toggle[aria-expanded="true"] .pw-nav-chevron svg {
    transform: rotate(180deg);
}

#pw-account-nav-links {
    margin-top: 6px;
}

/* Reduce vertical padding of the nav card on smaller screens */
@media (max-width: 1199px) {
    .woocommerce-MyAccount-navigation.py-5 {
        padding-top: 1.25rem !important;
        padding-bottom: 1.25rem !important;
    }

    /* Active item already shown in toggle button — hide it from the expanded list */
    #pw-account-nav-links .list-group-item.active {
        display: none;
    }
}

/* --- Account cards ------------------------------------------------------- */

.woocommerce-dashboard .card {
    background: transparent;
    border: none;
}

.woocommerce-account .card {
    border: none;
}

section.card.shadow-sm.subs-card {
    background: #fff;
}

section.card.promo-card.shadow-sm.mb-4 {
    background: #fff;
}

.promo-title {
    color: #1f5f63;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.6em;
    margin-bottom: 25px!important;
}

h2.h6.mb-3.subs-title {
    font-size: 2em!important;
    margin-bottom: 25px!important;
}

header.woocommerce-Address-title.title h2 {
    font-size: 1.6em!important;
}

/* --- Alert / notice styling ---------------------------------------------- */

.alert-info {
    background: #e9e6967d;
    border: none!important;
}

/* --- Card body ----------------------------------------------------------- */

.card-body {
    padding: 20px 30px;
}

/* --- List group ---------------------------------------------------------- */

.list-group-item,
.list-group-item.active,
.list-group-item:hover {
    background: url(/wp-content/uploads/2025/11/white-underline.png) bottom left no-repeat;
    background-size: contain;
    min-height: 50px;
}

/* --- WC Blocks: cart ----------------------------------------------------- */

h2.wp-block-woocommerce-cart-order-summary-heading-block.wc-block-cart__totals-title {
    font-size: 2em!important;
    text-align: center;
    color: #4D6B6B;
}

.wc-block-components-totals-wrapper {
    border-bottom: 1px solid hsla(0,0%,7%,.11);
    border-top: 0!important;
    padding: 16px 0;
}

a.wc-block-components-product-name {
    text-decoration: none; /* was: 0 — invalid, fixed */
    font-size: 1.4em!important;
    color: #4d6b6b;
    font-weight: bold;
}

.wc-block-components-product-metadata {
    font-size: 1.2em!important;
    font-weight: 300;
    color: #4d6b6b;
}

.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__header th,
table.wc-block-cart-items .wc-block-cart-items__header th {
    font-weight: 700!important;
    color: #4d6b6b;
    font-size: 1.3em;
}

span.wc-block-formatted-money-amount.wc-block-components-formatted-money-amount.wc-block-components-product-price__value {
    font-size: 1.3em;
    font-weight: bolder;
    color: #4d6b6b;
}

.wc-block-cart__main .wc-block-cart-items {
    border-bottom: 0!important;
    border-spacing: 0;
}

a.wc-block-components-button.wp-element-button.wc-block-cart__submit-button.contained {
    border-radius: 20px;
    background: #4d6b6b;
    text-decoration: none;
    color: #fff;
}

.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__prices{
    display: none!important;
}
.pw-mnm-container .wc-block-cart-item__prices {
    display: none!important;
}

.wc-block-components-sidebar.wc-block-cart__sidebar.wp-block-woocommerce-cart-totals-block {
    background: #dbe4a9;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 3px 3px 3px #eee;
}

@media(max-width: 911px){
    .wc-block-components-sidebar.wc-block-cart__sidebar.wp-block-woocommerce-cart-totals-block{
        margin-top: 15px;
    }
}

/* !important-flag: box-sizing:border-box is already set globally by Bootstrap */
.wc-block-components-sidebar-layout .wc-block-components-main {
    box-sizing: border-box;
    margin: 0;
    padding-right: 4.5283018868%;
    width: 65%!important;
}

/* --- WC Blocks: checkout ------------------------------------------------- */

.wp-block-woocommerce-checkout {
    container-type: inline-size;
    margin: 0;
    width: 100%;
    background: #fff;
    padding: 50px;
    padding-top: 50px!important;
    box-shadow: -2px 0px 10px 4px #eee;
}

.wc-block-components-form .wc-block-components-text-input input[type=email],
.wc-block-components-form .wc-block-components-text-input input[type=number],
.wc-block-components-form .wc-block-components-text-input input[type=password],
.wc-block-components-form .wc-block-components-text-input input[type=tel],
.wc-block-components-form .wc-block-components-text-input input[type=text],
.wc-block-components-form .wc-block-components-text-input input[type=url],
.wc-block-components-text-input input[type=email],
.wc-block-components-text-input input[type=number],
.wc-block-components-text-input input[type=password],
.wc-block-components-text-input input[type=tel],
.wc-block-components-text-input input[type=text],
.wc-block-components-text-input input[type=url] {
    background-color: #fff;
    border: 1px solid #d6d6d6!important;
    border-radius: 20px;
    box-sizing: border-box;
    color: #2b2d2f;
    font-family: inherit;
    font-size: 16px;
    font-style: inherit;
    font-weight: inherit;
    height: 50px;
    letter-spacing: inherit;
    line-height: 25px;
    margin: 0;
    min-height: 0;
    padding: 16px 12px;
    text-decoration: inherit;
    text-transform: inherit;
    width: 100%;
}

.wc-blocks-components-select .wc-blocks-components-select__select {
    appearance: none;
    background: none;
    border: 1px solid #d6d6d6!important;
    border-radius: 4px;
    box-sizing: border-box;
    color: #2b2d2f;
    font-family: inherit;
    font-size: 16px;
    font-style: inherit;
    font-weight: inherit;
    height: 50px;
    letter-spacing: inherit;
    line-height: 25px;
    padding: 16px 9px 0;
    text-decoration: inherit;
    text-transform: inherit;
    width: 100%;
}

button.wc-block-components-button.wp-element-button.wc-block-components-checkout-place-order-button.contained {
    padding: 10px 80px;
    border: none;
    background: #284142!important;
    color: #fff;
    border-radius: 20px;
}

.pw-mixed-cart .h2 {
    color: #4D6B6B;
}

h2.wc-block-components-title.wc-block-components-checkout-step__title {
    color: #4D6B6B;
    text-align: left;
}

.pw-mixed-cart .wp-block-woocommerce-checkout {
    max-width: 100%;
    margin: 0 auto;
}

/* ── WC Blocks checkout: sticky sidebar offset ───────────────────────────── */
/* Pushes the sticky order-summary sidebar below the site header.
   Mobile: only the compact navbar remains after the topbar collapses (~70px).
   Desktop (≥992px): scrolled header height is 165px — add a little breathing room. */

.wc-block-components-sidebar.wc-block-checkout__sidebar.wp-block-woocommerce-checkout-totals-block.is-sticky {
    top: 70px !important;
}

@media (min-width: 992px) {
    .wc-block-components-sidebar.wc-block-checkout__sidebar.wp-block-woocommerce-checkout-totals-block.is-sticky {
        top: 175px !important;
    }
}

/* Contact page */
article.mb-5.post-7.page.type-page.status-publish.hentry .content {
    padding: 3rem;
    background: #fff;
    box-shadow: 0px 1px 12px #dfdcdc;
}

@media (max-width: 767px){
    article.mb-5.post-7.page.type-page.status-publish.hentry .content {
        padding: 20px;
    }
}

/* ── My Account: login / register forms ──────────────────────────────────── */

.pw-login-page {
    padding: 2rem 0 4rem;
}

.pw-login-box {
    background: #284241;
    border-radius: 16px;
    padding: 2rem 2.5rem;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.pw-login-box__title {
    font-size: 1.5rem;
    color: #ffffff;
    margin-bottom: 1.5rem!important;
}

.pw-login-box .form-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: #000000;
    margin-bottom: 0.35rem;
}

.woocommerce-page.woocommerce-lost-password .pw-login-box .form-label{
    color: #ffffff;
}

.pw-login-box .form-control {
    border-radius: 10px;
    border-color: #ddd;
    padding: 0.5rem 1rem;
    height: auto;
    font-size: 0.95rem;
}

.pw-login-box .form-control:focus {
    border-color: #245255;
    box-shadow: 0 0 0 0.2rem rgba(36, 82, 85, 0.15);
}

.pw-login-remember {
    font-size: 0.875rem;
    cursor: pointer;
    color: #555;
}

.pw-account-btn {
    background: #245255;
    color: #fff !important;
    border: none;
    border-radius: 20px;
    padding: 6px 35px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s ease;
    text-decoration: none;
    display: inline-block;
    line-height: 1.6;
}

.woocommerce .woocommerce-form-login .woocommerce-form-login__submit{
    margin-right: 0;
}

.pw-account-btn:hover,
.pw-account-btn:focus {
    background: #1a3d3f;
    color: #fff !important;
    outline: none;
}

.pw-login-box .woocommerce-LostPassword a {
    color: #245255;
    font-size: 0.875rem;
    font-weight: bold;
    text-decoration: none;
}

.pw-login-box .required {
    color: #c0392b;
    margin-left: 2px;
}

.pw-login-box .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
}

.woocommerce form.login{
    border: none;
    border-radius: 20px;
}

/* ── Login help / magic link section ─────────────────────────────────────── */

.pw-login-help {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.pw-login-help__title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.6rem;
}

.pw-login-help__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.pw-login-help__list li {
    font-size: 0.875rem;
}

.pw-login-help__list a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.pw-login-help__list a:hover {
    color: #fff;
}

.pw-magic-toggle {
    background: none;
    border: none;
    padding: 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.875rem;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.pw-magic-toggle:hover {
    color: #fff;
}

.pw-magic-wrap .form-control {
    font-size: 0.875rem;
}

.pw-magic-wrap .pw-account-btn {
    padding: 6px 20px;
    white-space: nowrap;
    background:#ffffff;
    color: #245255!important;
}

.pw-magic-message--success {
    color: #a8e6b0;
}

.pw-magic-message--error {
    color: #ffb3b3;
}

/* ── Lost password page ──────────────────────────────────────────────────── */

.pw-login-box__intro {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.pw-login-back-link {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.875rem;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.pw-login-back-link:hover {
    color: #fff;
}

/* ── Orders table: item breakdown row (all sizes) ───────────────────────── */
.woocommerce-orders-table__items-row td {
    border-top: none !important;
    padding-top: 0.1rem;
    padding-bottom: 0.6rem;
}
.pw-order-items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem 1.25rem;
    font-size: 0.82em;
    color: #888;
}
.pw-order-items--children {
    flex-direction: column;
    gap: 0.1rem;
    padding-left: 0.75rem;
    margin-top: 0.2rem;
    border-left: 2px solid rgba(0,0,0,.08);
    font-size: 1em;
}

/* ── Orders table: stack on mobile ──────────────────────────────────────── */
@media (max-width: 767px) {
    .woocommerce-orders-table.table {
        display: block;
    }
    .woocommerce-orders-table .table-responsive {
        overflow-x: visible;
    }
    .woocommerce-orders-table thead,
    .woocommerce-orders-table tbody {
        display: block;
    }
    .woocommerce-orders-table thead {
        display: none;
    }
    /* Every tr becomes a block; card styling split between the two row types */
    .woocommerce-orders-table tr {
        display: block;
    }
    /* Main order row: top half of the card */
    .woocommerce-orders-table__row {
        border: 1px solid rgba(0,0,0,.1);
        border-bottom: none;
        border-radius: 8px 8px 0 0;
        padding: 0.25rem 0;
        margin-bottom: 0;
    }
    /* Items row: bottom half of the card */
    .woocommerce-orders-table__items-row {
        border: 1px solid rgba(0,0,0,.1);
        border-top: none;
        border-radius: 0 0 8px 8px;
        margin-bottom: 1rem;
        padding: 0.5rem 0.75rem 0.6rem;
    }
    .woocommerce-orders-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        padding: 0.5rem 0.75rem;
        border-bottom: 1px solid rgba(0,0,0,.06);
    }
    .woocommerce-orders-table td:last-child {
        border-bottom: none;
    }
    .woocommerce-orders-table td::before {
        content: attr(data-title);
        font-weight: 700;
        flex-shrink: 0;
    }
    /* Items row cell: plain block, no flex label */
    .woocommerce-orders-table__items-row td {
        display: block;
        border-bottom: none;
        padding: 0;
    }
    .woocommerce-orders-table__items-row td::before {
        display: none;
    }
    .woocommerce-orders-table__items-row .pw-order-items {
        flex-direction: column;
        gap: 0.2rem;
    }
}

/*
*********************************
MOBILE LAYOUT FIXES - MANAGE SUBS
*********************************
*/

@media(max-width: 575px){

    .card-body{
        padding: 15px;
    }

    .card-body.edit-items{
        padding: 0;
        padding-top: 20px;
    }

    .card-body.edit-items .table-responsive{
        padding: 10px;
    }

    .woocommerce table#pwSubItemsTable{
        border: none;
    }

    .col-delivery-freq,
    .col-delivery-method{
        padding-left: 15px;
        padding-right: 15px;
    }

    .col-save-changes{
        text-align: center;
    }
    
    .col-save-changes button{
	width:calc(100% - 20px);
    }
}

/*
Mobile Checkout Adjustments
*/

@media(max-width: 1199px){

    .wc-block-components-sidebar-layout .wc-block-components-main,
    .wc-block-components-sidebar{
        width: 100%!important;
    }

    body.woocommerce-checkout .wc-block-components-sidebar{
        padding-right: 0!important;
        padding-left: 0!important;
    }

}

@media(max-width: 575px){
    
    .wp-block-woocommerce-checkout{
        padding:15px!important;
    }

    .wp-block-woocommerce-checkout-order-summary-block:nth-child(2){
        display: none;
    }

    .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-checkout-order-summary__title{
        margin-top: 0!important;
    }
}