/* 23h Product Features – admin (same look as 23h Brand Ambassador) */

.h23pf-screen,
.h23pf-wrap,
#h23pf_product_data,
.h23pf-badges {
	--h23pf-ink: #1f2937;
	--h23pf-text: #3c434a;
	--h23pf-muted: #646970;
	--h23pf-line: #e5e7eb;
	--h23pf-input: #cbd5e1;
	--h23pf-soft: #f6f7f9;
	--h23pf-tab: #e8eaed;
	--h23pf-card: #fff;
	--h23pf-accent: #0f766e;
	--h23pf-accent-dark: #115e59;
	--h23pf-accent-ink: #fff;
	--h23pf-accent-soft: #e6f4f2;
	--h23pf-danger: #b32d2e;
	--h23pf-radius: 10px;
}

/* ---------- Top bar ---------- */

.h23pf-topbar {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	height: 36px; padding: 10px 20px; margin: 0 0 0 -20px; box-sizing: content-box;
	background: linear-gradient(100deg, #0f766e 0%, #115e59 60%, #134e4a 100%); color: #fff;
}
.h23pf-topbar-brand { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 13px; }
.h23pf-logo {
	display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; flex: none;
	background: rgba(255,255,255,.15); color: #fff; font-weight: 700; font-size: 12px; letter-spacing: -.3px;
}
.h23pf-topbar-title { font-size: 16px; font-weight: 600; white-space: nowrap; }
.h23pf-topbar-tagline { opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h23pf-version { font-size: 12px; color: #fff; background: rgba(255,255,255,.15); border-radius: 20px; padding: 3px 8px; flex: none; }
@media (max-width: 782px) { .h23pf-topbar { margin-left: -10px; } .h23pf-topbar-tagline { display: none; } }

/* ---------- Title + tabs ---------- */

.h23pf-wrap { max-width: 1180px; margin-top: 20px; }
.h23pf-title { font-size: 23px; font-weight: 400; color: var(--h23pf-ink); margin: 0 0 14px !important; padding: 0 !important; }
.h23pf-wrap--cpt { margin: 20px 20px 0 0; }
.h23pf-tabs {
	display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 22px; padding: 0; list-style: none;
	border-bottom: 1px solid #c3c4c7;
}
.h23pf-tab { margin: 0 0 -1px; border-radius: 6px 6px 0 0; background: var(--h23pf-tab); }
.h23pf-tab a {
	display: flex; align-items: center; gap: 6px; padding: 9px 14px; color: #50575e; text-decoration: none;
	font-weight: 500; font-size: 13px; border-radius: 6px 6px 0 0;
}
.h23pf-tab a .dashicons { font-size: 16px; width: 16px; height: 16px; }
.h23pf-tab a:hover, .h23pf-tab a:focus { color: var(--h23pf-ink); background: #f0f1f3; box-shadow: none; }
.h23pf-tab.is-active { background: #f0f0f1; box-shadow: 0 1px 0 0 #f0f0f1; border: 1px solid #c3c4c7; border-bottom: 0; }
.h23pf-tab.is-active a { color: var(--h23pf-accent); font-weight: 600; background: transparent; }
.h23pf-notice { margin: 0 0 16px !important; }

/* ---------- Cards ---------- */

.h23pf-card {
	background: var(--h23pf-card); border-radius: var(--h23pf-radius); margin-bottom: 26px;
	box-shadow: 0 0 0 1px var(--h23pf-line), 0 1px 3px 0 rgba(17,24,39,.05);
}
.h23pf-card-head { position: relative; padding: 18px 20px; border-bottom: 1px solid var(--h23pf-line); }
.h23pf-card-head::before {
	content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 0 3px 3px 0; background: var(--h23pf-accent);
}
.h23pf-card-head h2 { margin: 0; font-size: 15px; font-weight: 600; color: var(--h23pf-ink); line-height: 1.4; }
.h23pf-card-head p { margin: 6px 0 0; color: var(--h23pf-muted); max-width: 820px; line-height: 1.55; }
.h23pf-card-body { padding: 18px 20px 20px; }
.h23pf-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
@media (max-width: 1100px) { .h23pf-grid-2 { grid-template-columns: 1fr; } }

.h23pf-field { display: grid; grid-template-columns: 170px 1fr; gap: 6px 16px; padding: 11px 0; border-top: 1px solid var(--h23pf-soft); align-items: start; }
.h23pf-field:first-child { border-top: 0; padding-top: 0; }
.h23pf-field-label { font-size: 13px; color: var(--h23pf-text); padding-top: 7px; }
.h23pf-help { color: var(--h23pf-muted); margin: 6px 0 0; font-size: 12.5px; font-style: normal; display: block; }
@media (max-width: 782px) { .h23pf-field { grid-template-columns: 1fr; } }

.h23pf-wrap input[type=text], .h23pf-wrap input[type=url], .h23pf-wrap input[type=number], .h23pf-wrap input[type=date],
.h23pf-wrap textarea, .h23pf-wrap select, .h23pf-builder input[type=text], .h23pf-builder input[type=number], .h23pf-builder input[type=date],
.h23pf-builder textarea, .h23pf-builder select {
	border: 1px solid var(--h23pf-input); border-radius: 5px; box-shadow: 0 1px 2px rgba(0,0,0,.04); min-height: 32px;
}
.h23pf-wrap input:focus, .h23pf-wrap textarea:focus, .h23pf-wrap select:focus,
.h23pf-builder input:focus, .h23pf-builder textarea:focus, .h23pf-builder select:focus {
	border-color: var(--h23pf-accent); box-shadow: 0 0 0 1px var(--h23pf-accent); outline: 0;
}

.h23pf-subtitle { font-size: 13px; margin: 18px 0 8px; color: var(--h23pf-ink); }
.h23pf-subtitle:first-child { margin-top: 0; }
.h23pf-empty { color: var(--h23pf-muted); background: var(--h23pf-soft); border-radius: 6px; padding: 10px 12px; margin: 0; }

.h23pf-table { width: 100%; border-collapse: collapse; }
.h23pf-table th, .h23pf-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--h23pf-line); }
.h23pf-table th { font-weight: 600; color: var(--h23pf-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .3px; }

/* ---------- Controls ---------- */

.h23pf-btn {
	display: inline-flex; align-items: center; gap: 6px; border-radius: 8px; padding: 6px 14px; min-height: 32px;
	font-weight: 600; font-size: 13px; cursor: pointer; text-decoration: none; line-height: 1.4; border: 1px solid transparent;
	transition: background .15s, border-color .15s, color .15s;
}
.h23pf-btn--primary { background: var(--h23pf-accent); color: var(--h23pf-accent-ink); }
.h23pf-btn--primary:hover, .h23pf-btn--primary:focus { background: var(--h23pf-accent-dark); color: #fff; }
.h23pf-btn--ghost { background: #fff; color: var(--h23pf-ink); border-color: var(--h23pf-line); font-weight: 500; }
.h23pf-btn--ghost:hover, .h23pf-btn--ghost:focus { border-color: var(--h23pf-accent); color: var(--h23pf-accent); background: #fff; }
.h23pf-btn--sm { padding: 4px 10px; min-height: 28px; font-size: 12px; }
.h23pf-btn .dashicons { font-size: 16px; width: 16px; height: 16px; }

.h23pf-savebar { padding: 0 0 20px; }

.h23pf-toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.h23pf-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.h23pf-toggle-ui { position: relative; flex: none; width: 38px; height: 22px; border-radius: 20px; background: #d1d5db; transition: background .15s; }
.h23pf-toggle-ui::after {
	content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff;
	box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s;
}
.h23pf-toggle input:checked + .h23pf-toggle-ui { background: var(--h23pf-accent); }
.h23pf-toggle input:checked + .h23pf-toggle-ui::after { transform: translateX(16px); }
.h23pf-toggle input:focus-visible + .h23pf-toggle-ui { outline: 2px solid var(--h23pf-accent); outline-offset: 2px; }

.h23pf-input-unit { display: inline-flex; align-items: stretch; }
.h23pf-input-unit input { width: 76px; border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; }
.h23pf-input-unit em {
	display: flex; align-items: center; font-style: normal; color: var(--h23pf-muted); background: var(--h23pf-soft);
	border: 1px solid var(--h23pf-input); border-left: 0; border-radius: 0 5px 5px 0; padding: 0 8px; font-size: 12px;
}
.h23pf-color { display: inline-flex; align-items: center; gap: 6px; }
.h23pf-color input[type=color] { width: 36px; height: 32px; padding: 2px; border: 1px solid var(--h23pf-input); border-radius: 5px; background: #fff; cursor: pointer; }
.h23pf-color-text { width: 96px; font-family: monospace; }

.h23pf-mini { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.h23pf-mini > span { font-size: 12px; color: var(--h23pf-muted); font-weight: 500; }
.h23pf-mini > span small { font-weight: 400; opacity: .8; }
.h23pf-mini input[type=text], .h23pf-mini input[type=url], .h23pf-mini input[type=number], .h23pf-mini input[type=date], .h23pf-mini textarea, .h23pf-mini select { width: 100%; max-width: none; }
.h23pf-grow { flex: 1 1 220px; }

/* ---------- Repeatable rows ---------- */

.h23pf-rows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.h23pf-row {
	position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 14px 44px 14px 10px;
	background: #fff; border: 1px solid var(--h23pf-line); border-radius: var(--h23pf-radius); transition: opacity .15s, transform .15s, box-shadow .15s;
}
.h23pf-row:hover { box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.h23pf-row.is-removing { opacity: 0; transform: scale(.98); }
.h23pf-row-placeholder { border: 2px dashed var(--h23pf-line); border-radius: var(--h23pf-radius); background: var(--h23pf-soft); visibility: visible !important; }
.h23pf-drag { color: #a7aaad; cursor: grab; margin-top: 6px; flex: none; }
.h23pf-drag:hover { color: var(--h23pf-ink); }
.h23pf-row-main { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.h23pf-row-line { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.h23pf-row-flags { align-items: center; }
.h23pf-del {
	position: absolute; top: 10px; right: 8px; border: 0; background: none; color: #a7aaad; cursor: pointer; border-radius: 4px; padding: 4px;
}
.h23pf-del:hover { color: var(--h23pf-danger); background: #fcf0f1; }

.h23pf-icon-box { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: none; width: 104px; }
.h23pf-icon-pick {
	--s: 40px; display: grid; place-items: center; width: 96px; height: 96px; padding: 0; cursor: pointer;
	border: 1px dashed #c3c4c7; border-radius: 8px; background: repeating-conic-gradient(#f6f7f7 0 25%, #fff 0 50%) 0 0/14px 14px;
	transition: border-color .15s;
}
.h23pf-icon-pick:hover { border-color: var(--h23pf-accent); }
.h23pf-icon-pick img { width: var(--s); height: var(--s); object-fit: contain; display: block; }
.h23pf-icon-pick .dashicons { font-size: 28px; width: 28px; height: 28px; color: #a7aaad; }
.h23pf-size { align-items: center; }
.h23pf-size .h23pf-input-unit input { width: 58px; }
.h23pf-alt { flex: 0 1 200px; }
.h23pf-cats { display: flex; align-items: center; gap: 8px; flex: 1 1 320px; }
.h23pf-cats > span { font-size: 12px; color: var(--h23pf-muted); white-space: nowrap; }
.h23pf-cats .select2-container { min-width: 220px; }

.h23pf-msg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px 20px; }

/* Previzualizare – aceleași reguli ca pe site */
.h23pf-card--preview .h23pf-card-body { background: #fff; }

/* ---------- Constructor de formulare ---------- */

.h23pf-builder { padding: 4px 0; }
.h23pf-builder-empty { padding: 22px; text-align: center; color: var(--h23pf-muted); border: 1px dashed var(--h23pf-line); border-radius: var(--h23pf-radius); margin-bottom: 12px; }
.h23pf-fields { display: flex; flex-direction: column; gap: 8px; }
.h23pf-b-card { border: 1px solid var(--h23pf-line); border-radius: var(--h23pf-radius); background: #fff; transition: opacity .15s, box-shadow .15s; }
.h23pf-b-card.is-open { box-shadow: 0 2px 10px rgba(0,0,0,.06); border-color: #c3c4c7; }
.h23pf-b-card.is-removing { opacity: 0; }
.h23pf-b-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px; cursor: default; }
.h23pf-b-drag { color: #a7aaad; cursor: grab; }
.h23pf-b-type { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .3px; background: var(--h23pf-soft); color: var(--h23pf-muted); border-radius: 4px; padding: 3px 7px; white-space: nowrap; }
.h23pf-b-type--radio, .h23pf-b-type--select, .h23pf-b-type--checkbox { background: var(--h23pf-accent-soft); color: var(--h23pf-accent); }
.h23pf-b-title { font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h23pf-b-star { color: var(--h23pf-danger); }
.h23pf-b-meta { font-size: 12px; color: var(--h23pf-muted); white-space: nowrap; }
.h23pf-b-actions { display: flex; gap: 2px; }
.h23pf-b-icon { border: 0; background: none; color: #8c8f94; border-radius: 4px; cursor: pointer; padding: 4px; line-height: 1; }
.h23pf-b-icon:hover { background: var(--h23pf-soft); color: var(--h23pf-ink); }
.h23pf-b-icon[data-act=del]:hover, .h23pf-b-icon[data-act=opt-del]:hover { color: var(--h23pf-danger); background: #fcf0f1; }
.h23pf-b-toggle .dashicons { transition: transform .15s; }
.h23pf-b-card.is-open .h23pf-b-toggle .dashicons { transform: rotate(180deg); }
.h23pf-b-body { display: none; padding: 4px 14px 16px 40px; border-top: 1px solid var(--h23pf-soft); }
.h23pf-b-card.is-open .h23pf-b-body { display: flex; flex-direction: column; gap: 12px; padding-top: 14px; }
.h23pf-b-line { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.h23pf-b-narrow { flex: 0 1 170px; }
.h23pf-b-note { color: var(--h23pf-muted); margin: 0; }
.h23pf-b-options { background: var(--h23pf-soft); border-radius: 6px; padding: 10px; }
.h23pf-b-options-head, .h23pf-b-opt { display: grid; grid-template-columns: 20px 1fr 56px 28px; gap: 8px; align-items: center; }
.h23pf-b-options-head { font-size: 11px; color: var(--h23pf-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .3px; padding: 0 0 6px; }
.h23pf-b-options-head span:nth-child(3) { text-align: center; }
.h23pf-b-opt { padding: 3px 0; }
.h23pf-b-opt input[type=text] { width: 100%; }
.h23pf-b-opt input[type=radio], .h23pf-b-opt input[type=checkbox] { justify-self: center; margin: 0; }
.h23pf-b-opt-drag { color: #a7aaad; cursor: grab; }
.h23pf-b-options .h23pf-btn { margin-top: 8px; }
.h23pf-b-req { align-items: center; }

.h23pf-add { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--h23pf-soft); }
.h23pf-add-label { font-weight: 600; margin-right: 4px; }
.h23pf-add-btn { border: 1px solid var(--h23pf-line); background: #fff; border-radius: 20px; padding: 5px 12px; cursor: pointer; font-size: 12.5px; color: var(--h23pf-ink); }
.h23pf-add-btn:hover { border-color: var(--h23pf-accent); color: var(--h23pf-accent); background: var(--h23pf-accent-soft); }

.h23pf-assign-label { font-weight: 600; margin: 14px 0 4px; }
.h23pf-help ul, ul.h23pf-help { margin: 0; padding-left: 16px; list-style: disc; }
ul.h23pf-help li { margin-bottom: 8px; color: var(--h23pf-muted); font-size: 12.5px; line-height: 1.5; }

/* ---------- Tab-ul din pagina produsului ---------- */

#woocommerce-product-data ul.wc-tabs li.h23pf_tab a::before { content: "\f155"; }
#h23pf_product_data .h23pf-panel-title { font-weight: 600; font-size: 13px; padding: 4px 12px 0 !important; margin: 10px 0 4px !important; display: flex; gap: 12px; align-items: baseline; }
#h23pf_product_data .h23pf-panel-title a { font-weight: 400; font-size: 12px; }
#h23pf_product_data .h23pf-pfeatures-editor { padding: 6px 12px 14px; }
#h23pf_product_data .h23pf-pfeatures-editor .h23pf-row { padding-right: 40px; }
#h23pf_product_data .h23pf-pfeatures-editor label,
#h23pf_product_data .h23pf-pfeatures-editor .h23pf-mini { float: none; width: auto; margin: 0; }
#h23pf_product_data .h23pf-pfeatures-editor input[type=text],
#h23pf_product_data .h23pf-pfeatures-editor input[type=url],
#h23pf_product_data .h23pf-pfeatures-editor textarea { width: 100%; float: none; }
#h23pf_product_data .h23pf-pfeatures-editor .h23pf-input-unit input { width: 58px; float: none; }
#h23pf_product_data .h23pf-auto span { padding-top: 4px; display: inline-block; }

.h23pf-cat-inline { display: flex; gap: 8px; flex-wrap: wrap; }
.h23pf-cat-inline input { width: 90px !important; }
.h23pf-cat-inline label { display: flex; align-items: center; gap: 6px; }

/* ---------- Two feature boxes ---------- */

.h23pf-box-select { display: inline-flex; align-items: center; gap: 6px; }
.h23pf-box-select > span { font-size: 12px; color: var(--h23pf-muted); white-space: nowrap; }
.h23pf-box-select select { min-height: 30px; }
.h23pf-card--box .h23pf-grid-2 > div > .h23pf-field:first-child { border-top: 0; padding-top: 0; }
.h23pf-preview-label { margin: 14px 0 6px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; color: var(--h23pf-muted); }
.h23pf-preview-label:first-child { margin-top: 0; }
