/*
 * Marketplace Plugin Compatibility Overrides
 * Scoped to child theme to prevent global style leakage.
 */

/* 1. Membership Plans Search Form UI 
 * Only targets forms containing membership search classes.
 */

.wkmpms-membership-wrapper {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.wkfashion-quantity-changer input[type="number"] {
    width: 20px;
}

.woocommerce-MyAccount-content form:has(.wkmpms_search) table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.woocommerce-MyAccount-content form:has(.wkmpms_search) table tbody tr {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* First Row: Heading Group */
.woocommerce-MyAccount-content form:has(.wkmpms_search) table td:first-child {
    border-bottom: 1px solid #d3d6dc;
    padding-bottom: 15px;
    width: 100% !important;
}

.woocommerce-MyAccount-content form:has(.wkmpms_search) h1 {
    margin: 0;
    color: #101f31;
    font-weight: 700;
    font-size: 1.875rem;
    line-height: 2.25rem;
}

/* Second Row: Search Input Group */
.woocommerce-MyAccount-content form:has(.wkmpms_search) table td:last-child {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 10px;
    width: 100% !important;
}

.wkmpms_search {
    width: max-content !important;
    min-width: 250px;
    height: 44px;
    border: 1px solid #d3d6dc;
    border-radius: 6px;
    padding: 0 16px;
}

.wkmpms_search_button {
    width: max-content !important;
    height: 44px;
    padding: 0 24px;
    color: #ffffff;
    border: 1px solid #101f31;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}


/* Pricing Cards inside the membership wrapper */
.wkmpms-membership-wrapper .wkmpms-pricing-group,
.button-primary,
.wkmp-search-button {
    width: max-content !important;
}

/* 
 * WooCommerce Notice Visibility Fix
 * Restoration of standard notices within the Marketplace Dashboard
 * because the parent theme hides them globally via display:none.
 */
.woocommerce-MyAccount-content .woocommerce-notices-wrapper,
.woocommerce-MyAccount-content .woocommerce-info,
.woocommerce-MyAccount-content .woocommerce-error,
.woocommerce-MyAccount-content .woocommerce-message,
.woocommerce-MyAccount-content .wkfashion-woocommerce-info-message {
    display: block !important;
    margin-bottom: 20px;
}

/* WooCommerce Button base styling */
.woocommerce-Button {
    background-color: #101f31;
    padding: 10px 24px;
    color: #ffffff;
    border: 1px solid #101f31;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.44s ease-in-out;
}

.woocommerce-Button:hover {
    opacity: 0.9;
    text-decoration: none;
}

.wkmp-seller-signup-terms .woocommerce-terms-and-conditions-link {
    color: #101f31;
}

/*
 * Variable Product — Variation Price Styling
 * Matches the parent theme's single-product price design
 * (.my-price-reverse) so the variation price looks consistent
 * when a variation is selected.
 */
.woocommerce-variation-price .price {
    display: flex;
    align-items: baseline;
    gap: 16px;
    font-size: 36px;
    color: #101f31;
}

.woocommerce-variation-price .price del {
    font-size: 16px;
    text-decoration: line-through;
    color: #666c7a;
    font-weight: 400;
}

.woocommerce-variation-price .price ins {
    text-decoration: none;
    font-weight: 700;
}

@media not all and (min-width: 1367px) {
    .woocommerce-variation-price .price {
        font-size: 32px;
    }
}

@media not all and (min-width: 1025px) {
    .woocommerce-variation-price .price {
        font-size: 24px;
    }
}

@media not all and (min-width: 768px) {
    .woocommerce-variation-price .price {
        font-size: 20px;
    }

    .woocommerce-variation-price .price del {
        font-size: 14px;
    }
}

/*
 * Vendor Form — Invalid Field Highlight
 * Applied by vendor-form-notices.js when validation fails.
 * Red border + subtle background to draw attention to each
 * invalid field. Clears automatically on user input.
 */
.wkchild-field-invalid {
    border: 1.5px solid #ef4444 !important;
    background-color: #fef2f2 !important;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

/* For the terms checkbox wrapper — highlight the label area */
#wkmp_seller_signup_term_accept.wkchild-field-invalid {
    outline: 2px solid #ef4444;
}

/* Responsive Media Queries for Heading */
@media (max-width: 768px) {
    .woocommerce-MyAccount-content form:has(.wkmpms_search) h1 {
        font-size: 1.25rem;
        /* text-xl */
    }
}

@media (max-width: 640px) {
    .woocommerce-MyAccount-content form:has(.wkmpms_search) h1 {
        font-size: 1rem;
        /* text-base */
    }

    .woocommerce-MyAccount-content form:has(.wkmpms_search) table td:last-child {
        flex-direction: column;
        align-items: stretch;
    }

    .wkmpms_search,
    .wkmpms_search_button {
        width: 100% !important;
    }
}

/* =====================================================================
 * Marketplace PLUGIN core palette (wk-woocommerce-marketplace/build/*.css)
 * ---------------------------------------------------------------------
 * The plugin ships its own colours (red CTA gradient #ed5555/#ff8787,
 * blue headings #5685bc, gold rating stars #f8c212). The plugin is
 * update-overwritten and the parent compat layer does NOT re-skin these,
 * so we override here — this file loads after both (dep:
 * wkfashion-marketplace-compatible). `!important` guarantees the win
 * regardless of source order. Semantic error/danger reds (.wkmp-sc-error,
 * password-strength, delete actions) are intentionally left red.
 * ===================================================================== */

/* No `!important` below: the plugin's own rules for these selectors are NOT
 * `!important`, and this file is enqueued after the plugin core (dep chain via
 * wkfashion-marketplace-compatible), so equal-or-greater specificity + later
 * source order wins on its own. */

/* Seller Central CTA: red radial gradient -> brand Yellow fill + Blue text
 * (NamVendors CTA convention: Yellow is light, so text is dark Blue). */
.wkmp-sc-btn {
    background: radial-gradient(circle at bottom, #efa524 0, #d8901a 70%);
    color: #101f31;
}

/* Marketplace container headings: plugin blue #5685bc -> brand Blue. */
.wkmp_container h2 {
    color: #101f31;
}

/* Seller rating stars: gold #f8c212 -> brand Yellow. Uses the plugin's FULL
 * selector (6 classes) so it wins on specificity without `!important`. */
.mp-profile-wrapper .mp-profile-information .mp-shop-stats .mp-seller-avg-rating .single-star:before {
    color: #efa524;
}

/* =====================================================================
 * Marketplace compat (parent) palette -> NamVendors brand
 * ---------------------------------------------------------------------
 * marketplace-compatible.css (parent, update-overwritten) drives most of
 * its colours from :root custom properties (~190 usages). Redefining those
 * vars here — this file loads AFTER it (dep: wkfashion-marketplace-compatible)
 * — re-skins the whole seller dashboard from one place. Roles were verified
 * from usage (text/border/bg). Semantic error reds (--red-600/--bg-red) and
 * --white are deliberately preserved.
 * ===================================================================== */
:root {
    --primary-text-color: #101f31;
    /* was #171717  dark body text      */
    --primary-color: #101f31;
    /* was #1f2937  dark UI             */
    --neutral-500: #101f31;
    /* was #0a0a0a  dark fills          */
    --dark-zinc: #101f31;
    /* was #3a3a3a  dark text/UI        */
    --bg-grey: #666c7a;
    /* was #4d4d4d  muted text (color:) */
    --zinc-500: #666c7a;
    /* was #71717a  muted              */
    --zinc: #666c7a;
    /* was #6b7280  muted              */
    --gray-400: #d3d6dc;
    /* was #9ca3af  borders (border-color:) */
    --gray-200: #d3d6dc;
    /* was #e5e7eb  borders / light surfaces */
    --gray-50: #d3d6dc;
    /* was #f9fafb  very-light tint     */
    --sky-600: #101f31;
    /* was #0284c7  link/accent text -> Blue */
    --sky-700: #101f31;
    /* was rgb(7 89 133)  darker accent */
    --bg-link: #101f31;
    /* was #155dfc  link text          */
}

/* ── Inline raw-hex rules (not var-driven) — same scoped selectors as the
 *    parent compat, nesting resolved, brand-mapped. Generated + reviewed. ── */
li.woocommerce-MyAccount-navigation-link.woocommerce-MyAccount-navigation-link--admin-news a:after,
li.woocommerce-MyAccount-navigation-link.woocommerce-MyAccount-navigation-link--vendor-notifications a:after,
li.woocommerce-MyAccount-navigation-link.woocommerce-MyAccount-navigation-link--seller-notifications a:after {
    color: #101f31 !important;
}

.btn-danger:hover {
    background-color: #d3d6dc !important;
}

.woocommerce-account:has(> .woocommerce-MyAccount-navigation, > .woocommerce-MyAccount-content) .woocommerce-MyAccount-navigation {
    background-color: #f1f5f9 !important;
}

.woocommerce-MyAccount-content .wkmp-news-info-box .wk-mp-news-content img {
    outline: 2px solid #d3d6dc !important;
}

.woocommerce-MyAccount-content .wkmp-news-info-box .wk-mp-news-content img.img-loading {
    background-color: #f1f5f9 !important;
    background: linear-gradient(to right,
            #eeeeee 10%,
            #d3d6dc 18%,
            #eeeeee 33%) !important;
}

.woocommerce-MyAccount-content .wkmp-news-info-box .wk-mp-news-content pre {
    background: #f1f5f9 !important;
}

.woocommerce-MyAccount-content .wkmp-news-info-box .wk-mp-news-content blockquote p {
    color: #666c7a !important;
}

.woocommerce-MyAccount-content .wkmp-news-info-box .wk-mp-news-content table tr {
    border-bottom: 1px solid #d3d6dc !important;
}

.woocommerce-MyAccount-content .wkmp-news-info-box .wk-mp-news-content table tr td {
    border-bottom: 1px solid #d3d6dc !important;
}

.woocommerce-MyAccount-content .wkmp-news-info-box .wk-mp-news-content table thead~tbody tr:first-child td {
    border-bottom: 1px solid #d3d6dc !important;
}

.wkmp-action-section .button:hover,
.new-ship-zone .wkmp-manage-shipping-class:hover,
.new-ship-zone .button:hover,
.shipping-method-add-cost .button:hover,
.shipping-method-modal .button:hover,
.wc-shipping-class-add:hover,
.wkmp-popup-modal button:hover,
#order_data_details .button:hover,
#wkmp-orders-tab .woocommerce-pagination a:hover,
.wkmp_profile_btn a:hover,
.wkmp-pro-become-seller-wrap a:hover,
.wkmp_product_attr_submit input[type="submit"]:hover,
.mp-submit-status:hover,
.wk-mp-rfq .wpmp-rfq-quote-form .form-table .forminp .button.button-primary:hover,
.woocommerce-MyAccount-content .components-button.is-secondary:hover,
.bmlm-become-sponsor button:hover {
    background-color: #d3d6dc !important;
}

.woocommerce-MyAccount-content .wp-core-ui .button:hover,
.woocommerce-MyAccount-content .wp-core-ui .button-secondary:hover {
    background-color: #d3d6dc !important;
}

.woocommerce-MyAccount-content .mce-toolbar .mce-btn-group .mce-btn:hover,
.woocommerce-MyAccount-content .mce-toolbar .mce-btn-group .mce-btn:focus,
.woocommerce-MyAccount-content .qt-dfw:hover,
.woocommerce-MyAccount-content .qt-dfw:focus {
    background-color: #d3d6dc !important;
}

.wkfashion-content-area .mp-dashboard-wrapper table tbody tr:nth-of-type(even),
.wkfashion-content-area .wkmprfq-quotation-list-wrapper table tbody tr:nth-of-type(even),
.wkfashion-content-area .wkmprfq-rfq-main-quote-wrapper .wkmprfq-rfq-main-quote table tbody tr:nth-of-type(even),
.wkfashion-content-area .wkmp-table-responsive table tbody tr:nth-of-type(even),
.wkfashion-content-area .mp-order-view table tbody tr:nth-of-type(even),
.wc-shipping-zones-list tbody tr:nth-of-type(even),
.wc-shipping-zones tbody tr:nth-of-type(even),
.shipping-method-add-cost table tbody tr:nth-of-type(even),
.wc-shipping-classes tbody tr:nth-of-type(even),
.transaction-details table tbody tr:nth-of-type(even),
.wkmp-withdrawal-order-table tbody tr:nth-of-type(even),
#wkmp-order-view-form table tbody tr:nth-of-type(even),
.bmlm-sponsor-ingredients table tbody tr:nth-of-type(even),
.bmlm-badge-history table tbody tr:nth-of-type(even),
.bmlm-member-activities table tbody tr:nth-of-type(even),
.bmlm-table-responsive .sponsor-ads-table tbody tr:nth-of-type(even),
.bmlm-sponsor-refferal tbody tr:nth-of-type(even) {
    background-color: #f1f5f9 !important;
}

.wkmp-popup-modal .modal-content .modal-header .modal-title {
    color: #101f31 !important;
}

.wkmp-popup-modal .modal-content .modal-header .wkmp-close-popup.close-modal {
    color: #666c7a !important;
}

.wkmp-popup-modal .modal-content .modal-header .wkmp-close-popup.close-modal:hover {
    color: #101f31 !important;
}

.wkmp-popup-modal .modal-content .modal-body .form-group label {
    color: #101f31 !important;
}

.wkmp-popup-modal .modal-content .modal-body .form-group textarea {
    border: 1px solid #d3d6dc !important;
}

.wkmp-popup-modal .modal-content .modal-body .form-group textarea:focus {
    border-color: #666c7a !important;
}

.wkmp-popup-modal .modal-content .modal-footer button {
    background: #101f31 !important;
}

.wkmp-popup-modal .modal-content .modal-footer button:hover {
    color: #101f31 !important;
    border: 1px #101f31 solid !important;
}

.woocommerce .wkmp-confirmation-msg {
    color: #101f31 !important;
}

.woocommerce-MyAccount-content .wkmp-filter-product-container .card {
    background-color: #101f31 !important;
}

.wkmp-seller-endpoints .wkmp-new-ship-zone a.button-primary:hover,
.wkmp-seller-endpoints .wkmp-new-ship-zone .wkmp-manage-shipping-class:hover {
    background-color: #d3d6dc !important;
}

.wkmp-registration-msg-title {
    color: #101f31 !important;
}

@media (max-width: 900px) {

    .woocommerce-MyAccount-content .wkmp_nav_tabs a.active,
    .woocommerce-MyAccount-content #edit_product_tab a.active {
        border-bottom: 1px solid #d3d6dc !important;
    }
}

@media (max-width: 768px) {

    .woocommerce-MyAccount-content .wkmp-filter-product-container .card,
    .woocommerce-MyAccount-content .wkmp-box {
        background-color: #101f31 !important;
    }
}

/* ==================================================================
 * Vendor / Seller Profile Page — updated UI (wkfashion-widget-box).
 * Source: wk-woocommerce-marketplace/build/seller_profile.css, which
 * ships off-brand colours: a BLUE star rating (#0074a2), grey chip tabs
 * (#e5e5e5 / #5f5f5f), #ddd / #e5e5e5 borders, grey body copy
 * (#6d6d6d / #727272) and a white/#333 map button.
 *
 * This child sheet enqueues at priority 20, AFTER the plugin's
 * priority-10 sheet, so each rule below RE-MATCHES the plugin's
 * selector specificity and wins on source order — no !important.
 * Palette: Blue #101f31 (headings/text/active), Dark Grey #666c7a
 * (muted), Light Grey #d3d6dc (borders), Yellow #efa524 (accent:
 * rating stars + map CTA).
 * ================================================================== */

/* Vendor name + section / sidebar headings -> brand Blue (scoped one
 * level deep so a theme heading-colour rule can't out-specify them) */
.wkmp-seller-profile-card-body-info .wkmp-seller-profile-card-title,
.wkmp-seller-profile-collections-wrap .wkmp-seller-profile-content-title,
.wkmp-seller-profile-sidebar-content-wrapper .wkmp-seller-profile-sidebar-title {
    color: #101f31;
    line-height: normal;
}

.wkmp-seller-profile-sidebar-content-wrapper .wkmp-seller-profile-sidebar-title {
    border-bottom-color: #d3d6dc;
}

/* Rating stars (plugin paints every star a flat blue #0074a2). Split the
 * states so the score is actually readable: FILLED + HALF = brand Yellow
 * (gold), EMPTY = Light Grey. Scoped to the whole profile so the header
 * rating AND the Reviews-tab stars both get it. `.star-full/.star-empty`
 * sit alongside `.star`, so these equal-specificity rules win on load order. */
.wkmp-seller-profile-wrapper .star-rating .star-full,
.wkmp-seller-profile-wrapper .star-rating .star-half {
    color: #efa524;
}

.wkmp-seller-profile-wrapper .star-rating .star-empty {
    color: #d3d6dc;
}

.wkmp-seller-profile-card-body-info .wkmp-rating-description {
    color: #666c7a;
}

/* Custom seller attributes table (wkfashion-widget-box add-on): styling now
 * lives in the add-on plugin (assets/dist/css/style.css) as it is a
 * client-specific customization. Do not re-add table rules here — they load
 * after the plugin and would override it. */

/* Tabs — grey chips -> brand. Inactive = faint tint + Dark-Grey text;
 * active = white surface + Blue text. */
.wkmp-seller-profile-tab-list {
    border-bottom-color: #d3d6dc;
}

.wkmp-seller-profile-tab-list .wkmp-seller-profile-tab {
    background-color: rgba(16, 31, 49, 0.05);
    border-color: #d3d6dc;
    color: #666c7a;
}

.wkmp-seller-profile-tab-list .wkmp-seller-profile-tab.active {
    background-color: #ffffff;
    border-bottom-color: #ffffff;
    color: #101f31;
}

/* About-tab body copy -> brand Dark Grey */
.wkmp-seller-profile-details-tabs-wrap .wkmp-seller-profile-content-description {
    color: #666c7a;
}

/* Product sort dropdown (collection tab) */
.wkmp-seller-profile-filter-wrap .wkmp-seller-profile-sorting-filter .wkmp-seller-profile-sorting-filter-select {
    border-color: #d3d6dc;
    color: #101f31;
}

.wkmp-seller-profile-filter-wrap .wkmp-seller-profile-sorting-filter:after {
    border-bottom-color: #666c7a;
    border-right-color: #666c7a;
}

/* Sidebar — store-info text, contact links, accent icons */
.wkmp-seller-profile-sidebar .wkmp-seller-profile-sidebar-content li p {
    color: #666c7a;
}

.wkmp-seller-profile-sidebar .wkmp-seller-profile-sidebar-content li a {
    color: #101f31;
    text-decoration: none;
}

.wkmp-seller-profile-sidebar .wkmp-seller-profile-sidebar-content li a:hover {
    text-decoration: underline;
}

.wkmp-seller-profile-sidebar .wkmp-seller-profile-sidebar-content li .dashicons {
    color: #efa524;
}

/* "View on Map" button -> brand Yellow fill + Blue text (primary CTA).
 * Replicates the plugin's deepest (0,4,0) selector to win on order. */
.wkmp-seller-profile-sidebar-content-wrapper .wkmp-seller-location-overlay .wkmp-seller-location-overlay-content .wkmp-view-location-btn {
    background-color: #efa524;
    color: #101f31;
}

.wkmp-seller-profile-sidebar-content-wrapper .wkmp-seller-location-overlay .wkmp-seller-location-overlay-content .wkmp-view-location-btn:hover {
    background-color: #d8901a;
    color: #101f31;
}

/* Breadcrumb (seller-profile header) -> brand Dark Grey + Blue links */
.wkmp-breadcrumb-container .wkmp-breadcrumb li {
    color: #666c7a;
}

.wkmp-breadcrumb-container .wkmp-breadcrumb li a {
    color: #101f31;
}

/* =====================================================================
 * Vendor Product Edit / Add page — raw-hex chrome from the plugin build
 * (wk-woocommerce-marketplace/build/front.css). Those rules are NOT
 * var-driven, so the :root remap above does not reach them; the parent
 * compat layer does not style them either. This file loads AFTER the
 * plugin core, so each rule below RE-MATCHES front.css's selector
 * specificity and wins on source order — no !important.
 * Off-brand: blue tab text #5685bc, #eee/#ccc/#666 tab chrome, #d5d5d5
 * field borders, #eee/#555 SKU prefix, #1e73be loader.
 * ===================================================================== */

/* Tab strips (#edit_product_tab / .wkmp_nav_tabs / .edit-mp-tab) */
#edit_product_tab,
.wkmp_nav_tabs,
.edit-mp-tab {
    border-bottom-color: #d3d6dc;
}

#edit_product_tab li,
.wkmp_nav_tabs li,
.edit-mp-tab li {
    border-left-color: #d3d6dc;
    border-right-color: #d3d6dc;
    border-top-color: #d3d6dc;
}

/* Active tab text: plugin blue #5685bc (or inherited) -> brand Blue */
#edit_product_tab li a,
.wkmp_nav_tabs li a,
.edit-mp-tab li a {
    color: #101f31;
}

/* Inactive tab: grey #eee/#666 -> faint brand tint + Dark-Grey text */
#edit_product_tab li a.inactive,
.wkmp_nav_tabs li a.inactive,
.edit-mp-tab li a.inactive {
    background: rgba(16, 31, 49, 0.05);
    border-bottom-color: #d3d6dc;
    color: #666c7a;
}

/* Tab hover -> brand Blue */
#edit_product_tab li a:hover,
.wkmp_nav_tabs li a:hover,
.edit-mp-tab li a:hover,
.edit-mp-tab li a.inactive:hover {
    color: #101f31;
}

/* Form fields — grey resting borders -> brand Light Grey. (Focus border is
 * already forced to brand Blue by nv-brand.css's global input:focus rule.) */
.wkmp-seller-endpoints .wkmp-add-product-form #product-form .wc_input_decimal,
.wkmp-seller-endpoints .wkmp-add-product-form #product-form .wkmp_product_input {
    border-color: #d3d6dc;
}

.woocommerce-MyAccount-content .wkmp-add-product-form .wkmp-sku-input-wrap .wkmp_product_input {
    border-color: #d3d6dc;
}

/* SKU prefix add-on: #eee bg / #ccc border / #555 text -> brand neutrals */
.woocommerce-MyAccount-content .wkmp-add-product-form .wkmp-sku-input-wrap .wkmp-sku-prefix-span {
    background-color: rgba(16, 31, 49, 0.05);
    border-color: #d3d6dc;
    color: #666c7a;
}

/* AJAX loader spinner: blue #1e73be -> brand Blue */
#mp-loader {
    border-color: #101f31;
}

#mp-loader:before {
    background-color: #101f31;
}