/*
 * Fomantic UI customisations for Tenevo (Font Awesome 4.7, calendar icons).
 * Load after fomantic semantic.css and font-awesome.min.css.
 */

/* Fomantic 2.9 uses twemoji CDN for flags; restore Semantic 2.2 sprite (16×11px) */
@import url("flag-sprite.css");

/*
 * Hybrid markup: <i class="fa-home icon"> (no bare .fa class).
 * Semantic 2.2 used font-family Icons + .fa-home:before content; Fomantic defines
 * i.icon.fa::before as the FA brand logo (\f2b4) — adding .fa breaks all fa-* icons.
 */
i.icon[class*="fa-"],
i[class*="fa-"].icon,
i.fa.icon {
	display: inline-block;
	font-family: FontAwesome !important;
	font-style: normal !important;
	font-weight: normal !important;
	font-size: inherit;
	text-rendering: auto;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

i.icon[class*="fa-"]::before,
i[class*="fa-"].icon::before,
i.fa.icon::before {
	font-family: FontAwesome !important;
	font-style: normal;
	font-weight: normal;
}

/*
 * Fomantic / Semantic icon names (no fa-* in markup) — map to FA 4.7 glyphs.
 * Hybrid <i class="fa-chevron-left icon"> etc. are covered by the bridge above + font-awesome.min.css.
 */
i.dropdown.icon,
.ui.dropdown > .dropdown.icon,
i.close.icon,
i.delete.icon,
i.remove.icon,
i.checkmark.icon,
i.check.icon,
i.search.icon,
i.chevron.left.icon,
i.chevron.right.icon,
i.angle.left.icon,
i.angle.right.icon,
i.angle.up.icon,
i.angle.down.icon,
i.star.icon,
i.empty.star.icon,
i.heart.icon,
i.check.circle.icon,
i.checkmark.circle.icon,
i.warning.circle.icon,
i.info.circle.icon,
i.exclamation.triangle.icon,
i.notched.circle.loading.icon,
i.notched.circle.icon,
i.caret.down.icon,
i.caret.up.icon,
i.caret.left.icon,
i.caret.right.icon {
	font-family: FontAwesome !important;
	font-style: normal;
	font-weight: normal;
}

i.dropdown.icon::before,
.ui.dropdown > .dropdown.icon::before {
	content: "\f0d7";
}

i.close.icon::before,
i.delete.icon::before,
i.remove.icon::before {
	content: "\f00d";
}

i.checkmark.icon::before,
i.check.icon::before {
	content: "\f00c";
}

i.search.icon::before {
	content: "\f002";
}

i.chevron.left.icon::before {
	content: "\f053";
}

i.chevron.right.icon::before {
	content: "\f054";
}

i.angle.left.icon::before {
	content: "\f104";
}
i.angle.right.icon::before {
	content: "\f105";
}
i.angle.up.icon::before {
	content: "\f106";
}
i.angle.down.icon::before {
	content: "\f107";
}

i.star.icon::before {
	content: "\f005";
}
i.empty.star.icon::before {
	content: "\f006";
}
i.heart.icon::before {
	content: "\f004";
}

i.check.circle.icon::before,
i.checkmark.circle.icon::before {
	content: "\f058";
}

i.warning.circle.icon::before {
	content: "\f06a";
}
i.info.circle.icon::before {
	content: "\f05a";
}
i.exclamation.triangle.icon::before {
	content: "\f071";
}

i.notched.circle.loading.icon::before,
i.notched.circle.icon::before {
	content: "\f1ce";
}

i.caret.down.icon::before {
	content: "\f0d7";
}
i.caret.up.icon::before {
	content: "\f0d8";
}
i.caret.left.icon::before {
	content: "\f0d9";
}
i.caret.right.icon::before {
	content: "\f0da";
}

/*
 * Completed steps use Fomantic's "Step" icon font on ::before, not FA. The FA bridge wins otherwise.
 */
.ui.steps .step.completed > i.icon[class*="fa-"]::before,
.ui.ordered.steps .step.completed::before {
	font-family: Step !important;
	content: "\e800" !important;
	color: #21ba45;
}

/* Calendar nav — match previous third-party calendar (FA chevrons) */
.ui.calendar .ui.table tr th i.icon {
	margin: 0;
}

/*
 * Grid row padding — style.css tightens rows to 0.5rem. With Semantic UI, components/grid.css
 * loaded after style.css and restored Fomantic's default 1rem; the bundled semantic.min.css loads
 * before style.css so the 0.5rem override now wins without this.
 */
.ui.grid > .row {
	padding-top: 1rem;
	padding-bottom: 1rem;
}

/*
 * Fomantic 2.9 highlights empty required inputs via :invalid when the form lacks .initial
 * (only set by .form() on init). Semantic 2.2 did not; errors used .field.error after validation.
 */
.ui.form:not(.initial) .field:not(.error) input:invalid {
	color: rgba(0, 0, 0, 0.87);
	background: #fff;
	border-color: rgba(34, 36, 38, 0.15);
	box-shadow: 0 0 0 0 transparent inset;
}

/* FA font on bridged semantic icon pseudo-elements */
i.dropdown.icon::before,
.ui.dropdown > .dropdown.icon::before,
i.close.icon::before,
i.delete.icon::before,
i.remove.icon::before,
i.checkmark.icon::before,
i.check.icon::before,
i.search.icon::before,
i.chevron.left.icon::before,
i.chevron.right.icon::before,
i.angle.left.icon::before,
i.angle.right.icon::before,
i.angle.up.icon::before,
i.angle.down.icon::before,
i.star.icon::before,
i.empty.star.icon::before,
i.heart.icon::before,
i.check.circle.icon::before,
i.checkmark.circle.icon::before,
i.warning.circle.icon::before,
i.info.circle.icon::before,
i.exclamation.triangle.icon::before,
i.notched.circle.loading.icon::before,
i.notched.circle.icon::before,
i.caret.down.icon::before,
i.caret.up.icon::before,
i.caret.left.icon::before,
i.caret.right.icon::before {
	font-family: FontAwesome !important;
	font-style: normal;
	font-weight: normal;
}
