/* ============================================================
   Trade account styles
   Loaded for all pages via assets.php (filemtime cache-busted)
   ============================================================ */


/* ── Single product: Add to Cart + Add to Project 50/50 row ─────────────── */

/* Bootstrap row handles the 50/50 split via col-6 in the PHP templates.
   Layout:  [ qty input right-aligned above right col ]
            [ ADD TO CART (left) | ADD TO PROJECT (right) — equal height ] */

/* Qty input: right-aligned above the button row */
.product-cta-qty {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.35rem;
}

.product-cta-row {
    margin-top: 0;
}

/* Both buttons: consistent height via matching padding */
.product-cta-row .single_add_to_cart_button,
.product-cta-right .yith-wcwl-add-to-wishlist-button {
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
}

/* Both cols: flex column so contents can fill height */
.product-cta-row > .col-6 {
    display: flex;
    flex-direction: column;
}

/* ADD TO CART button: fill the left col height */
.product-cta-row > .col-6 > .single_add_to_cart_button {
    flex: 1;
}

/* Right col: flex column so YITH block fills it */
.product-cta-right {
    display: flex;
    flex-direction: column;
}

.product-cta-right .yith-add-to-wishlist-button-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100% !important;
}

.product-cta-right .yith-wcwl-add-to-wishlist-button {
    flex: 1;
    height: 100% !important;
    width: 100% !important;
    box-sizing: border-box;
}

/* ── Address form: Country / Region select2 ──────────────────────────────── */

/* Force the select2 widget to fill its container (prevents left bleed) */
.woocommerce-address-fields .select2-container {
    width: 100% !important;
}

/* Breathing room above the Save Address button */
.woocommerce-address-fields > p:last-child {
    margin-top: 2rem;
}


/* ── Help & Support: FAQ accordion ───────────────────────────────────────── */

.trade-faq .accordion-item {
    border: 1px solid #456F61;
    border-radius: 0 !important;
    margin-bottom: 12px;
    overflow: hidden;
}

.trade-faq .accordion-button {
    background-color: #456F61;
    color: #fff;
    font-weight: 600;
    border-radius: 0 !important;
}

.trade-faq .accordion-button:not(.collapsed) {
    background-color: #3a5f52;
    color: #fff;
    box-shadow: none;
}

/* White chevron */
.trade-faq .accordion-button::after {
    filter: brightness(0) invert(1);
}

.trade-faq .accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(69, 111, 97, 0.3);
    outline: none;
}

.trade-faq .accordion-body {
    background-color: #fff;
    color: #212529;
    line-height: 1.7;
}

.trade-faq .accordion-body a {
    color: #456F61;
    text-decoration: underline;
}


/* ── VAT display toggle ───────────────────────────────────────────────────── */

.vat-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.vat-toggle-wrapper .vat-toggle-label-text {
    font-size: 0.8rem;
    color: #555;
    letter-spacing: 0.02em;
}

/* Strip Bootstrap's default form-check indentation */
.vat-toggle-wrapper .form-check {
    padding-left: 0;
}

/* The pill track */
.vat-toggle-wrapper .form-check-input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    width: 44px;
    height: 24px;
    border-radius: 999px;
    background-color: #bbb;
    border: none;
    outline: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
    margin: 0;
}

/* The white circle knob */
.vat-toggle-wrapper .form-check-input[type="checkbox"]::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
    transition: transform 0.2s ease;
}

/* Checked state: green track, knob slides right */
.vat-toggle-wrapper .form-check-input[type="checkbox"]:checked {
    background-color: #456F61;
}

.vat-toggle-wrapper .form-check-input[type="checkbox"]:checked::before {
    transform: translateX(20px);
}

.vat-toggle-wrapper .form-check-input[type="checkbox"]:focus {
    box-shadow: 0 0 0 3px rgba(69, 111, 97, 0.2);
}

.vat-toggle-wrapper .form-check-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    user-select: none;
    min-width: 4rem; /* prevents layout shift when label text changes */
}


/* ── Help & Support: contact CTA box ─────────────────────────────────────── */

.trade-help-contact {
    background-color: #f0f4f2;
    border-left: 4px solid #456F61;
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td{
    text-align: left!important;
}

body.woocommerce-wishlist .wishlist-page-links{
    text-align: left;
    padding: 20px 0;
}

body.woocommerce-wishlist .wishlist-page-links a.manage,
body.woocommerce-wishlist .wishlist-page-links a.search{
    display: none;
}

body.page-wishlist-view .wishlist-page-links{
    display: none;
}

.wishlist-page-links-separator{
    display: none;
}


/* ── Wishlist view: page bottom padding ──────────────────────────────────── */
/* The footer_additional_action buttons sit flush against the site footer —
   add clearance so they're never clipped. */
.page-wishlist-view article.blocks {
    padding-bottom: 3rem;
}

/* ── Wishlist view: bulk-actions card ────────────────────────────────────── */

.page-wishlist-view .wishlist-actions-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    background: #f7f7f7;
    border: 1px solid #e2e2e2;
    border-radius: 4px;
    padding: 1rem 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

/* Label sits on its own line above the controls */
.page-wishlist-view .yith_wcwl_wishlist_bulk_action {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    flex: 1 1 auto;
}

.page-wishlist-view .yith_wcwl_wishlist_bulk_action label {
    margin: 0;
    font-size: 0.875rem;
    white-space: nowrap;
}

.page-wishlist-view .yith_wcwl_wishlist_bulk_action select {
    height: 40px;
    padding: 0 0.5rem;
    font-size: 0.875rem;
}

.page-wishlist-view .yith_wcwl_wishlist_update {
    flex-shrink: 0;
}

/* Equal-size Apply / Update buttons */
.page-wishlist-view .wishlist-action-btn {
    display: inline-block;
    min-width: 110px;
    height: 40px;
    line-height: 16px!important;
    padding: 0 1.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
    background-color: #456F61;
    color: #fff;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.page-wishlist-view .move-to-another-wishlist-button{
    background-color: #000000;
    color:#ffffff;
    width: 100%;
    padding: 8px 0;
}

.page-wishlist-view .wishlist-action-btn:hover {
    background-color: #3a5f52;
    color: #fff;
}

/* ── Wishlist view: project CTA card (Send list / Add all to cart) ────────── */

.page-wishlist-view .wishlist-cta-card {
    background: #f7f7f7;
    border: 1px solid #e2e2e2;
    border-radius: 4px;
    padding: 1.25rem 1.5rem;
    margin-top: 1.5rem;
}

.page-wishlist-view .wishlist-cta-intro {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #444;
}

.page-wishlist-view .yith_wcwl_footer_additional_action {
    float: none !important;
    padding: 0 !important;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.yith_wcwl_wishlist_footer .yith_wcwl_wishlist_bulk_action input[type="submit"] {
margin-left: 0!important;
}

.page-wishlist-view .wishlist_table .product-add-to-cart a.button{
    padding:0.9rem 3.675rem 0.8rem !important;
    width: 100%;
    display: block!important;
}

.product-add-to-cart .dateadded{
    margin-bottom: 5px;
}

/* ── Send project list popup form ────────────────────────────────────────── */

/* Checkbox list */
.wishlist-ask-an-estimate-popup .estimate-checkboxes {
    margin-bottom: 0.75rem;
}

.wishlist-ask-an-estimate-popup .estimate-checkboxes-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.wishlist-ask-an-estimate-popup .estimate-checkboxes-label small {
    font-weight: 400;
    color: #777;
}

.wishlist-ask-an-estimate-popup .estimate-checkboxes ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wishlist-ask-an-estimate-popup .estimate-checkboxes li {
    margin-bottom: 0.4rem;
}

.wishlist-ask-an-estimate-popup .estimate-checkboxes label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 400;
    color: #333;
    cursor: pointer;
}

.wishlist-ask-an-estimate-popup .estimate-checkboxes input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    accent-color: #456F61;
    cursor: pointer;
}

.wishlist-ask-an-estimate-popup .estimate-conditional-block {
    background: #f7f7f7;
    border: 1px solid #e2e2e2;
    border-radius: 3px;
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.wishlist-ask-an-estimate-popup .estimate-conditional-block input[type="text"],
.wishlist-ask-an-estimate-popup .estimate-conditional-block textarea {
    width: 100%;
    border: 1px solid #ccc;
    padding: 0.45rem 0.6rem;
    font-size: 0.875rem;
}

.wishlist-ask-an-estimate-popup .estimate-conditional-block input[readonly] {
    background: #eee;
    color: #666;
    cursor: default;
}

/* ── Wishlist qty: exceeds-stock warning ─────────────────────────────────── */
.wishlist-qty-warning {
    display: none;
    color: #c0392b;
    font-size: 0.75rem;
    margin: 0.25rem 0 0;
    line-height: 1.3;
}


/* ── Send project list popup: overrides ──────────────────────────────────── */

/* Force all text inputs and textareas to fill the popup width */
.wishlist-ask-an-estimate-popup input[type="text"],
.wishlist-ask-an-estimate-popup input[type="email"],
.wishlist-ask-an-estimate-popup textarea,
.wishlist-ask-an-estimate-popup #additional_notes {
    width: 100% !important;
    box-sizing: border-box;
}

/* Submit button — match site green button style */
.wishlist-ask-an-estimate-popup #ask_an_estimate,
.wishlist-ask-an-estimate-popup .ask-an-estimate-button-popup {
    display: inline-block;
    height: 44px;
    line-height: 44px;
    padding: 0 1.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background-color: #456F61 !important;
    color: #fff !important;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.wishlist-ask-an-estimate-popup #ask_an_estimate:hover,
.wishlist-ask-an-estimate-popup .ask-an-estimate-button-popup:hover {
    background-color: #3a5f52 !important;
    color: #fff !important;
}

.estimate-checkboxes ul{
    margin-top: 10px!important;
}

.estimate-checkboxes label{
    margin-top: 0!important;
}

input[name='estimate_enquiry_type[]']{
    margin-right: 5px;
}


/* ── Add to Wishlist / Project modal (all states) ────────────────────────── */

/* Hide success icon (heart + checkmark SVG) */
.yith-wcwl-modal .lapilliUI-ModalTitle__root svg {
    display: none !important;
}

/* Tab options: accent underline colour */
.yith-wcwl-add-to-wishlist-modal__type_option--selected {
    border-bottom-color: #456F61 !important;
    color: #456F61 !important;
}

/* Primary button (Add to Project / Browse project) */
.yith-wcwl-modal .lapilliUI-Button--colorPrimary,
.yith-wcwl-modal .yith-wcwl-modal__primary-button,
.yith-wcwl-modal .yith-wcwl-feedback-modal__browse-button {
    background-color: #456F61 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 0 !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    padding: 0 1.75rem !important;
    height: 44px !important;
    line-height: 44px !important;
    box-shadow: none !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    cursor: pointer !important;
}

.yith-wcwl-modal .lapilliUI-Button--colorPrimary:hover,
.yith-wcwl-modal .yith-wcwl-modal__primary-button:hover,
.yith-wcwl-modal .yith-wcwl-feedback-modal__browse-button:hover {
    background-color: #3a5f52 !important;
    color: #fff !important;
}

/* Secondary "Close" text button */
.yith-wcwl-modal .yith-wcwl-modal__secondary-button {
    background-color: #222 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 0 !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    padding: 0 1.75rem !important;
    height: 44px !important;
    box-shadow: none !important;
    cursor: pointer !important;
}

.yith-wcwl-modal .yith-wcwl-modal__secondary-button:hover {
    background-color: #000 !important;
    color: #fff !important;
}

/* × close button (top right) */
.yith-wcwl-modal .lapilliUI-Modal__close {
    background-color: #222 !important;
    color: #fff !important;
    border-radius: 0 !important;
    opacity: 1 !important;
    top:0!important;
    right: 0!important;
}

.yith-wcwl-modal .lapilliUI-Modal__close:hover {
    background-color: #000 !important;
}

.yith-wcwl-modal .lapilliUI-Paper__root{
    border-radius: 0!important;
}

td.product-add-to-cart .remove_from_wishlist{
    display: none!important;
}


/* ── CORE Orders: order detail page ─────────────────────────────────────── */

/* Billing/Shipping and Order details headings — keep them proportional
   (theme h2 styles are too large for these sub-section labels) */
.woocommerce-column__title,
.woocommerce-order-details__title {
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    margin-top: 0 !important;
    margin-bottom: 0.6rem !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

/* Tfoot totals: right-align label and value to the Line Total column */
.woocommerce-table--order-details tfoot th {
    text-align: right !important;
    font-weight: 400;
}

.woocommerce-table--order-details tfoot tr:last-child th,
.woocommerce-table--order-details tfoot tr:last-child td {
    font-weight: 700;
}

.woocommerce-table--order-details tfoot td {
    text-align: right !important;
    white-space: nowrap;
}