/* ============================================================
   WP B2B Suite — Frontend Styles
   Premium storefront experience
   ============================================================ */

:root {
	--b2b-blue:   #2563eb;
	--b2b-green:  #16a34a;
	--b2b-border: #e5e7eb;
	--b2b-radius: 8px;
}

/* ── Buttons ── */
.b2b-rfq-add-btn,
.b2b-rfq-btn,
.b2b-login-btn,
.b2b-whatsapp-btn,
.b2b-contact-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 20px;
	border-radius: var(--b2b-radius);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	border: 2px solid transparent;
	transition: all .2s;
	text-decoration: none;
}

.b2b-rfq-add-btn,
.b2b-rfq-btn {
	background: #fff;
	color: var(--b2b-blue);
	border-color: var(--b2b-blue);
}
.b2b-rfq-add-btn:hover,
.b2b-rfq-btn:hover {
	background: var(--b2b-blue);
	color: #fff;
}

.b2b-login-btn { background: var(--b2b-blue); color: #fff; }
.b2b-login-btn:hover { background: #1d4ed8; }

.b2b-whatsapp-btn { background: #25d366; color: #fff; border-color: #25d366; }
.b2b-whatsapp-btn:hover { background: #1ebe57; }

.b2b-contact-btn { background: #f3f4f6; color: #374151; border-color: #d1d5db; }
.b2b-contact-btn:hover { background: #e5e7eb; }

.b2b-contact-text { display: inline-block; padding: 8px 0; color: #6b7280; font-style: italic; font-size: 14px; }

/* ── Floating quote cart ── */
.b2b-quote-cart-float {
	position: fixed;
	bottom: 24px;
	right: 24px;
	background: var(--b2b-blue);
	color: #fff;
	border-radius: 999px;
	padding: 12px 20px;
	display: flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	font-weight: 600;
	font-size: 14px;
	box-shadow: 0 4px 12px rgba(37,99,235,.4);
	z-index: 9999;
	transition: transform .2s, box-shadow .2s;
}
.b2b-quote-cart-float:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(37,99,235,.5); color: #fff; }

.b2b-qc-count {
	background: #fff;
	color: var(--b2b-blue);
	border-radius: 50%;
	width: 22px;
	height: 22px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 700;
}

/* ── Tier pricing table ── */
.b2b-tier-table-wrap { margin: 16px 0; }
.b2b-tier-title { font-size: 14px; font-weight: 600; margin-bottom: 8px; color: #374151; }
.b2b-tier-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.b2b-tier-table th,
.b2b-tier-table td {
	padding: 7px 12px;
	border: 1px solid var(--b2b-border);
	text-align: left;
}
.b2b-tier-table th { background: #f9fafb; font-weight: 600; color: #374151; }

/* ── Quote cart page ── */
.b2b-quote-cart-wrap { max-width: 800px; margin: 0 auto; }
.b2b-quote-cart-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.b2b-quote-cart-table th,
.b2b-quote-cart-table td {
	padding: 12px 16px;
	border-bottom: 1px solid var(--b2b-border);
	font-size: 14px;
	text-align: left;
}
.b2b-quote-cart-table th { font-weight: 600; color: #374151; background: #f9fafb; }

.b2b-quote-totals { text-align: right; margin-bottom: 20px; font-size: 16px; }
.b2b-quote-totals strong { font-size: 20px; }

.b2b-quote-form { display: flex; flex-direction: column; gap: 14px; }
.b2b-quote-form label { font-weight: 600; font-size: 13px; color: #374151; display: block; margin-bottom: 4px; }
.b2b-quote-form input,
.b2b-quote-form textarea {
	width: 100%;
	border: 1px solid var(--b2b-border);
	border-radius: var(--b2b-radius);
	padding: 10px 14px;
	font-size: 14px;
	box-sizing: border-box;
}

/* ── My Quotes (account page) ── */
.b2b-my-quotes-table { width: 100%; border-collapse: collapse; }
.b2b-my-quotes-table th,
.b2b-my-quotes-table td { padding: 10px 14px; border-bottom: 1px solid var(--b2b-border); font-size: 14px; }
.b2b-my-quotes-table th { font-weight: 600; background: #f9fafb; }

/* ── Status badges (frontend) ── */
.b2b-badge {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	text-transform: capitalize;
}
.b2b-badge--pending   { background: #fef3c7; color: #92400e; }
.b2b-badge--sent      { background: #ede9fe; color: #5b21b6; }
.b2b-badge--accepted  { background: #dcfce7; color: #166534; }
.b2b-badge--rejected  { background: #fee2e2; color: #991b1b; }
.b2b-badge--converted { background: #d1fae5; color: #065f46; }
.b2b-badge--expired   { background: #f3f4f6; color: #374151; }

/* ── Registration form ── */
.b2b-reg-form { max-width: 600px; }
.b2b-reg-form .b2b-field { margin-bottom: 16px; }
.b2b-reg-form .b2b-field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: #374151; }
.b2b-reg-form .b2b-field input,
.b2b-reg-form .b2b-field select,
.b2b-reg-form .b2b-field textarea {
	width: 100%;
	border: 1px solid var(--b2b-border);
	border-radius: var(--b2b-radius);
	padding: 10px 14px;
	font-size: 14px;
	box-sizing: border-box;
	transition: border-color .15s;
}
.b2b-reg-form .b2b-field input:focus { outline: none; border-color: var(--b2b-blue); }

.b2b-reg-status {
	padding: 16px 20px;
	border-radius: var(--b2b-radius);
	font-size: 15px;
	margin-bottom: 20px;
}
.b2b-reg-status--pending  { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.b2b-reg-status--approved { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.b2b-reg-status--rejected { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* ── Notices ── */
.b2b-notice {
	padding: 12px 16px;
	border-radius: var(--b2b-radius);
	font-size: 14px;
	margin-bottom: 16px;
}
.b2b-notice--success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.b2b-notice--error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* ── Popup modals ── */
.b2b-popup-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, .55);
	z-index: 99998;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
}

.b2b-popup-modal {
	background: #fff;
	border-radius: 12px;
	padding: 32px;
	width: 100%;
	max-width: 480px;
	max-height: 90vh;
	overflow-y: auto;
	position: relative;
	box-shadow: 0 20px 60px rgba(0,0,0,.25);
	box-sizing: border-box;
}

.b2b-popup-close {
	position: absolute;
	top: 14px;
	right: 16px;
	background: none;
	border: none;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	color: #9ca3af;
	padding: 4px 8px;
	border-radius: 4px;
	transition: color .15s, background .15s;
}
.b2b-popup-close:hover { color: #111; background: #f3f4f6; }

.b2b-popup-title {
	font-size: 20px;
	font-weight: 700;
	color: #111827;
	margin: 0 0 4px;
}

.b2b-popup-product-name {
	font-size: 13px;
	color: #6b7280;
	margin: 0 0 20px;
	font-style: italic;
}

.b2b-popup-field {
	margin-bottom: 16px;
}
.b2b-popup-field label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #374151;
	margin-bottom: 6px;
}
.b2b-popup-field label span {
	color: #ef4444;
	margin-left: 2px;
}
.b2b-popup-field input,
.b2b-popup-field textarea {
	width: 100%;
	border: 1.5px solid var(--b2b-border);
	border-radius: var(--b2b-radius);
	padding: 10px 14px;
	font-size: 14px;
	box-sizing: border-box;
	transition: border-color .15s;
	outline: none;
}
.b2b-popup-field input:focus,
.b2b-popup-field textarea:focus {
	border-color: var(--b2b-blue);
	box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.b2b-popup-field textarea { resize: vertical; min-height: 80px; }

.b2b-popup-actions {
	margin-top: 20px;
}
.b2b-popup-submit {
	width: 100%;
	background: var(--b2b-blue) !important;
	color: #fff !important;
	border: none !important;
	padding: 12px 20px !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	border-radius: var(--b2b-radius) !important;
	cursor: pointer;
	transition: background .2s !important;
}
.b2b-popup-submit:hover { background: #1d4ed8 !important; }
.b2b-popup-submit:disabled { opacity: .65; cursor: not-allowed; }

.b2b-popup-success,
.b2b-popup-error {
	border-radius: var(--b2b-radius);
	padding: 16px 20px;
	font-size: 15px;
	margin-top: 8px;
}
.b2b-popup-success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.b2b-popup-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* ── Price message label ── */
.b2b-price-msg {
	display: inline-block;
	font-size: 14px;
	font-weight: 500;
	color: #6b7280;
	font-style: italic;
}

/* ── PDF quote layout ── */
.b2b-pdf-wrap { max-width: 800px; margin: 40px auto; font-family: sans-serif; color: #111; }
.b2b-pdf-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 32px; }
.b2b-pdf-logo { font-size: 24px; font-weight: 700; }
.b2b-pdf-meta { text-align: right; font-size: 13px; color: #555; }
.b2b-pdf-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.b2b-pdf-table th { background: #f3f4f6; padding: 10px 12px; font-size: 12px; text-align: left; }
.b2b-pdf-table td { padding: 10px 12px; border-bottom: 1px solid #e5e7eb; }
.b2b-pdf-totals { text-align: right; }

@media print {
	.b2b-pdf-print-btn { display: none; }
}
