/* ============================================================
   B2BKing – restyle the Subaccounts list to match the site's
   look (white cards, brand-colour accents, more compact) instead
   of the plugin's default flat grey/cyan, oversized design.
   ============================================================ */

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

/* "New subaccount" + edit/create panel buttons: same brand colour, smaller.
   !important throughout: Woodmart's own generic button rule
   (:is(.btn,.button,button,...) { background-color: var(--btn-bgcolor, ...) })
   has lower specificity than these but loads later in some contexts (e.g. a
   theme critical-CSS pass), so a plain override can silently lose depending
   on load order - !important plus resetting --btn-bgcolor itself closes that
   gap regardless of which rule the button's actual background ends up
   reading from. */
button.b2bking_subaccounts_container_top_button,
button.b2bking_subaccounts_new_account_container_content_bottom_button,
button.b2bking_subaccounts_edit_account_container_content_bottom_button,
button.b2bking_subaccounts_account_button {
    --btn-bgcolor: var(--wd-primary-color, #3AB1E4) !important;
    background: var(--wd-primary-color, #3AB1E4) !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    min-width: 0 !important;
    height: 32px !important;
}
button.b2bking_subaccounts_container_top_button:hover,
button.b2bking_subaccounts_new_account_container_content_bottom_button:hover,
button.b2bking_subaccounts_edit_account_container_content_bottom_button:hover,
button.b2bking_subaccounts_account_button:hover {
    --btn-bgcolor-hover: var(--wd-primary-color, #0088c2) !important;
    background: var(--wd-primary-color, #0088c2) !important;
    filter: brightness(0.85);
}

/* "Delete subaccount": keep visually distinct (muted grey) from the brand-colour actions */
button.b2bking_subaccounts_edit_account_container_content_bottom_button_delete {
    border-radius: 4px !important;
    box-shadow: none !important;
    min-width: 0 !important;
    height: 32px !important;
}

/* New/Edit Subaccount panel header bar - same blue used for the Subaccounts
   card header above, instead of the plugin's default flat grey. This class
   is shared by both the "New Subaccount" and "Edit Subaccount" panels. */
.b2bking_subaccounts_new_account_container_top {
    background: var(--wd-alternative-color, #9e9e9e) !important;
}

/* ---- Compact card ---- */
.b2bking_subaccounts_account_container {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    box-shadow: none;
    border-radius: 8px;
    overflow: hidden;
    min-height: 0;
    margin-bottom: 16px;
}

.b2bking_subaccounts_account_top {
    background: var(--wd-primary-color, #373737) !important;
    border-radius: 0;
    min-height: 0;
    padding: 6px 0;
}
svg.b2bking_subaccounts_account_top_icon {
    width: 16px;
}

.b2bking_subaccounts_account_line {
    margin: 10px 15px;
}

.b2bking_subaccounts_account_phone_email {
    margin-top: 6px;
}
.b2bking_subaccounts_account_phone_email_text {
    line-height: 16px;
}

/* The plugin always renders the job-title and phone lines even when empty
   (a real account may have neither set), leaving a blank gap above the
   email - collapse those specific lines instead when there's nothing in
   them. */
.b2bking_subaccounts_account_title:empty,
.b2bking_subaccounts_account_phone_email_text:empty {
    display: none;
}

.b2bking_subaccounts_account_name {
    font-size: 15px;
    line-height: 19px;
    margin-bottom: 2px;
    color: #222222;
}

.b2bking_subaccounts_account_title {
    color: #777777;
}

/* ---- My Account notices (e.g. "Confirm email address", "No order has been made
   yet.") – the notice box itself (colour, icon, border) is fine as WooCommerce/
   the theme render it; only the call-to-action button inside needs to read as an
   underlined link instead of a bordered button. Scoped to My Account only so
   cart/checkout notices are unaffected. Every property carries !important, since
   the theme's own ":is(.woocommerce-error,.woocommerce-message,.woocommerce-info)
   :is(.button,.wc-backward)" rule is itself a high-specificity override that
   otherwise wins. ---- */
.woocommerce-MyAccount-content .woocommerce-info :is(.button, .woocommerce-Button, .wc-forward, .wc-backward),
.woocommerce-MyAccount-content .woocommerce-message :is(.button, .woocommerce-Button, .wc-forward, .wc-backward) {
    display: inline !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 0 0 4px !important;
    height: auto !important;
    line-height: inherit !important;
    text-decoration: underline !important;
    /* Keep the notice's own text colour (white, matching the box) - only
       strip the button-shaped background/border and add the underline. The
       theme reads this button's colour via --btn-color (a more specific base
       .button rule elsewhere), not a plain `color` declaration, so it's reset
       to currentColor here rather than left alone, so it actually inherits
       the surrounding notice text colour instead of whatever --btn-color was
       otherwise set to. */
    --btn-color: currentColor !important;
    --btn-color-hover: currentColor !important;
    color: currentColor !important;
    -webkit-text-fill-color: currentColor !important;
}
