/* מערכת תגובות – עיצוב. הועבר מסניפט Code Snippets #6 ("עיצוב מערכת תגובות"). */

/* ===== מערכת תגובות מתכונים - לפי Frame 1208 ===== */

.custom-comments-rtl-wrapper {
	direction: rtl;
	text-align: right;
	max-width: 1028px;
	margin-inline: auto;
}

.custom-comments-rtl-wrapper #comments {
	display: flex;
	flex-direction: column;
	gap: clamp(36px, 7vw, 88px);
}

/* הסתרות */
.custom-comments-rtl-wrapper .title-comments,
.custom-comments-rtl-wrapper #reply-title,
.custom-comments-rtl-wrapper .comment-notes,
.custom-comments-rtl-wrapper .logged-in-as,
.custom-comments-rtl-wrapper .comment-reply-link,
.custom-comments-rtl-wrapper .comment-form-url {
	display: none !important;
}

/* ---------- כרטיס הטופס ---------- */
.custom-comments-rtl-wrapper #respond {
	order: -1;
	position: relative;
	background: #fff;
	border: 1px solid #efefef;
	border-radius: 32px;
	padding: 22px 18px 20px;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
	transition: box-shadow 0.2s ease;
}

.custom-comments-rtl-wrapper #respond textarea#comment:focus {
	border-color: #fada4a;
	box-shadow: 0 0 0 2px rgba(250, 218, 74, 0.45);
}

.custom-comments-rtl-wrapper #commentform {
	margin: 0;
}

.custom-comments-rtl-wrapper #respond textarea#comment {
	display: block;
	width: 100%;
	min-height: 108px;
	margin: 0;
	padding: 14px 20px;
	background: #fff;
	border: 1px solid #dcdcdc;
	border-radius: 18px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	box-shadow: none;
	outline: none;
	resize: none;
	box-sizing: border-box;
	font: inherit;
	font-size: clamp(17px, 1.2vw + 12px, 20px);
	line-height: 1.6;
	color: #333;
	text-align: right;
}

.custom-comments-rtl-wrapper #respond textarea#comment::placeholder {
	color: #444;
	opacity: 1;
}

/* שדות שם/אימייל - מוצגים רק לגולש שאינו מחובר */
.custom-comments-rtl-wrapper .comment-form-author,
.custom-comments-rtl-wrapper .comment-form-email {
	margin: 0 30px 10px;
	max-width: 420px;
}

.custom-comments-rtl-wrapper #respond input[type="text"],
.custom-comments-rtl-wrapper #respond input[type="email"] {
	width: 100%;
	padding: 10px 0;
	background: transparent;
	border: 0;
	border-bottom: 1px solid #e3e3e3;
	border-radius: 0;
	outline: none;
	box-sizing: border-box;
	font: inherit;
	font-size: 17px;
	color: #333;
	text-align: right;
}

.custom-comments-rtl-wrapper #respond input[type="text"]:focus,
.custom-comments-rtl-wrapper #respond input[type="email"]:focus {
	border-bottom-color: #fada4a;
}

.custom-comments-rtl-wrapper .comment-form-cookies-consent {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 12px 30px 0;
	font-size: 14px;
	color: #666;
}

.custom-comments-rtl-wrapper .comment-form-cookies-consent input {
	width: auto;
	margin: 0;
	flex: 0 0 auto;
}

.custom-comments-rtl-wrapper .comment-form-cookies-consent label {
	margin: 0;
	font-weight: 400;
}

/* שורת הכפתורים: שליחה בצד שמאל, אייקון ההעלאה מימינו */
.custom-comments-rtl-wrapper .recipe-custom-buttons-row {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: flex-end;
	gap: clamp(20px, 6vw, 64px);
	margin-top: 8px;
}

.custom-comments-rtl-wrapper .upload-wrapper {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

/* שדה הקובץ מוסתר ויזואלית אבל נשאר נגיש למקלדת */
.custom-comments-rtl-wrapper .recipe-photo-input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

.custom-comments-rtl-wrapper .upload-icon-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	margin: 0;
	border-radius: 50%;
	background: transparent;
	color: #333;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.custom-comments-rtl-wrapper .upload-icon-btn:hover {
	background: #f3f3f3;
}

.custom-comments-rtl-wrapper .recipe-photo-input:focus-visible + .upload-icon-btn {
	outline: 2px solid #333;
	outline-offset: 2px;
}

.custom-comments-rtl-wrapper .upload-icon-btn.has-file {
	color: #2e7d32;
	background: #e8f5e9;
}

.custom-comments-rtl-wrapper .recipe-photo-name {
	max-width: 220px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 14px;
	color: #666;
}

.custom-comments-rtl-wrapper .recipe-photo-name.is-error {
	white-space: normal;
	color: #c62828;
}

.custom-comments-rtl-wrapper #respond #submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 192px;
	height: 52px;
	padding: 0 30px;
	background: #fada4a;
	color: #1a1a1a;
	border: 0;
	border-radius: 999px;
	font: inherit;
	font-size: 20px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.15s ease, opacity 0.15s ease;
}

.custom-comments-rtl-wrapper #respond #submit:hover,
.custom-comments-rtl-wrapper #respond #submit:focus-visible {
	background: #f3cc2b;
	color: #1a1a1a;
}

.custom-comments-rtl-wrapper #respond #submit:focus-visible {
	outline: 2px solid #333;
	outline-offset: 2px;
}

.custom-comments-rtl-wrapper #respond #submit:disabled {
	opacity: 0.6;
	cursor: default;
}

/* ---------- רשימת התגובות ---------- */
.custom-comments-rtl-wrapper #comments .comment-list {
	display: flex;
	flex-direction: column;
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: inherit;
}

.custom-comments-rtl-wrapper .recipe-comment-card {
	background: #f3f3f3;
	border-radius: 28px;
	padding: clamp(24px, 5.5vw, 64px) clamp(20px, 5.5vw, 68px);
}

.custom-comments-rtl-wrapper .recipe-comment-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px clamp(20px, 4vw, 48px);
	margin-bottom: 22px;
	color: #5a3a31;
}

.custom-comments-rtl-wrapper .user-name {
	font-size: clamp(21px, 1.2vw + 16px, 28px);
	font-weight: 400;
	line-height: 1.2;
	overflow-wrap: anywhere;
}

.custom-comments-rtl-wrapper .comment-date {
	font-size: clamp(16px, 0.6vw + 13px, 20px);
}

.custom-comments-rtl-wrapper .recipe-like-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin: 0;
	padding: 4px;
	background: none;
	border: 0;
	border-radius: 8px;
	color: inherit;
	font: inherit;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}

.custom-comments-rtl-wrapper .recipe-like-btn:hover,
.custom-comments-rtl-wrapper .recipe-like-btn:focus {
	background: none;
	color: inherit;
}

.custom-comments-rtl-wrapper .recipe-like-btn:focus-visible {
	outline: 2px solid #5a3a31;
	outline-offset: 2px;
}

.custom-comments-rtl-wrapper .recipe-like-btn.is-liked svg {
	fill: #d9534f;
	stroke: #d9534f;
}

.custom-comments-rtl-wrapper .comment-attached-image {
	width: 160px;
	height: 160px;
	margin-bottom: 22px;
}

.custom-comments-rtl-wrapper .comment-attached-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 18px;
}

.custom-comments-rtl-wrapper .comment-text-content {
	font-size: clamp(17px, 1.2vw + 12px, 22px);
	line-height: 1.75;
	color: #333;
	overflow-wrap: anywhere;
}

.custom-comments-rtl-wrapper .comment-text-content p {
	margin: 0 0 0.6em;
}

.custom-comments-rtl-wrapper .comment-text-content p:last-child {
	margin-bottom: 0;
}

.custom-comments-rtl-wrapper .recipe-comment-pending {
	display: inline-block;
	margin: 0 0 18px;
	padding: 8px 14px;
	background: #fff6d6;
	border-radius: 10px;
	font-size: 14px;
	color: #5a3a31;
}

@media (max-width: 600px) {
	.custom-comments-rtl-wrapper #respond {
		border-radius: 24px;
		padding: 16px 14px;
	}
	.custom-comments-rtl-wrapper #respond textarea#comment {
		padding-inline: 14px;
	}
	.custom-comments-rtl-wrapper .comment-form-author,
	.custom-comments-rtl-wrapper .comment-form-email,
	.custom-comments-rtl-wrapper .comment-form-cookies-consent {
		margin-inline: 14px;
	}
	.custom-comments-rtl-wrapper #respond #submit {
		min-width: 0;
		height: 48px;
		font-size: 18px;
	}
	.custom-comments-rtl-wrapper .recipe-photo-name {
		max-width: 110px;
	}
	.custom-comments-rtl-wrapper .recipe-comment-card {
		border-radius: 22px;
	}
	.custom-comments-rtl-wrapper .comment-attached-image {
		width: 130px;
		height: 130px;
	}
}
