/**
 * Follow button, header notification bell and the "For you" row.
 *
 * Loaded only while the feature is on. The follow button stays hidden until
 * the script attaches to it, so a visitor without JavaScript never sees a
 * control that does nothing.
 *
 * @package Bosla
 * @since   0.27.0
 */

/* -------------------------------------------------------------------------- */
/* Follow-this-topic button                                                    */
/* -------------------------------------------------------------------------- */

.bosla-follow {
	display: none;
}

.bosla-follow[data-js] {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin-block-start: 0.75rem;
	padding-block: 0.4rem;
	padding-inline: 0.85rem;
	border: 1px solid var(--bosla-color-border, #d8dee9);
	border-radius: 999px;
	background: var(--bosla-color-surface, #fff);
	color: var(--bosla-color-text, #17202a);
	font: inherit;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
}

.bosla-follow[data-js]:hover {
	border-color: var(--bosla-color-primary, #b4232a);
	color: var(--bosla-color-primary, #b4232a);
}

.bosla-follow[data-js]:focus-visible {
	outline: 2px solid var(--bosla-color-primary, #b4232a);
	outline-offset: 2px;
}

.bosla-follow[data-following="true"] {
	border-color: var(--bosla-color-primary, #b4232a);
	background: var(--bosla-color-primary, #b4232a);
	color: #fff;
}

.bosla-follow__plus {
	font-size: 1rem;
	font-weight: 700;
	line-height: 1;
}

/* -------------------------------------------------------------------------- */
/* Header bell + dropdown                                                      */
/* -------------------------------------------------------------------------- */

.bosla-bell {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	border: 1px solid var(--bosla-color-border, #d8dee9);
	border-radius: 50%;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.bosla-bell:focus-visible {
	outline: 2px solid var(--bosla-color-primary, #b4232a);
	outline-offset: 2px;
}

.bosla-bell__icon {
	width: 1.25rem;
	height: 1.25rem;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
}

.bosla-bell__count {
	position: absolute;
	inset-block-start: -0.15rem;
	inset-inline-end: -0.15rem;
	min-width: 1.15rem;
	padding-inline: 0.25rem;
	border-radius: 999px;
	background: var(--bosla-color-primary, #b4232a);
	color: #fff;
	font-size: 0.6875rem;
	font-weight: 700;
	line-height: 1.15rem;
	text-align: center;
}

.bosla-bell__panel {
	position: absolute;
	inset-block-start: calc(100% + 0.5rem);
	inset-inline-end: 0;
	z-index: 60;
	width: min(20rem, calc(100vw - 2rem));
	max-height: 22rem;
	overflow-y: auto;
	padding-block: 0.35rem;
	border: 1px solid var(--bosla-color-border, #d8dee9);
	border-radius: 0.5rem;
	background: var(--bosla-color-surface, #fff);
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
}

.bosla-bell__item {
	display: block;
	padding-block: 0.5rem;
	padding-inline: 0.85rem;
	color: inherit;
	text-decoration: none;
}

.bosla-bell__item:hover {
	background: rgba(0, 0, 0, 0.04);
}

.bosla-bell__item-title {
	display: block;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.35;
}

.bosla-bell__item-meta {
	display: block;
	margin-block-start: 0.15rem;
	font-size: 0.75rem;
	opacity: 0.72;
}

.bosla-bell__empty {
	padding-block: 0.75rem;
	padding-inline: 0.85rem;
	font-size: 0.875rem;
	opacity: 0.75;
}

/* -------------------------------------------------------------------------- */
/* "For you" row                                                               */
/* -------------------------------------------------------------------------- */

.bosla-for-you {
	margin-block-end: 1.75rem;
}

.bosla-for-you__title {
	margin-block-end: 0.65rem;
	font-size: 1.125rem;
	font-weight: 700;
}

.bosla-for-you__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.85rem;
}

@media (max-width: 640px) {

	.bosla-for-you__grid {
		grid-template-columns: 1fr;
	}
}
