/* Tera Mera Bazar — Manufacturer Dashboard: editable forms + contrast fixes.
   Loaded after frontend.css and the theme stylesheet, so these rules win
   without needing !important anywhere. */

/* ---------- Contrast fix: turquoise text was too light on white ----------
   #12A594 on white is ~3:1 contrast (fails WCAG AA for normal text).
   Swapping these specific text-only links to the darker teal (#0C7A6C,
   already used elsewhere on the site) keeps the same brand color family
   but reads clearly at small sizes. */
.pd-dash-stat-link,
.pd-dash-see-all,
.pd-dash-lead-contact a {
	color: var(--pd-amber-dark, #0C7A6C);
}
.pd-dash-stat-link:hover,
.pd-dash-see-all:hover,
.pd-dash-lead-contact a:hover {
	text-decoration: underline;
}
.pd-cat-pill.active {
	background: var(--pd-amber-dark, #0C7A6C);
	border-color: var(--pd-amber-dark, #0C7A6C);
}

/* ---------- Success / error banners on the dashboard ---------- */
.pd-dash-success {
	background: #E3F4F1;
	border: 1px solid #0C7A6C;
	color: #0C4B42;
	border-radius: 8px;
	padding: 12px 16px;
	margin-bottom: 20px;
	font-size: .9rem;
	font-weight: 600;
}
.pd-dash-error {
	background: #FDECEC;
	border: 1px solid #C0392B;
	color: #7A1F17;
	border-radius: 8px;
	padding: 12px 16px;
	margin-bottom: 20px;
	font-size: .9rem;
	font-weight: 600;
}

/* ---------- Editable forms (Company Profile + Add/Edit Product) ---------- */
.pd-dash-form {
	background: #fff;
	border: 1px solid var(--pd-rule, #D8DEE2);
	border-radius: 10px;
	padding: 24px;
	max-width: 760px;
}
.pd-dash-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px 20px;
}
.pd-dash-form-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: .8rem;
	font-weight: 600;
	color: var(--pd-ink-soft, #4C5E72);
}
.pd-dash-form-field-full { grid-column: 1 / -1; }
.pd-dash-form-field input[type="text"],
.pd-dash-form-field input[type="email"],
.pd-dash-form-field input[type="url"],
.pd-dash-form-field select,
.pd-dash-form-field textarea {
	font-family: inherit;
	font-size: .92rem;
	font-weight: 400;
	color: var(--pd-ink, #0E2A47);
	padding: 10px 12px;
	border: 1px solid var(--pd-rule, #D8DEE2);
	border-radius: 6px;
	background: #fff;
}
.pd-dash-form-field input:focus,
.pd-dash-form-field select:focus,
.pd-dash-form-field textarea:focus {
	outline: none;
	border-color: var(--pd-amber-dark, #0C7A6C);
}
.pd-dash-form-field input[type="file"] {
	font-size: .85rem;
	padding: 6px 0;
}
.pd-dash-form-hint {
	font-weight: 400;
	font-size: .78rem;
	color: var(--pd-ink-soft, #4C5E72);
	display: flex;
	align-items: center;
	gap: 8px;
}
.pd-dash-current-logo { display: block; }
.pd-dash-form-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 22px;
	padding-top: 18px;
	border-top: 1px solid var(--pd-rule, #D8DEE2);
}

@media (max-width: 700px) {
	.pd-dash-form-grid { grid-template-columns: 1fr; }
}

/* ---------- Product list (Products section) ---------- */
.pd-dash-product-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 12px;
}
.pd-dash-product-row {
	display: flex;
	align-items: center;
	gap: 16px;
	background: #fff;
	border: 1px solid var(--pd-rule, #D8DEE2);
	border-radius: 8px;
	padding: 12px 16px;
}
.pd-dash-product-thumb {
	width: 48px;
	height: 48px;
	border-radius: 6px;
	overflow: hidden;
	background: var(--pd-paper, #F1F4F5);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.pd-dash-product-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-dash-product-thumb-placeholder { font-size: 1.3rem; opacity: .5; }
.pd-dash-product-info {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}
.pd-dash-product-info strong { color: var(--pd-ink, #0E2A47); font-size: .95rem; }
.pd-dash-product-info span { color: var(--pd-ink-soft, #4C5E72); font-size: .8rem; }
.pd-dash-product-actions {
	display: flex;
	gap: 8px;
	flex-shrink: 0;
}

/* ---------- Button contrast: darker default state, lighter on hover.
   #12A594 white-text buttons sit right at the WCAG AA edge (~3.2:1);
   #0C7A6C gives a safely readable ~5.3:1 while staying in the same
   brand color family. ---------- */
.pd-btn-danger {
	background: #fff;
	color: #C0392B;
	border: 1px solid #C0392B;
}
.pd-btn-danger:hover { background: #C0392B; color: #fff; }

/* ---------- Reliable SVG icons (replacing emoji entities that rendered
   as blank boxes on systems without a matching emoji font) ---------- */
.pd-dash-icon-svg { display: inline-block; vertical-align: -3px; flex-shrink: 0; }
.pd-dash-nav-icon { display: inline-flex; align-items: center; justify-content: center; width: 20px; }
.pd-dash-action-icon { display: inline-flex; }
.pd-dash-action-icon .pd-dash-icon-svg { width: 22px; height: 22px; }
.pd-btn .pd-dash-icon-svg, .pd-dash-badge-tag .pd-dash-icon-svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 2px; }
.pd-dash-product-thumb-placeholder { display: flex; align-items: center; justify-content: center; opacity: .4; }

/* ---------- Claims & Verification cards ---------- */
.pd-dash-claim-card {
	background: #fff;
	border: 1px solid var(--pd-rule, #D8DEE2);
	border-radius: 10px;
	padding: 18px 20px;
	margin-bottom: 16px;
}
.pd-dash-claim-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 12px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--pd-rule, #D8DEE2);
}
.pd-dash-claim-head > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pd-dash-claim-body {
	display: grid;
	grid-template-columns: 1fr 1.4fr;
	gap: 20px;
	margin-bottom: 14px;
}
.pd-dash-claim-col p { margin: 4px 0 0; font-size: .88rem; color: var(--pd-ink, #0E2A47); line-height: 1.6; }
.pd-dash-claim-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	padding-top: 12px;
	border-top: 1px solid var(--pd-rule, #D8DEE2);
}

.pd-dash-doc-list { list-style: none; margin: 6px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pd-dash-doc-list li { display: flex; align-items: center; gap: 6px; font-size: .85rem; }
.pd-dash-doc-list a { color: var(--pd-amber-dark, #0C7A6C); text-decoration: none; word-break: break-all; }
.pd-dash-doc-list a:hover { text-decoration: underline; }
.pd-dash-doc-remove {
	background: none; border: none; cursor: pointer; color: #b32d2e;
	font-size: 1rem; line-height: 1; padding: 0 4px;
}
.pd-dash-doc-upload { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.pd-dash-doc-upload input[type="file"] { font-size: .8rem; max-width: 200px; }

/* ============================================================
   RESPONSIVE — dashboard adapts to tablet/phone widths
   ============================================================ */
@media (max-width: 900px) {
	.pd-frontend-dash { grid-template-columns: 1fr; min-height: 0; }
	.pd-dash-sidebar {
		position: static;
		height: auto;
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
		gap: 10px 16px;
		padding: 16px;
	}
	.pd-dash-nav { flex-direction: row; flex-wrap: wrap; flex: 0 0 100%; order: 3; }
	.pd-dash-nav-item { padding: 8px 10px; }
	.pd-dash-logout { margin: 0 0 0 auto; order: 2; }
	.pd-dash-company-name, .pd-dash-role-badge { margin: 0; }
	.pd-dash-main { padding: 24px 18px; }
	.pd-dash-claim-body { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
	.pd-dash-stats-row,
	.pd-dash-actions-grid,
	.pd-dash-form-grid,
	.pd-dash-profile-grid,
	.pd-dash-supplier-grid {
		grid-template-columns: 1fr;
	}
	.pd-dash-title { font-size: 1.3rem; }
	.pd-dash-lead-row { grid-template-columns: 1fr; gap: 4px; }
	.pd-dash-product-row { flex-wrap: wrap; }
	.pd-dash-claim-actions { flex-direction: column; align-items: stretch; }
	.pd-dash-claim-actions .pd-btn { width: 100%; text-align: center; }
	.pd-search-form { flex-direction: column; }
	.pd-search-form input, .pd-search-form select, .pd-search-form button { width: 100%; }
	.pd-product-cards { grid-template-columns: 1fr 1fr !important; }
}

@media (max-width: 420px) {
	.pd-product-cards { grid-template-columns: 1fr !important; }
	.pd-dash-lead-allot-header { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ---------- Bulk lead import panel ---------- */
.pd-dash-import-panel {
	background: var(--pd-paper, #F1F4F5);
	border: 1px solid var(--pd-rule, #D8DEE2);
	border-radius: 10px;
	padding: 18px 20px;
	margin-bottom: 8px;
}
.pd-dash-import-panel h3 { margin: 0 0 6px; font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.pd-dash-import-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 10px; }

/* ---------- Already-allotted supplier lock state ---------- */
.pd-dash-supplier-option.pd-already-allotted {
	background: #F1F4F5;
	border-style: dashed;
	opacity: .75;
}
.pd-dash-lead-allotted-card { border-left: 3px solid var(--pd-amber-dark, #0C7A6C); }
.pd-dash-badge-tag.pending { background: #FFF3CD; color: #8A6D3B; }

@media (max-width: 640px) {
	.pd-dash-import-actions { flex-direction: column; align-items: stretch; }
	.pd-dash-import-actions form, .pd-dash-import-actions a { width: 100%; }
}

/* ---------- Buy/Upgrade Plan cards ---------- */
.pd-plan-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 16px;
	margin-top: 16px;
}
.pd-plan-card {
	background: #fff;
	border: 1px solid var(--pd-rule, #D8DEE2);
	border-radius: 10px;
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	position: relative;
}
.pd-plan-card.pd-plan-current { border-color: var(--pd-amber-dark, #0C7A6C); border-width: 2px; }
.pd-plan-card h3 { margin: 6px 0 0; font-size: 1.1rem; color: var(--pd-ink, #0E2A47); }
.pd-plan-price { margin: 4px 0; }
.pd-plan-price-strike { text-decoration: line-through; color: var(--pd-ink-soft, #4C5E72); font-size: .85rem; margin-right: 6px; }
.pd-plan-price-final { font-size: 1.5rem; font-weight: 700; color: var(--pd-ink, #0E2A47); }
.pd-plan-price-unit { font-size: .8rem; color: var(--pd-ink-soft, #4C5E72); }
.pd-plan-quota { font-size: .82rem; color: var(--pd-amber-dark, #0C7A6C); font-weight: 600; margin: 0; }
.pd-plan-desc { font-size: .82rem; color: var(--pd-ink-soft, #4C5E72); margin: 0 0 8px; flex: 1; }
.pd-plan-card .pd-btn { width: 100%; text-align: center; }

@media (max-width: 640px) {
	.pd-plan-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
	.pd-plan-cards { grid-template-columns: 1fr; }
}

/* =========================================================
   "Post Your Requirement" popup
   ========================================================= */
.pd-req-popup-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(14, 42, 71, 0.55);
	z-index: 9999;
	align-items: center;
	justify-content: center;
	padding: 16px;
}
.pd-req-popup-overlay.pd-req-popup-visible { display: flex; }

.pd-req-popup {
	background: #fff;
	width: 100%;
	max-width: 380px;
	max-height: 92vh;
	overflow-y: auto;
	border-radius: 10px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	animation: pdReqPopupIn .2s ease;
}
@keyframes pdReqPopupIn {
	from { opacity: 0; transform: translateY(12px) scale(.98); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

.pd-req-popup-head {
	background: var(--pd-ink, #0E2A47);
	color: #fff;
	padding: 16px 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-radius: 10px 10px 0 0;
}
.pd-req-popup-head h3 { margin: 0; font-size: 1.05rem; color: #fff; }
.pd-req-popup-close {
	background: none;
	border: none;
	color: #fff;
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px;
}

.pd-req-popup-form { padding: 18px 20px 22px; }
.pd-req-label {
	display: block;
	font-size: .85rem;
	font-weight: 600;
	color: var(--pd-ink, #0E2A47);
	margin: 14px 0 8px;
}
.pd-req-label:first-child { margin-top: 0; }

.pd-req-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pd-req-pill {
	background: #fff;
	border: 1px solid var(--pd-rule, #D8DEE2);
	border-radius: 20px;
	padding: 8px 14px;
	font-size: .85rem;
	color: var(--pd-ink-soft, #4C5E72);
	cursor: pointer;
}
.pd-req-pill:hover { border-color: var(--pd-amber-dark, #0C7A6C); }
.pd-req-pill.active {
	background: var(--pd-amber-dark, #0C7A6C);
	border-color: var(--pd-amber-dark, #0C7A6C);
	color: #fff;
	font-weight: 600;
}

.pd-req-phone-row {
	display: flex;
	align-items: center;
	gap: 8px;
	border: 1px solid var(--pd-rule, #D8DEE2);
	border-radius: 6px;
	padding: 0 10px;
}
.pd-req-phone-flag { font-size: 1.1rem; }
.pd-req-phone-row input {
	border: none;
	outline: none;
	padding: 10px 0;
	flex: 1;
	font-size: .95rem;
}

.pd-req-message {
	width: 100%;
	border: 1px solid var(--pd-rule, #D8DEE2);
	border-radius: 6px;
	padding: 10px 12px;
	margin-top: 14px;
	font-family: inherit;
	font-size: .9rem;
	resize: vertical;
}

.pd-req-popup-form input[type="text"],
.pd-req-popup-form input[type="email"] {
	width: 100%;
	border: 1px solid var(--pd-rule, #D8DEE2);
	border-radius: 6px;
	padding: 10px 12px;
	font-size: .9rem;
	box-sizing: border-box;
}

.pd-req-error { color: #b32d2e; font-size: .8rem; min-height: 1em; margin: 8px 0 0; }

.pd-req-next-btn {
	width: 100%;
	background: #F5821F;
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 13px;
	font-size: .95rem;
	font-weight: 700;
	letter-spacing: .04em;
	cursor: pointer;
	margin-top: 14px;
}
.pd-req-next-btn:hover { background: #DD7015; }
.pd-req-next-btn:disabled { opacity: .6; cursor: not-allowed; }

.pd-req-step2-actions { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.pd-req-back-btn {
	background: none;
	border: none;
	color: var(--pd-ink-soft, #4C5E72);
	font-size: .85rem;
	cursor: pointer;
	flex-shrink: 0;
}
.pd-req-step2-actions .pd-req-next-btn { margin-top: 0; }

.pd-req-success { text-align: center; padding: 20px 0; }
.pd-req-success p { color: var(--pd-amber-dark, #0C7A6C); font-weight: 600; font-size: .95rem; margin: 0; }

@media (max-width: 420px) {
	.pd-req-popup { max-width: 94vw; }
}
