/* NKE Quote – frontend */
:root {
	--nkq-primary: var(--primary-color, #0b3d91);
	--nkq-accent: #f59e0b;
	--nkq-border: #e3e7ee;
	--nkq-muted: #6b7280;
	--nkq-bg: #f6f8fb;
	--nkq-radius: 10px;
}

/* ---------- Nút thêm vào báo giá ---------- */
.nkq-add.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin: 8px 0 0;
	padding: 0 14px;
	min-height: 36px;
	line-height: 1.2;
	font-size: 13px;
	font-weight: 600;
	text-transform: none;
	letter-spacing: 0;
	color: var(--nkq-primary);
	background: #fff;
	border: 1.5px solid var(--nkq-primary);
	border-radius: 6px;
	transition: background .2s, color .2s, transform .15s, box-shadow .2s;
	cursor: pointer;
}
.nkq-add.button:hover { background: var(--nkq-primary); color: #fff; box-shadow: 0 4px 14px rgba(11, 61, 145, .25); }
.nkq-add.is-added { background: var(--nkq-primary); color: #fff; }
.nkq-add.is-pulse { transform: scale(1.06); }
.nkq-add--loop { width: 100%; }
.nkq-add--loop.button { padding: 0 8px; font-size: 12.5px; white-space: nowrap; overflow: hidden; }
.nkq-add--loop .nkq-txt { overflow: hidden; text-overflow: ellipsis; }
.nkq-single-wrap { margin: 14px 0; }
.nkq-add--single.button { min-height: 44px; padding: 0 22px; font-size: 15px; }
.nkq-ico {
	width: 16px; height: 16px; flex: 0 0 16px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='12' y1='18' x2='12' y2='12'/%3E%3Cline x1='9' y1='15' x2='15' y2='15'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='12' y1='18' x2='12' y2='12'/%3E%3Cline x1='9' y1='15' x2='15' y2='15'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Nút nổi + toast ---------- */
.nkq-float {
	position: fixed; right: 18px; top: 50%; bottom: auto; transform: translateY(-50%); z-index: 990;
	display: inline-flex; align-items: center; gap: 8px;
	padding: 10px 16px; border-radius: 999px;
	background: var(--nkq-primary); color: #fff !important; font-weight: 600; font-size: 14px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
	animation: nkq-in-float .35s ease;
}
.nkq-float[hidden] { display: none; }
.nkq-float:hover { transform: translateY(calc(-50% - 2px)); }
.nkq-count {
	min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
	background: var(--nkq-accent); color: #111; font-size: 12px; line-height: 22px; text-align: center;
}
.nkq-toast {
	position: fixed; left: 50%; bottom: 24px; z-index: 99999;
	transform: translate(-50%, 140%); opacity: 0;
	display: flex; gap: 14px; align-items: center;
	padding: 12px 18px; border-radius: 8px; background: #111827; color: #fff; font-size: 14px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
	transition: transform .3s ease, opacity .3s ease;
}
.nkq-toast.is-show { transform: translate(-50%, 0); opacity: 1; }
.nkq-toast a { color: #fbbf24; font-weight: 600; white-space: nowrap; }
@keyframes nkq-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes nkq-in-float { from { opacity: 0; transform: translateY(calc(-50% + 12px)); } to { opacity: 1; transform: translateY(-50%); } }

/* ---------- Form ---------- */
.nkq-form-wrap { max-width: 980px; margin: 0 auto 40px; }
.nkq-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.nkq-tab {
	display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
	margin: 0; padding: 14px 18px; text-align: left; text-transform: none; letter-spacing: 0;
	background: #fff; border: 2px solid var(--nkq-border); border-radius: var(--nkq-radius);
	color: #111827; cursor: pointer; transition: border-color .2s, box-shadow .2s;
	line-height: 1.35; min-height: 0;
}
.nkq-tab strong { font-size: 15px; }
.nkq-tab small { color: var(--nkq-muted); font-size: 12.5px; font-weight: 400; }
.nkq-tab:hover { border-color: #c7d0dd; }
.nkq-tab.is-active { border-color: var(--nkq-primary); box-shadow: 0 6px 18px rgba(11, 61, 145, .12); }
.nkq-tab.is-active strong { color: var(--nkq-primary); }

.nkq-card {
	background: #fff; border: 1px solid var(--nkq-border); border-radius: var(--nkq-radius);
	padding: 20px; margin-bottom: 16px; box-shadow: 0 2px 10px rgba(16, 24, 40, .04);
}
.nkq-card[hidden] { display: none; }
.nkq-card__title { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 16px; }
.nkq-card__title span {
	display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
	background: var(--nkq-primary); color: #fff; font-size: 13px;
}
.nkq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.nkq-field { margin-bottom: 12px; }
.nkq-field label { display: block; margin-bottom: 4px; font-size: 13.5px; font-weight: 600; color: #374151; }
.nkq-field em { color: #dc2626; font-style: normal; }
.nkq-form input[type=text], .nkq-form input[type=email], .nkq-form input[type=tel],
.nkq-form input[type=search], .nkq-form input[type=number], .nkq-form textarea {
	width: 100%; margin: 0; border: 1px solid #d0d6e0; border-radius: 6px; box-shadow: none;
	font-size: 14px; transition: border-color .2s, box-shadow .2s;
}
.nkq-form input:focus, .nkq-form textarea:focus { border-color: var(--nkq-primary); box-shadow: 0 0 0 3px rgba(11, 61, 145, .12); }
.nkq-form .is-invalid { border-color: #dc2626 !important; box-shadow: 0 0 0 3px rgba(220, 38, 38, .12) !important; }
.nkq-hint { color: var(--nkq-muted); font-size: 13px; margin: 4px 0 12px; }
.nkq-hint--req { color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: 6px; padding: 8px 12px; }
.nkq-me { background: var(--nkq-bg); border-radius: 8px; padding: 10px 14px; font-size: 14px; }
.nkq-check { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; font-weight: 400; margin: 6px 0 14px; }
.nkq-check input { margin-top: 3px; }
.nkq-hp { position: absolute !important; left: -9999px !important; height: 1px; overflow: hidden; }

/* Tìm kiếm */
.nkq-search { position: relative; margin-bottom: 14px; }
.nkq-search input { padding-left: 38px !important; height: 44px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") 12px center no-repeat; }
.nkq-search__results {
	position: absolute; z-index: 50; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 4px;
	list-style: none; background: #fff; border: 1px solid var(--nkq-border); border-radius: 8px;
	box-shadow: 0 12px 30px rgba(16, 24, 40, .15); max-height: 340px; overflow: auto;
}
.nkq-search__results li { margin: 0; }
.nkq-search__results li.is-info { padding: 10px; color: var(--nkq-muted); font-size: 13px; }
.nkq-search__results button {
	display: flex; align-items: center; gap: 10px; width: 100%; margin: 0; padding: 6px 8px;
	background: none; border: 0; border-radius: 6px; text-align: left; text-transform: none; letter-spacing: 0;
	font-weight: 400; font-size: 13.5px; color: #111827; cursor: pointer; line-height: 1.3; min-height: 0;
}
.nkq-search__results button:hover { background: var(--nkq-bg); }
.nkq-search__results img { width: 40px; height: 40px; object-fit: contain; border: 1px solid var(--nkq-border); border-radius: 4px; background: #fff; }
.nkq-search__results span { flex: 1; }
.nkq-search__results small { display: block; color: var(--nkq-muted); }
.nkq-search__results b { color: var(--nkq-primary); font-size: 20px; }

/* Danh sách */
.nkq-empty { padding: 26px; text-align: center; color: var(--nkq-muted); background: var(--nkq-bg); border: 1px dashed #cfd6e1; border-radius: 8px; font-size: 14px; }
.nkq-row {
	display: grid; grid-template-columns: 24px 64px 1fr auto 32px; gap: 12px; align-items: center;
	padding: 10px; border: 1px solid var(--nkq-border); border-radius: 8px; margin-bottom: 8px;
	animation: nkq-in .25s ease;
}
.nkq-row__no { color: var(--nkq-muted); font-size: 13px; text-align: center; }
.nkq-row__img img { width: 64px; height: 64px; object-fit: contain; border-radius: 6px; border: 1px solid var(--nkq-border); background: #fff; }
.nkq-row__name { display: block; font-weight: 600; font-size: 14px; color: #111827; line-height: 1.35; }
.nkq-row__main small { display: block; color: var(--nkq-muted); font-size: 12px; }
.nkq-row__note { margin-top: 6px !important; height: 32px !important; font-size: 13px !important; }
.nkq-qty { display: flex; align-items: center; border: 1px solid #d0d6e0; border-radius: 6px; overflow: hidden; }
.nkq-qty button { margin: 0; width: 32px; height: 36px; padding: 0; border: 0; background: var(--nkq-bg); font-size: 18px; color: #374151; cursor: pointer; min-height: 0; line-height: 1; }
.nkq-qty input { width: 56px !important; height: 36px !important; border: 0 !important; text-align: center; border-radius: 0 !important; -moz-appearance: textfield; padding: 0 !important; }
.nkq-qty input::-webkit-outer-spin-button, .nkq-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.nkq-row__del { margin: 0; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: #fef2f2; color: #dc2626; font-size: 20px; cursor: pointer; min-height: 0; line-height: 1; }
.nkq-row__del:hover { background: #dc2626; color: #fff; }

/* Upload */
.nkq-drop {
	display: flex !important; flex-direction: column; align-items: center; gap: 4px; padding: 22px;
	border: 2px dashed #cfd6e1; border-radius: 8px; background: var(--nkq-bg); cursor: pointer; text-align: center;
	font-weight: 400 !important; transition: border-color .2s, background .2s;
}
.nkq-drop:hover, .nkq-drop.is-over { border-color: var(--nkq-primary); background: #eef3fb; }
.nkq-drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.nkq-drop strong { color: var(--nkq-primary); }
.nkq-drop small { color: var(--nkq-muted); }
.nkq-files { list-style: none; margin: 8px 0 0; padding: 0; font-size: 13px; }
.nkq-files li { margin: 2px 0; }

/* Thông báo + nút gửi */
.nkq-msg { padding: 10px 14px; border-radius: 6px; margin-bottom: 12px; font-size: 14px; }
.nkq-msg.is-err { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.nkq-msg.is-ok { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.nkq-submit.button { width: 100%; min-height: 50px; margin: 0; font-size: 16px; border-radius: 8px; }
.nkq-submit:disabled { opacity: .7; cursor: wait; }

.nkq-done[hidden] { display: none; }
.nkq-done {
	text-align: center; padding: 48px 24px 40px; margin: 10px 0 30px;
	background: linear-gradient(180deg, #ecfdf5 0%, #fff 55%);
	border: 1px solid #a7f3d0; border-top: 4px solid #10b981; border-radius: var(--nkq-radius);
	box-shadow: 0 10px 30px rgba(16, 185, 129, .12); outline: none; animation: nkq-in .35s ease;
}
.nkq-done__icon { width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 50%; background: #10b981; color: #fff; font-size: 38px; line-height: 72px; box-shadow: 0 0 0 8px rgba(16, 185, 129, .15); animation: nkq-in .4s ease; }
.nkq-done__title { font-size: 24px; color: #065f46; margin: 0 0 10px; }
.nkq-done__lead { font-size: 17px; line-height: 1.6; color: #1f2937; max-width: 620px; margin: 0 auto 14px; }
.nkq-done__number strong { display: inline-block; padding: 4px 12px; border-radius: 6px; background: #fff; border: 1px dashed #10b981; color: #065f46; letter-spacing: .5px; }
.nkq-done__contact { color: var(--nkq-muted); margin-bottom: 6px; }
.nkq-done__actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.nkq-done__actions .button { margin: 0; }
.nkq-done__actions .button.is-outline { color: #0b1c9c; border-color: #0b1c9c; opacity: 1; }
.nkq-done__actions .button.is-outline:hover { background: #0b1c9c; color: #fff; }

@media (max-width: 640px) {
	.nkq-tabs, .nkq-grid { grid-template-columns: 1fr; }
	.nkq-card { padding: 14px; }
	.nkq-row { grid-template-columns: 52px 1fr 30px; grid-template-areas: "img main del" "img qty del"; gap: 8px; }
	.nkq-row__no { display: none; }
	.nkq-row__img { grid-area: img; }
	.nkq-row__img img { width: 52px; height: 52px; }
	.nkq-row__main { grid-area: main; }
	.nkq-qty { grid-area: qty; justify-self: start; }
	.nkq-row__del { grid-area: del; }
	.nkq-float { right: 12px; padding: 9px 13px; }
	.nkq-toast { width: calc(100% - 24px); justify-content: space-between; }
}

/* ---------- Trang xem báo giá & tài khoản ---------- */
.nkq-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; }
