/**
 * Ընթերցարան — header icon, single-post save control, list page.
 */

/* —— Header icon (next to search) —— */
.granish-rr-header {
	position: relative;
	appearance: none;
	border: 0;
	background: transparent;
	padding: 0;
	margin: 0;
	width: 32px;
	height: 32px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: rgba(255, 255, 255, 0.85);
	text-decoration: none !important;
	line-height: 1;
}

.granish-rr-header:hover,
.granish-rr-header:focus {
	color: #fff;
	outline: none;
}

.granish-rr-header.has-items {
	color: #ffcc0d;
}

.granish-rr-header.has-items:hover,
.granish-rr-header.has-items:focus {
	color: #ffd84a;
}

.granish-rr-header .granish-rr-icon {
	display: block;
	width: 20px;
	height: 20px;
}

.granish-rr-badge {
	position: absolute;
	top: -2px;
	right: -4px;
	min-width: 16px;
	height: 16px;
	padding: 0 4px;
	border-radius: 999px;
	background: #ffcc0d;
	color: #111;
	font-family: "Noto Sans Armenian", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 10px;
	font-weight: 700;
	line-height: 16px;
	text-align: center;
	box-sizing: border-box;
}

@media (max-width: 700px) {
	.granish-rr-header {
		width: 28px;
		height: 28px;
	}

	.granish-rr-header .granish-rr-icon {
		width: 18px;
		height: 18px;
	}
}

/* —— Single post: sticky bookmark in left gutter (zero layout impact) —— */
.granish-single .granish-single-content {
	position: relative;
}

.granish-rr-sticky-wrap {
	position: sticky;
	top: 6.5rem;
	width: 0;
	height: 0;
	margin: 0 !important;
	padding: 0 !important;
	border: 0;
	overflow: visible;
	z-index: 6;
	pointer-events: none;
	line-height: 0;
	font-size: 0;
}

.granish-rr-save {
	position: absolute;
	left: -88px;
	/* Sit below the first content line (subtitle), not on it. */
	top: 2.35em;
	z-index: 2;
	appearance: none;
	border: 1px solid #d8d8d8;
	background: #fff;
	width: 40px;
	height: 40px;
	padding: 0;
	border-radius: 10px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: #222;
	box-shadow: none;
	pointer-events: auto;
	transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.granish-rr-save:hover,
.granish-rr-save:focus {
	border-color: #111;
	color: #111;
	outline: none;
}

.granish-rr-save.is-saved {
	border-color: #ffcc0d;
	color: #ffcc0d;
	background: #fffdf2;
}

.granish-rr-save .granish-rr-icon {
	width: 20px;
	height: 20px;
}

.granish-rr-save.is-saved .granish-rr-bookmark-shape {
	fill: #ffcc0d;
	stroke: #ffcc0d;
}

/* Toast */
.granish-rr-toast {
	position: fixed;
	left: 50%;
	bottom: 28px;
	transform: translateX(-50%) translateY(12px);
	z-index: 100060;
	max-width: min(420px, calc(100% - 32px));
	padding: 12px 18px;
	border-radius: 8px;
	background: #1a1a1a;
	color: #fff;
	font-family: "Noto Sans Armenian", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.35;
	text-align: center;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease;
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
}

.granish-rr-toast.is-visible {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

@media (max-width: 900px) {
	.granish-rr-save {
		left: -12px;
	}
}

/* —— Reading room page —— */
.granish-rr-page {
	--rr-font: "Noto Sans Armenian", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	padding: 0 0 60px;
	background: #fff;
}

.granish-rr-inner {
	width: min(720px, calc(100% - 40px)) !important;
	max-width: 720px !important;
	margin-left: auto !important;
	margin-right: auto !important;
	padding: 40px 20px 0;
	box-sizing: border-box;
}

.granish-rr-header-block {
	margin: 0 0 36px;
	text-align: center;
}

.granish-rr-page-title {
	font-family: "Bainsley", Georgia, "Times New Roman", serif !important;
	font-size: clamp(2rem, 4vw, 2.75rem);
	font-weight: 700;
	line-height: 1.15;
	margin: 0 0 10px;
	color: #111;
}

.granish-rr-tagline {
	font-family: var(--rr-font);
	font-size: 14px;
	color: #777;
	margin: 0;
}

.granish-rr-empty {
	font-family: var(--rr-font);
	font-size: 1.05rem;
	line-height: 1.55;
	color: #555;
	text-align: center;
	margin: 48px 0;
}

.granish-rr-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.granish-rr-item {
	display: flex;
	align-items: flex-start;
	gap: 28px;
	padding: 28px 0;
	border-bottom: 1px solid #e5e5e5;
}

.granish-rr-item:last-child {
	border-bottom: 0;
}

.granish-rr-text {
	flex: 1 1 auto;
	min-width: 0;
}

.granish-rr-genre {
	color: #9b3346;
	font-family: var(--rr-font);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.12em;
	line-height: 1;
	text-transform: uppercase;
	margin: 0 0 8px;
}

.granish-rr-item-title {
	font-family: "Bainsley", Georgia, "Times New Roman", serif !important;
	font-size: 1.45rem;
	font-weight: 700;
	line-height: 1.25;
	margin: 0 0 10px;
}

.granish-rr-item-title a {
	color: #111;
	text-decoration: none;
}

.granish-rr-item-title a:hover {
	text-decoration: underline;
}

.granish-rr-authors {
	font-family: "Bainsley", Georgia, "Times New Roman", serif !important;
	font-size: 16px;
	line-height: 1.35;
	color: #555;
	margin: 0 0 8px;
}

.granish-rr-authors a {
	color: inherit;
	text-decoration: none;
	font-weight: 700;
}

.granish-rr-date {
	font-family: var(--rr-font);
	font-size: 13px;
	color: #888;
	margin: 0 0 12px;
}

.granish-rr-remove {
	appearance: none;
	border: 0;
	background: transparent;
	padding: 0;
	margin: 0;
	font-family: var(--rr-font);
	font-size: 13px;
	color: #9b3346;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.granish-rr-remove:hover {
	color: #111;
}

.granish-rr-thumb {
	flex: 0 0 180px;
	width: 180px;
	line-height: 0;
	overflow: hidden;
}

.granish-rr-thumb img {
	display: block;
	width: 100%;
	height: 120px;
	object-fit: cover;
}

.granish-rr-loading {
	font-family: var(--rr-font);
	color: #888;
	padding: 24px 0;
	list-style: none;
}

@media (max-width: 600px) {
	.granish-rr-item {
		flex-direction: column-reverse;
		gap: 16px;
	}

	.granish-rr-thumb {
		flex-basis: auto;
		width: 100%;
	}

	.granish-rr-thumb img {
		height: 180px;
	}
}
