.gnco-proforma-trigger {
	font-family: "Vazirmatn", Tahoma, sans-serif !important;
}

.gnco-proforma-trigger[hidden] {
	display: none !important;
}

.gnco-proforma-product-button {
	margin-inline-start: 10px !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	vertical-align: top;
	white-space: nowrap;
}

.woocommerce div.product form.cart a.added_to_cart.wc-forward {
	display: block;
	clear: both;
	flex: 0 0 100%;
	order: 99;
	width: max-content;
	margin: 9px 0 0 !important;
}

.woocommerce-mini-cart__buttons .gnco-proforma-mini-cart-button,
.widget_shopping_cart_content .gnco-proforma-mini-cart-button {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 38px;
	margin: 8px 0 0 !important;
	box-sizing: border-box;
	border: 1px solid #0170b9 !important;
	background: #fff !important;
	color: #0170b9 !important;
	font-weight: 800 !important;
}

.gnco-proforma-trigger:disabled {
	cursor: not-allowed;
	opacity: .5;
}

.gnco-proforma-cart-button {
	width: 100%;
	margin-top: 10px !important;
}

body.gnco-proforma-modal-open {
	overflow: hidden;
}

.gnco-proforma-modal[hidden] {
	display: none !important;
}

.gnco-proforma-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	direction: rtl;
	font-family: "Vazirmatn", Tahoma, sans-serif;
}

.gnco-proforma-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 16, 18, .66);
	backdrop-filter: blur(3px);
}

.gnco-proforma-dialog {
	position: relative;
	width: min(590px, calc(100% - 32px));
	max-height: calc(100vh - 48px);
	overflow: auto;
	margin: 24px auto;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 24px 80px rgba(0, 0, 0, .26);
	outline: none;
	animation: gnco-modal-in .22s ease-out;
}

@keyframes gnco-modal-in {
	from { opacity: 0; transform: translateY(16px) scale(.985); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

.gnco-proforma-brand-strip {
	height: 7px;
	background: #0170b9;
	border-radius: 16px 16px 0 0;
}

.gnco-proforma-close {
	position: absolute;
	top: 18px;
	left: 18px;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #f2f2f2;
	color: #333;
	font-size: 25px;
	line-height: 31px;
	cursor: pointer;
	z-index: 1;
}

.gnco-proforma-dialog-body {
	padding: 28px 32px 32px;
}

.gnco-proforma-heading {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 24px;
}

.gnco-proforma-heading img {
	width: 56px;
	height: 56px;
	border-radius: 11px;
	object-fit: cover;
}

.gnco-proforma-heading h2,
.gnco-proforma-preview h3 {
	margin: 0 0 4px;
	color: #242424;
	font-size: 22px;
}

.gnco-proforma-heading p {
	margin: 0;
	color: #727272;
	font-size: 14px;
}

#gnco-proforma-form label {
	display: block;
	margin: 15px 0 7px;
	color: #333;
	font-weight: 700;
}

#gnco-proforma-form label span {
	color: #0170b9;
}

#gnco-proforma-form input {
	width: 100%;
	height: 48px;
	padding: 0 13px;
	border: 1px solid #d5d5d5;
	border-radius: 8px;
	background: #fff;
	color: #222;
	box-sizing: border-box;
	font: inherit;
}

#gnco-proforma-form button,
.gnco-proforma-close,
.gnco-proforma-new {
	font-family: "Vazirmatn", Tahoma, sans-serif;
}

#gnco-proforma-form input:focus {
	border-color: #0170b9;
	box-shadow: 0 0 0 3px rgba(1, 112, 185, .14);
	outline: 0;
}

.gnco-proforma-submit {
	width: 100%;
	min-height: 49px;
	margin-top: 22px !important;
	background: #0170b9 !important;
	border-color: #0170b9 !important;
	border-radius: 8px !important;
	font-weight: 800 !important;
}

.gnco-proforma-error {
	margin-top: 14px;
	padding: 10px 12px;
	border: 1px solid #ead7a5;
	border-radius: 7px;
	background: #fffaf0;
	color: #765000;
	font-size: 13px;
}

.gnco-proforma-success-mark {
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	margin: 0 auto 12px;
	border-radius: 50%;
	background: #e9f7ef;
	color: #187944;
	font-size: 28px;
	font-weight: 900;
}

.gnco-proforma-preview h3 {
	text-align: center;
}

.gnco-proforma-preview-meta {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin: 20px 0 14px;
	padding: 12px 14px;
	border-radius: 8px;
	background: #f6f6f6;
	color: #555;
	font-size: 13px;
}

.gnco-proforma-preview-items {
	border: 1px solid #e3e3e3;
	border-radius: 8px;
	overflow: hidden;
}

.gnco-proforma-preview-items > div,
.gnco-proforma-preview-total {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 11px 13px;
}

.gnco-proforma-preview-items > div + div {
	border-top: 1px solid #ececec;
}

.gnco-proforma-preview-total {
	margin-top: 10px;
	border-radius: 8px;
	background: #eaf5fb;
	color: #005b98;
	font-size: 16px;
	font-weight: 800;
}

.gnco-proforma-validity {
	margin: 14px 0;
	padding: 10px 12px;
	border-right: 3px solid #0170b9;
	background: #fafafa;
	color: #5d5d5d;
	font-size: 12px;
	line-height: 1.9;
}

.gnco-proforma-result-actions {
	display: flex;
	gap: 12px;
	margin-top: 20px;
}

.gnco-proforma-result-actions .button {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 1 1 0;
	min-height: 50px;
	padding: 10px 18px !important;
	box-sizing: border-box;
	border-radius: 10px !important;
	font-weight: 800 !important;
	font-family: "Vazirmatn", Tahoma, sans-serif !important;
	text-align: center;
	text-decoration: none !important;
	transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.gnco-proforma-view {
	border: 1.5px solid #0170b9 !important;
	background: #fff !important;
	color: #0170b9 !important;
	box-shadow: none !important;
}

.gnco-proforma-view:hover,
.gnco-proforma-view:focus {
	border-color: #005b98 !important;
	background: #f0f8fd !important;
	color: #005b98 !important;
}

.gnco-proforma-download {
	background: #0170b9 !important;
	border-color: #0170b9 !important;
	color: #fff !important;
	box-shadow: 0 7px 18px rgba(1, 112, 185, .22) !important;
}

.gnco-proforma-download:hover,
.gnco-proforma-download:focus {
	background: #005b98 !important;
	border-color: #005b98 !important;
	color: #fff !important;
	box-shadow: 0 9px 22px rgba(1, 91, 152, .28) !important;
}

.gnco-proforma-result-actions .button:active {
	transform: translateY(1px);
}

.gnco-proforma-new {
	display: block;
	margin: 16px auto 0;
	padding: 4px;
	border: 0;
	background: transparent;
	color: #5e5e5e;
	text-decoration: underline;
	cursor: pointer;
}

@media (max-width: 520px) {
	.gnco-proforma-dialog-body { padding: 24px 20px 26px; }
	.gnco-proforma-preview-meta { flex-direction: column; }
	.gnco-proforma-result-actions { flex-direction: column; }
	.gnco-proforma-product-button { margin-inline-start: 8px !important; }
}
