﻿/* b2b-style.css */

.b2b-bulk-order-wrapper {
    margin-top: 0px;
    /*border: 1px solid #eee;*/
    padding: 0;
    border-radius: 5px;
    font-family: 'Open Sans', sans-serif;
    color: #444;
}

/* Login Prompt for Non-logged-in Users */
.b2b-login-prompt {
    background: #fef8e7;
    border: 1px solid #f5c518;
    border-radius: 6px;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.b2b-login-prompt h4 {
    margin: 0 0 5px 0;
    font-size: 1.1em;
    font-weight: 700;
    color: #333;
}

.b2b-login-prompt p {
    margin: 0;
    font-size: 0.95em;
    color: #555;
}

.b2b-login-prompt .b2b-login-link {
    color: #ff9a00;
    font-weight: 600;
    text-decoration: none;
}

.b2b-login-prompt .b2b-login-link:hover {
    text-decoration: underline;
}

/* Variation product specific margin */
.b2b-bulk-order-wrapper .b2b-login-prompt {
    margin-top: 20px;
}

/* Login Popup Modal */
.b2b-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999999;
    justify-content: center;
    align-items: center;
}

.b2b-popup-overlay.show,
.b2b-popup-overlay[style*="block"] {
    display: flex !important;
}

.b2b-popup-modal {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: b2b-popup-slide-in 0.2s ease;
}

@keyframes b2b-popup-slide-in {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.b2b-popup-header {
    background: #2c3e50;
    color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.b2b-popup-title {
    font-size: 1.1em;
    font-weight: 600;
}

.b2b-popup-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.5em;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.b2b-popup-close:hover {
    opacity: 1;
}

.b2b-popup-body {
    padding: 30px;
    text-align: center;
}

.b2b-popup-logo {
    margin-bottom: 20px;
}

.b2b-popup-logo img {
    max-width: 200px;
    max-height: 80px;
    margin: 0 auto;
}

.b2b-popup-question {
    color: #ff9a00;
    font-size: 1.4em;
    font-weight: 400;
    margin: 0 0 25px 0;
}

.b2b-popup-options {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.b2b-popup-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1em;
    cursor: pointer;
    color: #333;
}

.b2b-popup-option input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Tiered Pricing Table */
.b2b-tiered-pricing-table ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.b2b-tiered-pricing-table li {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px 10px;
    text-align: left;
    min-width: 120px;
    cursor: default;
    background: #fff;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: start;
}

.b2b-tiered-pricing-table li.active {
    border: 2px solid #ff9a00;
    box-shadow: 0 4px 10px rgba(255, 154, 0, 0.1);
}

.b2b-tiered-pricing-table .b2b-price {
    display: block;
    font-weight: 700;
    font-size: 1.1em;
    color: #333;
}

.b2b-tiered-pricing-table li.active .b2b-price {
    color: #333;
    /* Keep price dark even when active */
}

.b2b-tiered-pricing-table .b2b-qty-range {
    display: block;
    font-size: 0.8em;
    color: #666;
    margin-top: 8px;
}

.b2b-tiered-pricing-table .b2b-save-percent {
    display: block;
    font-weight: 700;
    font-size: 18px;
    color: #ff9a00;
    margin-top: 8px;
}

/* Sections */
.b2b-section {
    margin-top: 30px;
    padding: 20px;
    border: 1px solid #cecece;
    border-radius: 8px;
    background: #fff;
}

.b2b-sizes {
    display: none;
    /* Hidden until color is selected */
}

.b2b-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 2rem;
    font-weight: 700;
    color: #333;
}

/* Color Swatches */
.b2b-color-swatches {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.b2b-swatch {
    cursor: pointer;
    position: relative;
    display: inline-block;
}

.b2b-swatch input {
    display: none;
}

.b2b-swatch .swatch-visual {
    display: inline-block;
    width: 0;
    height: 0;
    box-sizing: border-box;
    transition: transform 0.2s ease;
    box-shadow: 1px 1px 9px #09000061;
}

.b2b-swatch.active .swatch-visual {
    transform: scale(1.15);
    box-shadow: 0 0 0 2px #ff9a00;
}

/* Colour swatch tooltip */
.b2b-swatch {
    position: relative;
}

.b2b-swatch .colour-swatch-tooltip {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    margin-bottom: 6px;
    z-index: 10;
}

.b2b-swatch:hover .colour-swatch-tooltip {
    display: block;
}

/* Size Grid */
.b2b-size-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
}

.b2b-size-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.b2b-size-label {
    font-weight: 700;
    margin-bottom: 8px;
    color: #444;
    font-size: 0.9em;
    text-transform: uppercase;
}

.b2b-qty-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 45px;
    margin: 0 auto;
    border: 1px solid #333;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
}

.b2b-qty-input {
    text-align: center !important;
    width: 100% !important;
    margin: 0 !important;
    -moz-appearance: textfield !important;
    appearance: none !important;
    border: none !important;
    border-top: 1px solid #ccc !important;
    border-bottom: 1px solid #ccc !important;
    height: 35px !important;
    font-size: 14px !important;
    outline: none !important;
    background: #fff !important;
}

.b2b-qty-input::-webkit-outer-spin-button,
.b2b-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.b2b-qty-btn {
    width: 100% !important;
    height: 25px !important;
    background: #f1f1f1 !important;
    border: none !important;
    cursor: pointer !important;
    font-weight: bold !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    line-height: 1 !important;
    color: #333 !important;
}

.b2b-qty-btn:hover {
    background: #e1e1e1 !important;
}

.b2b-qty-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.b2b-qty-btn.plus {
    border-radius: 0 !important;
}

.b2b-qty-btn.minus {
    border-radius: 0 !important;
}

.b2b-stock-info {
    margin-top: 5px;
    background: #ff9a00;
    color: #fff;
    font-size: 11px;
    padding: 2px 0;
    border-radius: 2px;
    min-height: 18px;
    width: 100%;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Logo Customisation Section */
.b2b-logo-customisation-section {
    border-top: 2px solid #ff9a00;
    display: none;
    /* Hidden until items are added */
}

.b2b-sub-label {
    font-size: 1em;
    color: #ff9a00;
    margin-bottom: 15px;
    margin-top: 15px;
    display: block;
}

/* Position Details inner refinements */
.b2b-position-details-inner {
    padding: 10px 0;
}

/* Position Cards Selection */
.b2b-first-position-selector {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

#b2b-extra-positions-grid {
    margin-top: 20px;
    margin-bottom: 20px;
}

/* The extra cards inner container holds both cards and details */
.b2b-extra-cards-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.b2b-pos-card {
    position: relative;
    width: 190px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    background: #fff;
    transition: all 0.2s ease;
    padding: 0;
    overflow: hidden;
}

.b2b-pos-card:hover {
    border-color: #bbb;
}

.b2b-pos-card.active {
    border: 2px solid #ff9a00;
    box-shadow: 0 0 10px rgba(255, 154, 0, 0.1);
    background: #fffdf5;
}

.b2b-pos-card.active span {
    color: #ff9a00;
}

.b2b-pos-card input {
    position: absolute;
    opacity: 0;
    visibility: hidden;
}

.b2b-card-content {
    padding: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.b2b-pos-img {
    height: 120px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.b2b-pos-img img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.b2b-card-content span {
    font-weight: 700;
    font-size: 0.95em;
    line-height: 1.2;
}

.b2b-card-content small {
    font-size: 0.8em;
    color: #ff9a00;
    margin-top: 4px;
}

/* Method Tabs */
.b2b-method-tabs {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.b2b-method-tab {
    flex: 1;
    cursor: pointer;
    position: relative;
}

.b2b-method-tab input {
    position: absolute;
    opacity: 0;
}

.b2b-method-tab-content {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
    background: #fff;
    transition: 0.2s;
}

.b2b-method-tab:hover .b2b-method-tab-content {
    border-color: #ff9a00;
}

.b2b-method-tab input:checked+.b2b-method-tab-content {
    border-color: #ff9a00;
    background: #fffdf9;
    box-shadow: 0 0 0 1px #ff9a00;
}

.b2b-method-name {
    display: block;
    font-weight: 700;
    color: #333;
}

.b2b-method-price {
    display: block;
    font-size: 0.85em;
    color: #ff9a00;
    margin-top: 5px;
    white-space: nowrap;
}

.b2b-method-price .woocommerce-Price-amount,
.b2b-method-price .woocommerce-Price-currencySymbol,
.b2b-method-price bdi,
.b2b-method-price span {
    display: inline !important;
}

/* Logo Sources */
.b2b-logo-sources {
    margin-top: 25px;
}

.b2b-source-row {
    margin-bottom: 20px;
}

.b2b-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    cursor: pointer;
}

.b2b-source-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 10px;
    margin-top: 15px;
    background: #fdfdfd;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 6px;
}

.b2b-logo-item {
    padding: 8px;
    border: 1px solid #eee;
    border-radius: 4px;
    cursor: pointer;
    background: #fff;
}

.b2b-logo-item:hover {
    border-color: #ff9a00;
}

.b2b-logo-item.selected {
    border-color: #ff9a00;
    background: #fffdf9;
    box-shadow: 0 0 5px rgba(255, 154, 0, 0.2);
}

/* Upload Section */
.b2b-upload-new-section {
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.b2b-upload-trigger {
    background: #ff9a00 !important;
    color: #fff !important;
    text-transform: uppercase;
    font-weight: 700;
    padding: 8px 25px !important;
    border-radius: 4px !important;
}

/* Additional Logos section */
.b2b-additional-trigger {
    margin-top: 35px;
    padding-top: 20px;
    border-top: 1px dashed #ddd;
    display: none;
    /* Hidden until primary position is selected */
}

.b2b-additional-trigger .b2b-sub-label {
    display: none;
    /* Hidden until additional logos checkbox is checked */
}

/* Final Total Box Refinements */
.b2b-final-total-box {
    margin-top: 40px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    display: none;
    /* Hidden by default */
    margin-bottom: 35px;
}

.b2b-final-total-box h3 {
    color: #ff9a00;
    margin-bottom: 25px;
    border-bottom: 2px solid #ff9a00;
    display: inline-block;
    padding-bottom: 5px;
}

/* Setup promo */
.b2b-setup-promo-info {
    margin: 15px 0 10px;
    text-align: left;
}

.b2b-setup-promo-text {
    margin: 0;
    color: #333;
    font-size: 14px;
}

.b2b-setup-status {
    margin-top: 5px;
    font-weight: normal;
}

.b2b-summary-sections {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 30px;
}

.b2b-summary-section h4 {
    margin: 0 0 12px 0;
    font-size: 1em;
    color: #ff9a00;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.b2b-summary-table {
    width: 100%;
    border-collapse: collapse;
}

.b2b-summary-table th {
    background: #f8f8f8;
    padding: 10px;
    text-align: left;
    font-size: 0.85em;
    color: #888;
    border: 0 !important;
    border-bottom: 1px solid #eee !important;
}

.b2b-summary-table td {
    padding: 12px 10px;
    border: 0 !important;
    border-bottom: 1px solid #eee !important;
    font-size: 0.95em;
}

/* Costings Table */
.b2b-costings {
    background: #fdfdfd;
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 6px;
}

.b2b-cost-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 1.05em;
}

.b2b-cost-row span {
    color: #666;
}

.b2b-cost-row strong {
    color: #333;
}

.b2b-cost-row.total-ex-vat {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.b2b-cost-row.total-inc-vat {
    font-size: 1.4em;
    color: #ff9a00;
    margin-top: 5px;
}

.b2b-cost-row.total-inc-vat strong {
    color: #ff9a00;
}

/* Actions */
.b2b-actions {
    margin-top: 30px;
    text-align: center;
}

#b2b-add-to-cart {
    width: 100%;
    height: auto;
    padding: 15px !important;
    background: #ff9a00 !important;
    border-radius: 6px !important;
    font-size: 1em !important;
    font-weight: 700 !important;
    line-height: normal;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.b2b-logo-customisation-section,
.b2b-position-details-container {
    animation: fadeIn 0.4s ease-out;
}

.b2b-position-details-container {
    flex-basis: 100%;
    width: 100%;
    margin-top: 15px;
    margin-bottom: 25px;
    background: #fdfdfd;
    border: 1px solid #eee;
    padding: 2.5%;
    border-radius: 8px;
    box-sizing: border-box;
}

/* Upload Preview */
.b2b-upload-preview {
    margin-top: 15px;
    padding: 10px;
    border: 1px dashed #ddd;
    border-radius: 8px;
    background: #fafafa;
    width: max-content;
}

.b2b-preview-item {
    width: max-content;
}

.b2b-preview-item img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
    margin-bottom: 8px;
    max-height: 80px;
    object-fit: contain;
}

.b2b-upload-status {
    color: #28a745;
    font-size: 14px;
    font-weight: 600;
    margin-left: 15px;
    display: none;
    vertical-align: middle;
}

.b2b-preview-item .dashicons {
    font-size: 30px;
    width: 30px;
    height: 30px;
    color: #666;
}

/* VAT Switch Styles */
.b2b-vat-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.b2b-vat-label {
    font-weight: 700;
    color: #333;
    font-size: 0.9em;
}

.b2b-vat-text {
    font-size: 0.85em;
    color: #ff9a00;
    font-weight: 600;
}

/* The switch - the box around the slider */
.b2b-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

/* Hide default HTML checkbox */
.b2b-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The slider */
.b2b-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
}

.b2b-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}

.b2b-switch input:checked+.b2b-slider {
    background-color: #ff9a00;
}

.b2b-switch input:focus+.b2b-slider {
    box-shadow: 0 0 1px #ff9a00;
}

.b2b-switch input:checked+.b2b-slider:before {
    -webkit-transform: translateX(22px);
    -ms-transform: translateX(22px);
    transform: translateX(22px);
}

/* Rounded sliders */
.b2b-slider.round {
    border-radius: 34px;
}

.b2b-slider.round:before {
    border-radius: 50%;
}

/* Bundle Cart Display */
.b2b-bundle-cart-subitems {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed #eee;
}

.b2b-bundle-subitem {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.b2b-bundle-subitem:last-child {
    border-bottom: none;
}

.b2b-subitem-image {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 12px;
}

.b2b-subitem-name {
    flex: 1;
    font-size: 13px;
    color: #666;
}

.b2b-subitem-qty {
    font-weight: 600;
    color: #333;
    padding-left: 15px;
}

div#b2b-form-elementor-inject {
    width: 100%;
}


/* Custom Price Display Refinement */
.product-type-variable .summary .price {
    font-size: 0 !important;
    display: block !important;
    margin-bottom: 20px !important;
}

.b2b-main-price-display {
    display: inline-flex !important;
    align-items: baseline !important;
    gap: 12px !important;
    font-size: 2.2rem !important;
    line-height: 1 !important;
}

div#b2b-setup-status-box {
    display: none;
}

.b2b-main-price-display .price-label {
    color: #555 !important;
    font-size: 30px !important;
    /* Smaller text for 'From' */
    font-weight: 500 !important;
    text-transform: none !important;
}

.b2b-main-price-display .price-range,
.b2b-main-price-display.single-price {
    color: #ff9a00 !important;
    font-size: 30px !important;
    font-weight: 500 !important;
}

.b2b-main-price-display .woocommerce-Price-amount {
    display: inline-block !important;
    color: inherit !important;
    font-size: inherit !important;
}

table.b2b-summary-table {
    margin-top: 20px;
}
p.b2b-stock-note {
    font-size: 18px;
    margin-top: 15px;
}
