/* ============================================================
   B2BKing – restyle Offers, Conversations, Purchase Lists and the
   Bulk Order Form to match the Multipack brand (green primary /
   blue secondary - confirmed from the live theme's own
   --wd-primary-color / --wd-alternative-color custom properties)
   instead of the plugin's default flat grey/cyan design. Same
   treatment already applied to Subaccounts in
   my-account-subaccounts.css.

   Bulk Order Form section below only covers the "classic" theme
   (b2bking_order_form_theme_setting option, confirmed set to
   "classic" on this site) - the plugin ships two other visual
   themes (cream/indigo) with their own separate, much larger set
   of selectors that aren't rendered here and so aren't touched.

   Every button rule also resets --btn-bgcolor/--btn-bgcolor-hover
   alongside the plain background, and carries !important: Woodmart's
   own generic button rule reads its background from those custom
   properties, and depending on load order that rule can otherwise
   win over a same-specificity plain `background` override - see the
   longer note in my-account-subaccounts.css.
   ============================================================ */

/* ---- Offers ---- */

#b2bking_myaccount_offers_title {
    color: var(--wd-text-color, #373737);
}

.b2bking_myaccount_individual_offer_top {
    background: var(--wd-alternative-color, #383838) !important;
}

.b2bking_myaccount_individual_offer_bottom_line_add button.b2bking_myaccount_individual_offer_bottom_line_button {
    --btn-bgcolor: var(--wd-primary-color, #3AB1E4) !important;
    background: var(--wd-primary-color, #3AB1E4) !important;
    box-shadow: none !important;
}
.b2bking_myaccount_individual_offer_bottom_line_button:hover,
.b2bking_myaccount_individual_offer_bottom_line_add button.b2bking_myaccount_individual_offer_bottom_line_button:hover {
    --btn-bgcolor-hover: var(--wd-primary-color, #0088c2) !important;
    background: var(--wd-primary-color, #0088c2) !important;
    filter: brightness(0.85);
}

.b2bking_offer_download {
    background: var(--wd-alternative-color, #8f8f8f) !important;
}
.b2bking_offer_download:hover {
    filter: brightness(0.85);
}

/* ---- Conversations ---- */

#b2bking_myaccount_conversations_title {
    color: var(--wd-text-color, #373737);
}

#b2bking_myaccount_conversations_container_top button,
button.b2bking_myaccount_start_conversation_button,
.b2bking_myaccount_conversation_endpoint_button {
    --btn-bgcolor: var(--wd-primary-color, #3AB1E4) !important;
    background: var(--wd-primary-color, #3AB1E4) !important;
    box-shadow: none !important;
}
#b2bking_myaccount_conversations_container_top button:hover,
button.b2bking_myaccount_start_conversation_button:hover,
.b2bking_myaccount_conversation_endpoint_button:hover {
    --btn-bgcolor-hover: var(--wd-primary-color, #0088c2) !important;
    background: var(--wd-primary-color, #0088c2) !important;
    filter: brightness(0.85);
}

.b2bking_myaccount_individual_conversation_top,
.b2bking_myaccount_new_conversation_top,
#b2bking_myaccount_conversation_endpoint_container_top_header {
    background: var(--wd-alternative-color, #646464) !important;
}

button.b2bking_myaccount_view_conversation_button {
    --btn-bgcolor: var(--wd-alternative-color, #5B5B5B) !important;
    background: var(--wd-alternative-color, #5B5B5B) !important;
}
button.b2bking_myaccount_view_conversation_button:hover {
    filter: brightness(0.85);
}

.b2bking_myaccount_conversations_pagination_button a {
    background: var(--wd-alternative-color, #A3A3A3) !important;
    box-shadow: none !important;
}
.b2bking_myaccount_conversations_pagination_button a:hover {
    filter: brightness(0.85);
}

.b2bking_conversation_message_self {
    background: color-mix(in srgb, var(--wd-primary-color, #83b735) 12%, #ffffff);
}

/* ---- Purchase Lists (overview table) ---- */

.b2bking_purchase_lists_top_title {
    color: var(--wd-text-color, #373737);
}

button#b2bking_purchase_list_new_button {
    --btn-bgcolor: var(--wd-primary-color, #3AB1E4) !important;
    background: var(--wd-primary-color, #3AB1E4) !important;
    box-shadow: none !important;
}
button#b2bking_purchase_list_new_button:hover {
    --btn-bgcolor-hover: var(--wd-primary-color, #0088c2) !important;
    background: var(--wd-primary-color, #0088c2) !important;
    filter: brightness(0.85);
}

table#b2bking_purchase_lists_table thead tr th {
    background: var(--wd-alternative-color, #646464) !important;
}

button.b2bking_purchase_lists_view_list {
    --btn-bgcolor: var(--wd-alternative-color, #6abeff) !important;
    background: var(--wd-alternative-color, #6abeff) !important;
}
button.b2bking_purchase_lists_view_list:hover {
    filter: brightness(0.85);
}

/* Hide the DataTables search/length/pagination chrome around the Purchase
   Lists table entirely when there's nothing for them to do (one page's
   worth of rows or fewer) - toggled by my-account-datatables.js, which
   reads DataTables' own page count rather than a fixed row guess. */
.b2bking-dt-controls-hidden {
    display: none !important;
}

/* ---- Bulk Order Form (classic theme only - see file docblock) ---- */

button.b2bking_bulkorder_form_container_bottom_add_button {
    --btn-bgcolor: var(--wd-primary-color, #3AB1E4) !important;
    background: var(--wd-primary-color, #3AB1E4) !important;
}
button.b2bking_bulkorder_form_container_bottom_add_button:hover {
    --btn-bgcolor-hover: var(--wd-primary-color, #0088c2) !important;
    background: var(--wd-primary-color, #0088c2) !important;
    filter: brightness(0.85);
}

button.b2bking_bulkorder_form_container_bottom_save_button,
button.b2bking_bulkorder_form_container_bottom_update_button {
    --btn-bgcolor: var(--wd-primary-color, #939393) !important;
    background: var(--wd-primary-color, #939393) !important;
}
button.b2bking_bulkorder_form_container_bottom_save_button:hover,
button.b2bking_bulkorder_form_container_bottom_update_button:hover {
    --btn-bgcolor-hover: var(--wd-primary-color, #666666) !important;
    background: var(--wd-primary-color, #666666) !important;
    filter: brightness(0.85);
}

.b2bking_bulkorder_form_container_content_line_livesearch {
    background: var(--wd-alternative-color, #646464) !important;
}
.b2bking_livesearch_product_result:hover {
    filter: brightness(0.7);
}
