/*
 * Author custom font + Divi 5 icon-picker integration.
 *
 * Codepoints: U+F400-F41D. THREE-WEIGHT FAMILY: the same 30
 * codepoints exist in a thin (200), regular (400) and bold (700) file, all
 * declared under the same family names below. `font-weight` selects the file —
 * both for the standalone `author` family and inside the composed
 * `ETmodules` family (each weight redeclares our unicode-range at its own
 * font-weight). The JSON carries one picker entry per (icon, weight), so all
 * three weights are selectable in Divi's picker; Divi stores the weight on the
 * icon attr and emits it as font-weight on the front-end.
 * Generated from src/fonts/author/{thin,regular,bold}/ by
 * scripts/regen-font.py.
 *
 * No FontAwesome redeclaration: our icons always resolve through the ETmodules
 * family, and Divi's FA font has real glyphs across U+E005-F8FF — redeclaring
 * it for our range would risk hijacking genuine FA icons.
 */

@font-face {
	font-family: 'author';
	src: url('../fonts/author-thin.woff2?v=3') format('woff2'),
		url('../fonts/author-thin.woff?v=3') format('woff'),
		url('../fonts/author-thin.ttf?v=3') format('truetype');
	font-weight: 200;
	font-style: normal;
	font-display: block;
}

@font-face {
	font-family: 'author';
	src: url('../fonts/author.woff2?v=3') format('woff2'),
		url('../fonts/author.woff?v=3') format('woff'),
		url('../fonts/author.ttf?v=3') format('truetype');
	font-weight: 400;
	font-style: normal;
	font-display: block;
}

@font-face {
	font-family: 'author';
	src: url('../fonts/author-bold.woff2?v=3') format('woff2'),
		url('../fonts/author-bold.woff?v=3') format('woff'),
		url('../fonts/author-bold.ttf?v=3') format('truetype');
	font-weight: 700;
	font-style: normal;
	font-display: block;
}

@font-face {
	font-family: 'ETmodules';
	src: url('../fonts/author-thin.woff2?v=3') format('woff2'),
		url('../fonts/author-thin.woff?v=3') format('woff'),
		url('../fonts/author-thin.ttf?v=3') format('truetype');
	font-weight: 200;
	font-style: normal;
	font-display: block;
	unicode-range: U+20, U+F400-F41D;
}

@font-face {
	font-family: 'ETmodules';
	src: url('../fonts/author.woff2?v=3') format('woff2'),
		url('../fonts/author.woff?v=3') format('woff'),
		url('../fonts/author.ttf?v=3') format('truetype');
	font-weight: 400;
	font-style: normal;
	font-display: block;
	unicode-range: U+F400-F41D;
}

@font-face {
	font-family: 'ETmodules';
	src: url('../fonts/author-bold.woff2?v=3') format('woff2'),
		url('../fonts/author-bold.woff?v=3') format('woff'),
		url('../fonts/author-bold.ttf?v=3') format('truetype');
	font-weight: 700;
	font-style: normal;
	font-display: block;
	unicode-range: U+20, U+F400-F41D;
}

/* Icon-picker grid: render glyphs with the custom font at the entry's own
 * weight (Divi only styles 400/900 via its normal/black classes — our 200/700
 * come from the data-font-weight attribute). */
.et-vb-icon-picker-list button[data-type="author"]::after,
.et-vb-icon-picker-list button[data-type="author"]::before {
	font-family: 'author' !important;
}

.et-vb-icon-picker-list button[data-type="author"][data-font-weight="200"]::after,
.et-vb-icon-picker-list button[data-type="author"][data-font-weight="200"]::before {
	font-weight: 200 !important;
}

.et-vb-icon-picker-list button[data-type="author"][data-font-weight="400"]::after,
.et-vb-icon-picker-list button[data-type="author"][data-font-weight="400"]::before {
	font-weight: 400 !important;
}

.et-vb-icon-picker-list button[data-type="author"][data-font-weight="700"]::after,
.et-vb-icon-picker-list button[data-type="author"][data-font-weight="700"]::before {
	font-weight: 700 !important;
}

/* Standalone usage: paste
 * `<i class="ds-divi-icon ds-divi-icon-author">&#x...;</i>` anywhere and
 * set font-weight (200/400/700) to pick the stroke weight. The class both
 * renders the glyph via the custom family and triggers the conditional
 * front-end enqueue (ds_icons_used_slugs scans for it). */
.ds-divi-icon-author {
	font-family: 'author' !important;
	font-style: normal;
	font-variant: normal;
	text-transform: none;
	line-height: 1;
	display: inline-block;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
