/**
 * Quote → Story poster (selection chip + modal).
 */

.granish-qc-chip {
	position: absolute;
	z-index: 100200;
	transform: translate(-50%, calc(-100% - 12px));
	appearance: none;
	border: 0;
	margin: 0;
	padding: 10px 16px;
	border-radius: 999px;
	background: #111;
	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.2;
	letter-spacing: 0.01em;
	cursor: pointer;
	box-shadow: 0 6px 22px rgba(0, 0, 0, 0.28);
	white-space: nowrap;
}

.granish-qc-chip--above {
	transform: translate(-50%, calc(-100% - 12px)) !important;
}

.granish-qc-chip:hover,
.granish-qc-chip:focus-visible {
	background: #000;
	outline: none;
}

.granish-qc-chip[hidden] {
	display: none !important;
}

/* Mobile: bottom sticky action bar (avoids Safari selection toolbar). */
.granish-qc-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 100250;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 8px;
	padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
	box-sizing: border-box;
	background: rgba(18, 18, 18, 0.96);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.22);
	transform: translateY(110%);
	visibility: hidden;
	pointer-events: none;
	transition: transform 0.28s ease, visibility 0.28s;
}

.granish-qc-bar.is-open {
	transform: translateY(0);
	visibility: visible;
	pointer-events: auto;
}

.granish-qc-bar[hidden] {
	display: none !important;
}

.granish-qc-bar-preview {
	margin: 0;
	padding: 0 4px;
	font-family: "Noto Sans Armenian", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.35;
	color: rgba(255, 255, 255, 0.72);
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.granish-qc-bar-preview[hidden] {
	display: none !important;
}

.granish-qc-bar-btn {
	appearance: none;
	border: 0;
	margin: 0;
	width: 100%;
	max-width: none;
	padding: 14px 18px;
	border-radius: 12px;
	background: #e2c15a;
	color: #111;
	font-family: "Noto Sans Armenian", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	text-align: center;
}

.granish-qc-bar-btn:active {
	background: #edd27a;
}

/* Keep floating book cover above the quote bar on phones. */
@media (max-width: 1099px) {
	body.granish-qc-bar-open .granish-single-sticky-cover {
		bottom: calc(110px + env(safe-area-inset-bottom, 0px));
	}
}

@media (min-width: 901px) {
	.granish-qc-bar {
		display: none !important;
	}
}

@media (max-width: 900px) {
	.granish-qc-chip {
		display: none !important;
	}
}

.granish-qc-modal {
	position: fixed;
	inset: 0;
	z-index: 100300;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px 16px;
	box-sizing: border-box;
}

.granish-qc-modal.is-open {
	display: flex;
}

.granish-qc-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 10, 10, 0.72);
}

.granish-qc-panel {
	position: relative;
	z-index: 1;
	width: min(420px, 100%);
	max-height: min(92vh, 900px);
	overflow: auto;
	background: #141414;
	color: #f3f1ec;
	border-radius: 12px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
	padding: 18px 18px 16px;
	box-sizing: border-box;
}

.granish-qc-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 14px;
}

.granish-qc-title {
	margin: 0;
	font-family: "Noto Sans Armenian", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.01em;
}

.granish-qc-close {
	appearance: none;
	border: 0;
	background: transparent;
	color: rgba(255, 255, 255, 0.72);
	width: 36px;
	height: 36px;
	margin: -6px -8px -6px 0;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.granish-qc-close:hover,
.granish-qc-close:focus-visible {
	color: #fff;
	outline: none;
}

.granish-qc-preview-wrap {
	display: flex;
	justify-content: center;
	margin: 0 0 14px;
	background: #0a0a0a;
	border-radius: 8px;
	padding: 12px;
}

.granish-qc-preview {
	display: block;
	width: min(260px, 64vw);
	height: auto;
	aspect-ratio: 9 / 16;
	border-radius: 4px;
	background: #111;
}

.granish-qc-themes {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 14px;
}

.granish-qc-theme {
	appearance: none;
	border: 1px solid rgba(255, 255, 255, 0.18);
	background: transparent;
	color: rgba(255, 255, 255, 0.88);
	border-radius: 999px;
	padding: 7px 12px;
	font-family: "Noto Sans Armenian", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 12px;
	cursor: pointer;
}

.granish-qc-theme.is-active,
.granish-qc-theme:hover,
.granish-qc-theme:focus-visible {
	border-color: #e2c15a;
	color: #fff;
	outline: none;
}

.granish-qc-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.granish-qc-btn {
	flex: 1 1 auto;
	appearance: none;
	border: 0;
	border-radius: 8px;
	padding: 12px 14px;
	font-family: "Noto Sans Armenian", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	text-align: center;
}

.granish-qc-btn--primary {
	background: #e2c15a;
	color: #111;
}

.granish-qc-btn--primary:hover,
.granish-qc-btn--primary:focus-visible {
	background: #edd27a;
	outline: none;
}

.granish-qc-btn--ghost {
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
}

.granish-qc-btn--ghost:hover,
.granish-qc-btn--ghost:focus-visible {
	background: rgba(255, 255, 255, 0.14);
	outline: none;
}

.granish-qc-hint {
	margin: 10px 0 0;
	font-family: "Noto Sans Armenian", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 12px;
	line-height: 1.35;
	color: rgba(255, 255, 255, 0.55);
}

body.granish-qc-lock {
	overflow: hidden;
}

@media (max-width: 520px) {
	.granish-qc-panel {
		width: 100%;
		max-height: 94vh;
		padding: 14px;
	}

	.granish-qc-preview {
		width: min(220px, 58vw);
	}
}
