/*
 * tq-feed «محفوظاتي» header icon (SAVE-1911 T5, flag feed_saved_header). Sits in the theme's own icon holder
 * (.wnav-holder: 5px each side), same size as its icons (--wnav-size), count badge = the theme's badge look
 * (.notification-info; the theme's brand colour variable, so light and dark follow Theme Options). Logical properties only (RTL / LTR).
 * The header-fit slot (site_header_nav_fit) was measured for 30px: holder padding 10 + icon 20 = 30.
 */
.tq-saved-hd-holder {
	display: flex;
	align-items: center;
}

.tq-saved-hd {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: inherit;
	line-height: 1;
	text-decoration: none;
}

.tq-saved-hd__i {
	width: var(--wnav-size, 20px);
	height: var(--wnav-size, 20px);
}

.tq-saved-hd__n {
	position: absolute;
	inset-inline-start: -9px;
	bottom: calc(100% - 9px);
	min-width: 18px;
	height: 18px;
	padding-inline: 4px;
	box-sizing: border-box;
	border-radius: 9px;
	background-color: var(--g-color);
	color: var(--awhite);
	font-size: 10px;
	font-weight: 600;
	line-height: 18px;
	text-align: center;
}

.tq-saved-hd__n[hidden] {
	display: none;
}

/*
 * Dropdown (SAVEDROP-1911): the theme's own popup classes give the look, the width and the place (same as the bell).
 * Only what the bell gets from classes we may not reuse is here: the footer «عرض الكل» = the theme's header row
 * (.notification-header: 10px 20px, 1px line) and its link = the theme's .notification-url (pushed to the end, 0.7
 * opacity, 4px before the arrow). While the rows load, the list keeps the height of about one row (no jump).
 */
.tq-saved-dd__list[aria-busy="true"] {
	min-height: 80px;
}

/* The theme gives .empty-notification display:block, which beats the hidden attribute: keep it hidden while rows show. */
.tq-saved-dd__empty[hidden] {
	display: none;
}

.tq-saved-dd__foot {
	display: flex;
	align-items: center;
	padding-block: 10px;
	padding-inline: 20px;
	border-block-start: 1px solid var(--flex-gray-15);
}

.tq-saved-dd__all {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-inline-start: auto;
	opacity: 0.7;
	transition: var(--effect);
}

.tq-saved-dd__all:hover,
.tq-saved-dd__all:focus-visible {
	opacity: 1;
}

.tq-saved-dd__chev {
	width: 14px;
	height: 14px;
}

/* The arrow points the way the text reads: left on the Arabic (RTL) site. */
.tq-saved-dd__all:dir(rtl) .tq-saved-dd__chev {
	transform: scaleX(-1);
}

.tq-saved-hd:focus-visible {
	outline: 2px solid var(--g-color);
	outline-offset: 4px;
	border-radius: 4px;
}

/*
 * Phone header (SAVEFIX-1911; MHEAD-1911 moved it to the toggle side): the «محفوظاتي» icon and the theme's bell in our
 * holder, right before the dark-mode toggle. The theme gives each icon holder 3px each side in its centred phone layout;
 * the gaps below make 16px between the two icons and 16px between the bell and the toggle (Sherif 12/11: no glued icons;
 * the bell's count badge hangs toward the toggle, so this end gap is what keeps it clear).
 */
.tq-mhd-icons {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-inline-end: 13px;
}

/*
 * Same visual size as the bell (Sherif 19/11). The bell is a font glyph that fills its --wnav-size box (about 14 x 18px
 * at 19px); the outline bookmark only fills 12 x 16 of its 24 viewBox, so at the same box it looked smaller. 1.3 x the
 * theme size gives the same ink height and width. Fixed box from the head stylesheet: no layout shift.
 */
.tq-mhd-icons .tq-saved-hd__i {
	width: calc(var(--wnav-size, 19px) * 1.3);
	height: calc(var(--wnav-size, 19px) * 1.3);
}

/*
 * Room for the icons beside the toggle (MHEAD-1911). The theme's centred phone layout gives each side a fixed 30%
 * (96px at 360px): the toggle (56) + bell + bookmark + gaps need about 130, so they ran under the logo. Only while our
 * holder is in the header (:has): the two sides take their content width and the logo column takes the rest, so the
 * logo stays centred between the menu button and the icons. Desktop never shows #header-mobile.
 */
#header-mobile .mbnav-center:has(.tq-mhd-icons) .navbar-left,
#header-mobile .mbnav-center:has(.tq-mhd-icons) .navbar-right {
	width: auto;
}

#header-mobile .mbnav-center:has(.tq-mhd-icons) .navbar-center {
	flex: 1 1 auto;
	width: auto;
	min-width: 0;
}
