/* ============================================================================
   asc-billing.css - the billing and delivery forms (FEATURE-BACKLOG item 22)
   ============================================================================
   Checkout steps 2 and 3 and the account's "Date de facturare": the persoană fizică /
   juridică switch, the saved details as cards, the fields in a two-column grid (one on a
   phone), optional fields marked "opțional" rather than starred, errors under their field.
   ============================================================================ */

/* the switch hides with the hidden attribute; a display rule below (flex, grid) would beat it */
.asc-bill [hidden],
.asc-del [hidden],
.asc-pay [hidden],
.asc-account-billing [hidden] {
	display: none !important;
}

.asc-bill-legend {
	display: block;
	width: 100%;
	margin: 0 0 10px;
	padding: 0;
	border: 0;
	font-size: 15px;
	font-weight: 600;
	color: #222;
}

/* ---------- persoană fizică / juridică ------------------------------------------ */
.asc-bill-type {
	margin: 0 0 18px;
	padding: 0;
	border: 0;
}
.asc-seg {
	display: inline-flex;
	flex-wrap: wrap;
	border: 1px solid #c9d1da;
	border-radius: 8px;
	overflow: hidden;
}
.asc-seg-opt {
	position: relative;
	margin: 0;
	font-weight: 400;
	cursor: pointer;
}
.asc-seg-opt input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}
.asc-seg-opt span {
	display: block;
	padding: 9px 18px;
	background: #fff;
	color: #333;
	font-size: 14px;
}
.asc-seg-opt + .asc-seg-opt span {
	border-left: 1px solid #c9d1da;
}
.asc-seg-opt small {
	color: #777;
	font-size: 12px;
}
.asc-seg-opt input:checked + span {
	background: #229ac8;
	color: #fff;
}
.asc-seg-opt input:checked + span small {
	color: #e6f4fa;
}
.asc-seg-opt input:focus-visible + span {
	outline: 2px solid #229ac8;
	outline-offset: -4px;
}

/* ---------- the fields --------------------------------------------------------- */
.asc-grid {
	display: flex;
	flex-wrap: wrap;
	margin: 0 -8px;
}
.asc-grid > .form-group {
	padding: 0 8px;
	margin-bottom: 14px;
}
.asc-col-12 { flex: 0 0 100%; max-width: 100%; }
.asc-col-8 { flex: 0 0 66.666%; max-width: 66.666%; }
.asc-col-6 { flex: 0 0 50%; max-width: 50%; }
.asc-col-4 { flex: 0 0 33.333%; max-width: 33.333%; }
@media (max-width: 599px) {
	.asc-col-8, .asc-col-6, .asc-col-4 { flex-basis: 100%; max-width: 100%; }
	/* the switch: two equal halves across the phone, the hint under its label */
	.asc-seg { display: flex; flex-wrap: nowrap; width: 100%; }
	.asc-seg-opt { flex: 1 1 0; }
	.asc-seg-opt span { height: 100%; padding: 9px 8px; text-align: center; }
	.asc-seg-opt small { display: block; }
}
.asc-grid .control-label {
	margin-bottom: 4px;
	font-weight: 600;
	font-size: 13px;
}
.asc-opt {
	font-weight: 400;
	color: #888;
}
.asc-opt::before { content: '('; }
.asc-opt::after { content: ')'; }
.asc-grid .help-block {
	margin: 4px 0 0;
	font-size: 12px;
}
.asc-bill-sub {
	margin: 6px 0 12px;
	font-size: 15px;
	font-weight: 600;
	color: #222;
}
.asc-anaf-msg {
	margin-top: 6px;
	font-size: 13px;
}
.asc-anaf-msg:empty { display: none; }
.asc-anaf-busy { color: #777; }
.asc-anaf-ok { color: #2e7d32; }
.asc-anaf-warn { color: #b26a00; }
.asc-error {
	margin-top: 4px;
	font-size: 13px;
}
.asc-check {
	margin: 6px 0 10px;
}
.asc-check label {
	font-weight: 400;
}
/* the other boxes a little larger than the browser's, the label beside them */
.checkbox.asc-check label {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	padding-left: 0;
}
.checkbox.asc-check input[type="checkbox"] {
	position: static;
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	margin: 1px 0 0;
	accent-color: #229ac8;
}

/* ---------- the agreement to the terms: a box of its own ------------------------ */
.asc-agree {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	width: 100%;
	margin: 12px 0;
	padding: 12px 14px;
	border: 2px solid #c9d1da;
	border-radius: 8px;
	background: #fff;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.45;
	color: #222;
	cursor: pointer;
}
.asc-agree input[type="checkbox"] {
	flex: 0 0 22px;
	width: 22px;
	height: 22px;
	margin: 0;
	accent-color: #229ac8;
	cursor: pointer;
}
.asc-agree:hover {
	border-color: #229ac8;
}
.asc-agree:has(input:checked) {
	border-color: #229ac8;
	background: #f4fafd;
}
.asc-agree:has(input:focus-visible) {
	outline: 2px solid #229ac8;
	outline-offset: 2px;
}
.has-error .asc-agree {
	border-color: #a94442;
}

/* ---------- a disabled button and the reason under it ----------------------------- */
.asc-gate {
	clear: both;
	margin: 8px 0 0;
	padding-top: 2px;
	text-align: right;
	font-size: 13px;
	color: #8a5a00;
}
.asc-gate::before {
	content: "\f05a";
	margin-right: 6px;
	font-family: FontAwesome;
}
[data-gate-button][disabled] {
	cursor: not-allowed;
	opacity: 0.55;
}
@media (max-width: 599px) {
	.asc-gate {
		text-align: left;
	}
}
.asc-check-group {
	margin-bottom: 0;
}
.asc-same {
	margin: 14px 0 6px;
	padding: 12px 14px;
	border: 1px solid #e3e6ea;
	border-radius: 8px;
	background: #f8fafb;
}
.asc-same label {
	font-weight: 600;
}
.asc-privacy {
	margin: 10px 0 14px;
	font-size: 12px;
	color: #666;
}
.asc-new-title {
	margin: 4px 0 14px;
	font-size: 16px;
	font-weight: 600;
}

/* ---------- saved details as cards --------------------------------------------- */
.asc-choose {
	margin: 0 0 16px;
	padding: 0;
	border: 0;
}
.asc-choices {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 12px;
}
.asc-choice {
	position: relative;
	margin: 0;
	font-weight: 400;
	cursor: pointer;
}
.asc-choice input {
	position: absolute;
	top: 14px;
	right: 14px;
}
.asc-choice-body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	height: 100%;
	padding: 12px 40px 12px 14px;
	border: 1px solid #d5dae0;
	border-radius: 8px;
	background: #fff;
	font-size: 13px;
	color: #555;
}
.asc-choice-body,
.asc-account-billing .asc-card {
	overflow-wrap: anywhere;
	word-break: break-word;
}
.asc-choice-body strong {
	color: #222;
	font-size: 14px;
}
.asc-choice input:checked + .asc-choice-body {
	border-color: #229ac8;
	box-shadow: 0 0 0 1px #229ac8;
	background: #f4fafd;
}
.asc-choice-new .asc-choice-body {
	justify-content: center;
	border-style: dashed;
	min-height: 64px;
}
.asc-choice-new .asc-choice-body strong {
	color: #229ac8;
}
.asc-badges {
	margin-bottom: 2px;
}
.asc-badge {
	display: inline-block;
	padding: 1px 7px;
	border-radius: 10px;
	background: #eef1f4;
	color: #555;
	font-size: 11px;
	font-weight: 600;
}
.asc-badge-pj {
	background: #e3f2fb;
	color: #17729a;
}
.asc-badge-pf {
	background: #eef6ee;
	color: #2e7d32;
}

/* ---------- the account page ---------------------------------------------------- */
.asc-account-billing .asc-choices {
	margin-bottom: 18px;
}
.asc-account-billing .asc-card {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 14px;
	border: 1px solid #d5dae0;
	border-radius: 8px;
	background: #fff;
	font-size: 13px;
	color: #555;
}
.asc-account-billing .asc-card strong {
	color: #222;
	font-size: 14px;
}
.asc-card-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
}
.asc-card-actions form {
	display: inline;
	margin: 0;
}
.asc-account-billing .asc-card-default {
	border-color: #229ac8;
	box-shadow: 0 0 0 1px #229ac8;
}
.asc-account-billing .asc-card-add {
	justify-content: center;
	align-items: flex-start;
	min-height: 120px;
	border-style: dashed;
	text-decoration: none;
}
.asc-account-billing .asc-card-add strong {
	color: #229ac8;
}
.asc-account-billing .asc-card-add:hover,
.asc-account-billing .asc-card-add:focus {
	background: #f4fafd;
	border-color: #229ac8;
	text-decoration: none;
}
.asc-card-actions .btn-link {
	padding-left: 4px;
	padding-right: 4px;
}
.asc-link-danger,
.asc-link-danger:hover,
.asc-link-danger:focus {
	color: #c0392b;
}
.asc-missing {
	color: #b26a00;
}
.asc-page-title {
	margin: 0 0 6px;
	font-size: 24px;
}
.asc-page-intro {
	margin: 0 0 18px;
	color: #555;
}
.asc-panel {
	padding: 18px 18px 6px;
	margin-bottom: 20px;
	border: 1px solid #e3e6ea;
	border-radius: 8px;
	background: #fff;
}
.asc-empty {
	padding: 22px;
	margin-bottom: 20px;
	border: 1px dashed #c9d1da;
	border-radius: 8px;
	text-align: center;
	color: #555;
}
.asc-register {
	max-width: 760px;
}
.asc-reg-note {
	margin: 0 0 10px;
	padding: 10px 12px;
	border-radius: 6px;
	background: #f4fafd;
	color: #44606e;
	font-size: 13px;
}
@media (max-width: 599px) {
	.asc-panel {
		padding: 14px 12px 4px;
	}
	.asc-page-title {
		font-size: 21px;
	}
}
