/* Member photos (includes/gallery.php): "תמונות מהקהילה" under the plant, the member page, the upload window */

/* a small camera mark on member photos inside the plant's own gallery */
.sc-photo { position: relative; }
.sc-photo-member {
	position: absolute; bottom: 8px; inset-inline-start: 8px; display: grid; place-items: center; width: 26px; height: 26px;
	border-radius: 50%; background: rgba(255, 255, 255, .88); color: var(--sc-c-ink, #2c3b33); pointer-events: none;
}
.sc-photo-member .sc-ico { width: 15px; height: 15px; }

/* the section */
.sc-community { max-width: var(--sc-max, 1200px); margin: 3.5rem auto 0; padding-top: 2rem; border-top: 1px solid color-mix(in srgb, currentColor 10%, transparent); }
.sc-community-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 1.2rem; }
.sc-community-head h2 { margin: 0; font-size: clamp(1.4em, 2.4vw, 1.8em); }
.sc-community-count { font-weight: 400; opacity: .6; font-size: .8em; }
/* .sc-community-add "הוספת תמונה": look from assets/buttons.css (.sc-btn) */
.sc-community-empty { margin: .5rem 0 0; opacity: .75; }
.sc-community-more { margin: 1.2rem 0 0; }
.sc-community-more a { color: inherit; }

/* photo grid: 4 / 3 / 2 across, square crops, rounded like the catalog photos */
.sc-gallery.sc-community-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; } /* = the home page's "הצמחים שלכם" row (2026-09-29) */
@media (max-width: 900px) { .sc-gallery.sc-community-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .sc-gallery.sc-community-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.sc-cphoto { position: relative; margin: 0; transition: opacity .3s ease, transform .3s ease; }
.sc-cphoto .sc-zoom { display: block; overflow: hidden; border-radius: var(--sc-r-photo, 16px); background: #eef0ec; cursor: zoom-in; }
.sc-cphoto img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.sc-cphoto:hover img { transform: scale(1.04); }
/* one or two photos: large, in their own shape (portrait stays portrait), not a tiny square in a 4-column grid */

.sc-cphoto figcaption { margin: 7px 2px 0; font-size: .82rem; line-height: 1.4; }
.sc-cphoto figcaption a { color: inherit; }
.sc-cphoto-text { display: block; margin-bottom: 2px; font-size: .95rem; unicode-bidi: plaintext; }
.sc-cphoto-wait { font-size: .78rem; color: #8a6d12; }
.sc-cphoto-credit { opacity: .75; }
.sc-cphoto-credit .sc-cphoto-plant { font-weight: 600; text-decoration: none; }
.sc-cphoto-credit .sc-cphoto-plant:hover { text-decoration: underline; }
.sc-cphoto-tools .sc-cphoto-edit { padding: 0; width: 32px; }
/* editing a caption on the card */
.sc-cphoto-editbox { display: flex; gap: 6px; margin: 8px 0 2px; }
.sc-cphoto-editbox textarea { flex: 1; min-width: 0; min-height: 0; resize: none; overflow: hidden; line-height: 1.5; padding: 7px 10px; border: 1px solid color-mix(in srgb, currentColor 25%, transparent); border-radius: 10px; font: inherit; font-size: 16px; background: #fff; color: inherit; }
.sc-cphoto-editbox button { flex: none; } /* look: assets/buttons.css (.sc-btn--small) */
.sc-lb-stage .sc-cphoto-text { font-size: 1.2em; margin-bottom: 4px; }
.sc-cphoto.is-pending .sc-zoom { outline: 2px dashed color-mix(in srgb, #c9a227 70%, transparent); outline-offset: 3px; }
.sc-cphoto.is-pending img { opacity: .75; }
.sc-cphoto-badge {
	position: absolute; top: 10px; inset-inline-start: 10px; padding: 4px 10px; border-radius: 999px;
	background: #fff6d8; color: #6d5a12; font-size: .78rem; font-weight: 600; pointer-events: none;
}
.sc-cphoto-tools { position: absolute; top: 8px; inset-inline-end: 8px; display: flex; gap: 6px; }
/* the site owner's approve / reject: a bar along the BOTTOM of the photo (user, 2026-09-30), always visible, clear of the
   top tools (⭐, pencil, rotate, bin) and the "ממתינה לאישור" badge. Buttons: assets/buttons.css (.sc-btn--small) */
.sc-cphoto-review { position: absolute; inset-inline: 8px; bottom: 8px; z-index: 2; display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; padding: 8px 6px; border-radius: 14px; background: rgba(255, 255, 255, .88); box-shadow: 0 2px 10px rgba(0, 0, 0, .14); }
body.dark-mode .sc-cphoto-review { background: rgba(38, 38, 36, .88); }
.sc-cphoto-media { position: relative; } /* the frame for the photo and the things on it (gallery.php) */
.sc-cphoto-tools button {
	display: inline-grid; place-items: center; min-width: 32px; height: 32px; padding: 0 10px; border: 0; border-radius: 999px; cursor: pointer;
	background: rgba(255, 255, 255, .92); color: var(--sc-c-ink, #2c3b33); font: inherit; font-size: .82rem; font-weight: 600;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .14); opacity: 0; transition: opacity .2s ease;
}
.sc-cphoto-tools .sc-cphoto-del, .sc-cphoto-tools .sc-cphoto-rot, .sc-cphoto-tools .sc-cphoto-feat { padding: 0; width: 32px; }
.sc-cphoto-tools .sc-cphoto-feat.is-on { color: #c8921a; opacity: 1; } /* ⭐ featured on the home page: always visible */
.sc-cphoto-tools .sc-cphoto-feat.is-on svg { fill: currentColor; }
.sc-cphoto-tools.is-open button { opacity: 1; } /* "התמונות שלי": rotate / delete always visible, not only on hover */
.sc-cphoto.is-busy img { opacity: .45; transition: opacity .2s ease; }
.sc-cphoto.is-busy .sc-zoom { cursor: progress; }
.sc-cphoto-tools .sc-cphoto-del:hover { color: #a2504a; }
.sc-cphoto-tools .sc-cphoto-approve { background: var(--sc-c-btn, #3d7a66); color: var(--sc-c-btntext, #fff); opacity: 1; }
.sc-cphoto:hover .sc-cphoto-tools button, .sc-cphoto:has(:focus-visible) .sc-cphoto-tools button { opacity: 1; } /* keyboard focus only (a mouse click's focus lingered) */
@media (hover: none) { .sc-cphoto-tools button { opacity: 1; } }
.sc-cphoto.sc-fav-out { opacity: 0; transform: scale(.96); }

/* member page */
.sc-member-note { margin: 0 0 1.5rem; opacity: .8; }

/* the upload window (same card as the login window) */
.sc-upload { width: min(760px, calc(100vw - 32px)); text-align: start; } /* wider: a photo + two fields per row (2026-09-29) */
.sc-upload h2, .sc-upload .sc-login-why { text-align: center; }
.sc-upload-drop {
	display: grid; justify-items: center; gap: 4px; padding: 22px 16px; margin: 0 0 12px; cursor: pointer;
	border: 2px dashed color-mix(in srgb, var(--sc-c-btn, #3d7a66) 40%, transparent); border-radius: 18px;
	background: color-mix(in srgb, var(--sc-c-btn, #3d7a66) 6%, #fff); transition: background .2s ease;
}
.sc-upload-drop:hover { background: color-mix(in srgb, var(--sc-c-btn, #3d7a66) 11%, #fff); }
.sc-upload-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.sc-upload-drop:focus-within { outline: 2px solid var(--sc-c-btn, #3d7a66); outline-offset: 2px; }
.sc-upload-pick { font-weight: 700; color: var(--sc-c-btn, #3d7a66); }
.sc-upload-hint { font-size: .82rem; opacity: .65; }
/* the long window scrolls inside itself; the upload button stays at the bottom (phones, keyboard open) */
.sc-upload { max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; }
/* a strip in the window's colour around the button, so the text scrolling under it doesn't show through it */
.sc-upload-send { position: sticky; bottom: 0; box-shadow: 0 0 0 12px #fff, 0 12px 0 12px #fff; }
body.dark-mode .sc-upload-send { box-shadow: 0 0 0 12px var(--sc-c-card), 0 12px 0 12px var(--sc-c-card); }
/* one row per photo: thumbnail + "a few words" field (full width, one under the other on phones too) */
.sc-upload-previews { display: grid; gap: 22px; margin: 6px 0 14px; } /* 22px: the rotate button under one photo never meets the ✕ of the next */
.sc-upload-previews:empty { display: none; }
.sc-upload-row { display: flex; align-items: center; gap: 16px; }
.sc-upload-thumb { position: relative; flex: none; width: 84px; margin: 0; }
.sc-upload-fields { flex: 1; min-width: 0; display: grid; gap: 8px; }
.sc-upload-tools { display: flex; flex-wrap: wrap; gap: 18px; padding: 6px 0; } /* the site's small buttons (buttons.css); 18px: room for their ring */
.sc-upload-thumb img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: #eef0ec; }
.sc-upload-cap, .sc-upload-plantname {
	width: 100%; box-sizing: border-box; min-width: 0; min-height: 0; resize: none; overflow: hidden; line-height: 1.5; padding: 9px 12px; border: 1px solid color-mix(in srgb, currentColor 22%, transparent); border-radius: 12px;
	font: inherit; font-size: 16px; /* 16px: iPhone doesn't zoom into the field */ background: #fff; color: inherit;
}
.sc-upload-cap:focus, .sc-upload-plantname:focus { outline: 2px solid var(--sc-c-btn, #3d7a66); outline-offset: 1px; border-color: transparent; }
body.dark-mode .sc-upload-cap, body.dark-mode .sc-upload-plantname, body.dark-mode .sc-cphoto-editbox textarea { background: rgba(255, 255, 255, .06); }
.sc-upload-thumb.bad img { opacity: .3; }
.sc-upload-x {
	position: absolute; top: -6px; inset-inline-end: -6px; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%;
	background: #fff; color: #333; box-shadow: 0 1px 6px rgba(0, 0, 0, .25); font-size: 17px; line-height: 1; cursor: pointer;
}
.sc-upload-thumb { overflow: visible; }
.sc-upload-thumb img { transition: transform .25s ease; }
.sc-upload-rot {
	position: absolute; bottom: -6px; inset-inline-end: -6px; display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%;
	background: #fff; color: #333; box-shadow: 0 1px 6px rgba(0, 0, 0, .25); cursor: pointer;
}
/* "התמונות שלי": caption field under each photo, saves by itself */
.sc-cphoto-inline { display: block; margin-bottom: 4px; }
.sc-cphoto-field {
	width: 100%; box-sizing: border-box; min-height: 0; resize: none; overflow: hidden; line-height: 1.5; display: block; padding: 7px 10px; border: 1px solid color-mix(in srgb, currentColor 18%, transparent); border-radius: 10px;
	font: inherit; font-size: 16px; background: #fff; color: inherit;
}
.sc-cphoto-field:focus { outline: 2px solid var(--sc-c-btn, #3d7a66); outline-offset: 1px; border-color: transparent; }
.sc-cphoto-state { display: block; min-height: 1.3em; margin-top: 2px; font-size: .8rem; font-weight: 600; opacity: .8; }
.sc-cphoto-state.is-ok { color: var(--sc-c-btn, #3d7a66); opacity: 1; }body.dark-mode .sc-cphoto-field { background: rgba(255, 255, 255, .06); }
.sc-upload-license { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px; font-size: .86rem; line-height: 1.55; cursor: pointer; }
.sc-upload-license input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--sc-c-btn, #3d7a66); }
.sc-upload-license a { color: inherit; }
/* .sc-upload-send "העלאה": look (incl. disabled) from assets/buttons.css (.sc-btn) */
.sc-upload.busy .sc-upload-send:not(#sc-btn) { cursor: wait; }


/* "התמונות שלי": the plant field under the caption, with a small leaf; its names open as you type (no link beside it) */
.sc-cphoto-plantbox { position: relative; }
.sc-cphoto-plantbox .sc-cphoto-label { position: absolute; top: 9px; inset-inline-start: 10px; color: var(--sc-c-btn, #3d7a66); pointer-events: none; }
.sc-cphoto-plantbox .sc-ico { width: 16px; height: 16px; }
.sc-cphoto-plantfield {
	width: 100%; box-sizing: border-box; padding: 7px 34px 7px 12px; border: 1px solid color-mix(in srgb, currentColor 18%, transparent); border-radius: 10px;
	font: inherit; font-size: 16px; background: #fff; color: inherit;
}
.sc-cphoto-plantfield:focus { outline: 2px solid var(--sc-c-btn, #3d7a66); outline-offset: 1px; border-color: transparent; }
body.dark-mode .sc-cphoto-plantfield { background: rgba(255, 255, 255, .06); }

/* /gallery/ and "התמונות שלי": the line above the grid (text / plant filter + the upload button) */
.sc-gallery-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin: 0 0 1.4rem; }
.sc-gallery-bar .sc-member-note { flex: 1 1 320px; margin: 0; }
/* the plant filter: a pill that opens a panel like the main menu's dropdown ("מאמרים") */
.sc-dd { position: relative; }
.sc-dd summary {
	display: flex; align-items: center; justify-content: space-between; gap: 14px; min-width: 220px; box-sizing: border-box;
	padding: 9px 16px; border: 1px solid color-mix(in srgb, currentColor 14%, transparent); border-radius: 999px;
	background: #fff; font-size: .98em; cursor: pointer; list-style: none; user-select: none;
	transition: border-color .2s ease;
}
.sc-dd summary::-webkit-details-marker { display: none; }
.sc-dd summary::after {
	content: ""; flex: none; width: 16px; height: 16px; transition: transform .2s ease;
	background: currentColor; opacity: .7;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.sc-dd[open] summary::after { transform: rotate(180deg); }
.sc-dd summary:hover, .sc-dd[open] summary { border-color: color-mix(in srgb, var(--sc-c-primary, #3d7a66) 45%, transparent); }
.sc-dd summary:focus-visible { outline: 2px solid var(--sc-c-btn, #3d7a66); outline-offset: 2px; }
.sc-dd-panel {
	position: absolute; top: calc(100% + 8px); inset-inline-start: 0; z-index: 30; min-width: 100%; width: max-content; max-width: min(340px, calc(100vw - 32px));
	max-height: min(60vh, 420px); overflow-y: auto; overscroll-behavior: contain; box-sizing: border-box;
	padding: 6px; border-radius: 14px; background: var(--sc-c-bg, #fff);
	border: 1px solid color-mix(in srgb, var(--sc-c-primary, #3d7a66) 16%, transparent);
	box-shadow: 0 20px 44px -14px rgba(20, 32, 26, .28);
	animation: sc-dd-in .18s ease-out;
}
@keyframes sc-dd-in { from { opacity: 0; transform: translateY(-4px); } }
.sc-dd-panel a {
	display: block; padding: 9px 14px; border-radius: 9px; color: inherit !important; text-decoration: none;
	font-size: .93em; line-height: 1.4; transition: background-color .15s ease, color .15s ease;
}
.sc-dd-panel a:hover, .sc-dd-panel a:focus-visible { background: #EFEAD8; color: var(--sc-c-primary, #3d7a66) !important; outline: none; }
.sc-dd-panel a.is-on { background: color-mix(in srgb, #6D8B74 18%, #EFEAD8); font-weight: 500; }
body.dark-mode .sc-dd summary { background: rgba(255, 255, 255, .06); }
body.dark-mode .sc-dd-panel { border-color: rgba(255, 255, 255, .08); box-shadow: 0 22px 48px -12px rgba(0, 0, 0, .6); }
body.dark-mode .sc-dd-panel a:hover, body.dark-mode .sc-dd-panel a:focus-visible { background: color-mix(in srgb, var(--sc-c-primary) 11%, transparent); }
body.dark-mode .sc-dd-panel a.is-on { background: color-mix(in srgb, var(--sc-c-primary) 8%, transparent); }
.sc-gallery-for { margin: -.4rem 0 1.2rem; font-weight: 600; }
.sc-gallery-for a { color: inherit; }
.sc-gallery-more { margin: 2rem 0 0; text-align: center; }
/* .sc-gallery-more-btn "עוד תמונות": look (incl. .is-busy) from assets/buttons.css (.sc-btn) */

/* an article's gallery: inside the 900px text column, 3 across */
.sc-article-gallery { margin-top: 3rem; }

body.dark-mode .sc-upload-drop { background: rgba(255, 255, 255, .05); }
body.dark-mode .sc-cphoto-tools button:not(.sc-cphoto-approve), body.dark-mode .sc-photo-member { background: color-mix(in srgb, var(--sc-c-card) 90%, transparent); color: var(--sc-c-text); }

/* the plant names list: assets/plant-suggest.css */
.sc-cphoto-plantbox .sc-suggest-toggle { top: 19px; }
