/* גריד טיפים + מודאל צפייה — Homer Patuach Tips */

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.hpt-tips-grid-root {
	direction: rtl;
	text-align: right;
	font-family: var(--hpt-font, 'Rubik', sans-serif);
	max-width: 1100px;
	margin: 0 auto 2.5rem;
	padding: 0 12px;
}

.hpt-tg-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 1.25rem;
}

.hpt-tg-title {
	margin: 0;
	font-size: 1.75rem;
	font-weight: 700;
	color: #2c3338;
}

.hpt-tg-actions {
	display: flex;
	gap: 10px;
	align-items: center;
}

.hpt-tg-add-tip {
	border: none;
	border-radius: 25px;
	padding: 10px 20px;
	font-weight: 600;
	cursor: pointer;
	color: #fff;
	background: linear-gradient(135deg, #FB8255, #FB6965);
	box-shadow: 0 4px 14px rgba(255, 107, 129, 0.35);
}

.hpt-tg-add-tip:hover {
	filter: brightness(1.05);
}

.hpt-tg-filter-bar {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 12px;
	margin-bottom: 1.25rem;
	padding: 12px 14px;
	background: #f6f7f9;
	border-radius: 12px;
	border: 1px solid #e9ebee;
}

.hpt-tg-filter-groups {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.hpt-tg-filter-group {
	background: #fff;
	border-radius: 10px;
	padding: 10px 12px;
	border: 1px solid #e4e7ec;
}

.hpt-tg-filter-group-title {
	margin: 0 0 8px;
	font-size: 0.92rem;
	font-weight: 700;
	color: #444;
}

.hpt-tg-chip-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.hpt-tg-chip--depth-1 {
	margin-inline-start: 0.65rem;
}

.hpt-tg-chip--depth-2 {
	margin-inline-start: 1.25rem;
}

.hpt-tg-chip--depth-3 {
	margin-inline-start: 1.85rem;
}

.hpt-tg-chip--depth-4 {
	margin-inline-start: 2.45rem;
}

.hpt-tg-filter-actions {
	display: flex;
	justify-content: flex-end;
	padding-top: 2px;
}

.hpt-tg-filter-label {
	font-weight: 600;
	color: #555;
	margin-left: 6px;
}

.hpt-tg-chip {
	border: 1px solid #d0d4db;
	background: #fff;
	border-radius: 20px;
	padding: 6px 14px;
	font-size: 0.9rem;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s;
}

.hpt-tg-chip:hover {
	border-color: #7699f2;
}

.hpt-tg-chip.active {
	background: linear-gradient(135deg, #7699f2, #6280d1);
	color: #fff;
	border-color: transparent;
}

.hpt-tg-filter-clear {
	border: none;
	background: transparent;
	color: #c44;
	text-decoration: underline;
	cursor: pointer;
	font-size: 0.9rem;
}

.hpt-tg-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 18px;
	margin-bottom: 1.5rem;
}

.hpt-tg-card {
	display: flex;
	gap: 14px;
	padding: 16px;
	background: #fff;
	border: 1px solid #e9ebee;
	border-radius: 14px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
	cursor: pointer;
	transition: transform 0.2s, box-shadow 0.2s;
	text-align: right;
}

.hpt-tg-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.hpt-tg-card-symbol {
	flex-shrink: 0;
	width: 56px;
	height: 56px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	background: linear-gradient(145deg, #fff6f0, #ffe8e0);
}

.hpt-tg-card-emoji {
	font-size: 2rem;
	line-height: 1;
}

.hpt-tg-card-fallback {
	opacity: 0.9;
}

.hpt-tg-card-img {
	width: 52px;
	height: 52px;
	object-fit: cover;
	border-radius: 10px;
}

.hpt-tg-card-title {
	margin: 0 0 8px;
	font-size: 1.05rem;
	font-weight: 700;
	color: #1e1e1e;
	line-height: 1.35;
}

.hpt-tg-card-excerpt {
	margin: 0;
	font-size: 0.9rem;
	color: #555;
	line-height: 1.45;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.hpt-tg-card-foot {
	margin-top: 10px;
	font-size: 0.8rem;
	color: #7699f2;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.hpt-tg-card-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
}

.hpt-tg-tag-pill {
	display: inline-block;
	padding: 3px 11px;
	font-size: 0.78rem;
	font-weight: 600;
	color: #4a5a7a;
	background: #eef2fa;
	border-radius: 999px;
	line-height: 1.3;
}

.hpt-tg-footer {
	text-align: center;
	margin-bottom: 2rem;
}

.hpt-tg-load-more {
	border: 2px solid #7699f2;
	color: #6280d1;
	background: #fff;
	border-radius: 25px;
	padding: 10px 28px;
	font-weight: 600;
	cursor: pointer;
}

.hpt-tg-load-more:hover {
	background: #f0f4ff;
}

.hpt-tg-status {
	text-align: center;
	font-size: 0.9rem;
	color: #666;
	margin-bottom: 10px;
}

.hpt-tg-cloud-section {
	margin-top: 2.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid #e9ebee;
}

.hpt-tg-cloud-heading {
	text-align: center;
	font-size: 1.25rem;
	font-weight: 700;
	margin: 0 0 1rem;
	color: #333;
}

.hpt-tg-tag-cloud {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
	align-items: center;
	justify-content: center;
	padding: 16px 8px;
	line-height: 1.15;
}

.hpt-tg-cloud-item {
	display: inline-block;
	padding: 4px 2px;
	border: none;
	background: none;
	cursor: pointer;
	font-weight: 600;
	font-family: inherit;
	transition: transform 0.25s ease;
}

.hpt-tg-cloud-item:hover {
	transform: scale(1.08);
}

.hpt-tg-cloud-empty {
	text-align: center;
	color: #888;
	margin: 0;
}

/* מודאל צפייה — מבנה כמו בועה */
#hpt-tg-view-modal.hpt-bubble-overlay {
	z-index: 99991;
}

#hpt-tg-view-modal .hpt-bubble-panel {
	max-height: 88vh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

#hpt-tg-view-modal .hpt-bubble-panel-inner {
	overflow-y: auto;
	padding: 1rem 1.25rem 1.25rem;
}

#hpt-tg-view-modal .hpt-tip-inner {
	max-width: 100%;
}

#hpt-tg-view-modal .hpt-tip-body {
	max-height: min(50vh, 360px);
	overflow-y: auto;
}

.hpt-tip-media-fallback {
	font-size: 2.5rem;
	line-height: 1;
	display: inline-block;
}

#hpt-tg-view-modal .hpt-tip-media img {
	max-width: 100%;
	border-radius: 8px;
}

@media (max-width: 600px) {
	.hpt-tg-cards {
		grid-template-columns: 1fr;
	}
}

/* עמוד גריד טיפים: באנר/תמונה עליונה — גבול נמוך + עדיפות על ערכות נושא */
body.hpt-tips-grid-page .wp-block-post-featured-image,
body.hpt-tips-grid-page .wp-block-cover,
body.hpt-tips-grid-page .wp-block-cover.alignfull,
body.hpt-tips-grid-page .entry-header .post-thumbnail,
body.hpt-tips-grid-page .featured-image,
body.hpt-tips-grid-page .page-header-image,
body.hpt-tips-grid-page .wp-block-group.alignfull > .wp-block-cover:first-child,
body.hpt-tips-grid-page .entry-content > .wp-block-cover:first-child {
	max-height: min(28vh, 260px) !important;
	overflow: hidden;
}

body.hpt-tips-grid-page .wp-block-post-featured-image img,
body.hpt-tips-grid-page .entry-header .post-thumbnail img,
body.hpt-tips-grid-page .featured-image img,
body.hpt-tips-grid-page .page-header-image img {
	width: 100%;
	max-height: min(28vh, 260px) !important;
	object-fit: cover;
	display: block;
}

body.hpt-tips-grid-page .wp-block-cover.alignfull,
body.hpt-tips-grid-page .wp-block-cover {
	min-height: 0 !important;
	max-height: min(28vh, 260px) !important;
}

body.hpt-tips-grid-page .wp-block-cover .wp-block-cover__image-background,
body.hpt-tips-grid-page .wp-block-cover__background {
	background-size: cover;
	background-position: center center;
	background-attachment: scroll !important;
}

body.hpt-tips-grid-page .wp-block-cover .wp-block-cover__background {
	will-change: transform;
}
