/**
 * shadcn theme: page styles for "photos" (loaded after css/core/shadcn.php).
 * Scope every rule to this page's own wrapper so it cannot affect other pages.
 */

/* ------------------------------------------------------------------ album / photos cards (profile Photos tab, album view) */
/* card title: 16px medium (inner .title div kept OSSN bold) */
body.sc .ossn-layout-module:has(.ossn-photos, #ossn-add-album, #ossn-photos-edit-album) .module-title .title { font-weight: 500 !important; font-size: 1rem; line-height: 1.375rem; }
/* header actions: separate 32px buttons instead of a joined strip; Lucide icons 16px */
body.sc .ossn-layout-module:has(.ossn-photos, #ossn-add-album, #ossn-photos-edit-album) .module-title { display: flex; align-items: center; justify-content: space-between; gap: var(--sc-field-gap); flex-wrap: wrap; }
body.sc .ossn-layout-module:has(.ossn-photos, #ossn-add-album, #ossn-photos-edit-album) .module-title .controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; float: none; margin: 0; }
body.sc .ossn-layout-module:has(.ossn-photos, #ossn-add-album, #ossn-photos-edit-album) .module-title .controls svg { width: 16px; height: 16px; }

/* album name heading inside the album card: no legacy uppercase 21px */
body.sc .ossn-photos-mod-title { font-size: 1rem !important; font-weight: 500 !important; line-height: 1.375rem; text-transform: none !important; letter-spacing: 0; margin: 0 0 var(--sc-field-stack) !important; color: var(--card-foreground); }

/* thumbnails grid (albums list, album view, profile photos and covers): square tiles, 8px gap.
   2 equal columns on phones, more columns as the card gets wider; flat tiles (cards carry no shadow) */
body.sc .ossn-photos { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px !important; }
@media (max-width: 575.98px) { body.sc .ossn-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
body.sc .ossn-photos li { width: auto !important; height: auto !important; aspect-ratio: 1 / 1; box-shadow: none !important; border-radius: var(--sc-container-radius) !important; }
body.sc .ossn-photos li > a { display: block; width: 100%; height: 100%; }
body.sc .ossn-photos li img.pthumb { width: 100% !important; height: 100% !important; object-fit: cover; border-radius: 0 !important; display: block; }
/* album caption on the tile: body size, medium weight, on a stronger dark gradient so the white text reads over busy photos */
body.sc .ossn-photos .ossn-album-name { font-size: 0.875rem !important; font-weight: 500 !important; line-height: 1.25rem; padding: 2.5rem var(--sc-control-px) var(--sc-control-px) !important; color: #fff !important; background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.55) 45%, rgba(0, 0, 0, 0.85) 100%) !important; }

/* album likes/comments block: token spacing instead of margin-top-20 */
body.sc .ossn-photos-album-comments-likes { margin-top: var(--sc-field-stack) !important; }
/* album Like / Comment: OSSN uses object-menu-extra-* here (the Lucide bridge only covers entity-/post- links),
   so draw the same Lucide icons as the single photo view and feed: thumbs-up and message-circle, 16px, painted in the text colour */
body.sc .menu-likes-comments-share > li a.object-menu-extra-like::before,
body.sc .menu-likes-comments-share > li a.object-menu-extra-comment::before { content: "" !important; font-family: inherit !important; display: inline-block !important; width: var(--sc-icon, 1rem) !important; height: var(--sc-icon, 1rem) !important; flex-shrink: 0; vertical-align: -0.125em; background: currentColor !important; margin-right: 0.375rem; }
body.sc .menu-likes-comments-share > li a.object-menu-extra-like::before {
	-webkit-mask: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M7%2010v12%22%2F%3E%3Cpath%20d%3D%22M15%205.88%2014%2010h5.83a2%202%200%200%201%201.92%202.56l-2.33%208A2%202%200%200%201%2017.5%2022H4a2%202%200%200%201-2-2v-8a2%202%200%200%201%202-2h2.76a2%202%200%200%200%201.79-1.11L12%202a3.13%203.13%200%200%201%203%203.88Z%22%2F%3E%3C%2Fsvg%3E") center/contain no-repeat;
	mask: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M7%2010v12%22%2F%3E%3Cpath%20d%3D%22M15%205.88%2014%2010h5.83a2%202%200%200%201%201.92%202.56l-2.33%208A2%202%200%200%201%2017.5%2022H4a2%202%200%200%201-2-2v-8a2%202%200%200%201%202-2h2.76a2%202%200%200%200%201.79-1.11L12%202a3.13%203.13%200%200%201%203%203.88Z%22%2F%3E%3C%2Fsvg%3E") center/contain no-repeat;
}
body.sc .menu-likes-comments-share > li a.object-menu-extra-comment::before {
	-webkit-mask: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M7.9%2020A9%209%200%201%200%204%2016.1L2%2022Z%22%2F%3E%3C%2Fsvg%3E") center/contain no-repeat;
	mask: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M7.9%2020A9%209%200%201%200%204%2016.1L2%2022Z%22%2F%3E%3C%2Fsvg%3E") center/contain no-repeat;
}

/* ------------------------------------------------------------------ single photo view (/photos/view, /photos/user/view, covers) */
/* full content width: the left 8/12 column grows to 12/12, the right sidebar column (if any) drops below it */
body.sc .ossn-layout-media > .row > .col-lg-8:has(> .content > .ossn-photo-view),
body.sc .ossn-layout-media > .row > .col-lg-8:has(> .content > .ossn-photo-view) + .col-lg-4 { flex: 0 0 100%; max-width: 100%; width: 100%; }
body.sc .ossn-layout-media .content:has(> .ossn-photo-view) { padding: var(--sc-card-pad) !important; }
body.sc .ossn-photo-view { margin: 0 0 var(--sc-field-stack) !important; display: flow-root; }
body.sc .ossn-photo-view > h2 { font-size: 1rem !important; font-weight: 500 !important; line-height: 2rem; margin: 0 !important; color: var(--card-foreground); }
body.sc .ossn-photo-view > a.button-grey { margin: 0 0 var(--sc-field-stack) !important; }
body.sc .ossn-photo-view > h2 + a.button-grey { margin-left: var(--sc-field-gap) !important; }
body.sc .ossn-photo-view > br { display: none; }
body.sc .ossn-photo-view .ossn-photo-viewer { clear: both; width: 100%; background: var(--muted) !important; border: 1px solid var(--sc-card-border) !important; border-collapse: separate; border-spacing: 0; border-radius: var(--sc-container-radius); overflow: hidden; }
body.sc .ossn-photo-view .ossn-photo-viewer td.image-block { padding: 0 !important; text-align: center; vertical-align: middle; }
body.sc .ossn-photo-view .ossn-photo-viewer img { display: block; max-width: 100%; height: auto; margin: 0 auto; }
body.sc .ossn-layout-media .content:has(> .ossn-photo-view) > br { display: none; }
/* photo menu (Delete photo) under the comments */
/* +12px offsets the comment typing-status row, which carries margin-top:-12px and collapses into this gap */
body.sc .ossn-photo-view-controls { margin-top: calc(var(--sc-field-stack) + 12px); }
body.sc .ossn-photo-view-controls .ossn-photo-menu { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; }
body.sc .ossn-photo-view-controls .ossn-photo-menu li { list-style: none; }

/* ------------------------------------------------------------------ dialogs: Add Album / Edit album / Add photos */
body.sc .ossn-message-box form[action*="/album/add"] fieldset,
body.sc .ossn-message-box form[action*="/album/edit"] fieldset { display: flex; flex-direction: column; gap: var(--sc-field-gap); }
body.sc .ossn-message-box form[action*="/album/add"] fieldset > label,
body.sc .ossn-message-box form[action*="/album/edit"] fieldset > label { margin: 0 !important; }
body.sc .ossn-message-box form[action*="/album/add"] input[name="title"],
body.sc .ossn-message-box form[action*="/album/edit"] input[name="title"] { display: block; width: 100%; height: var(--sc-control-h); margin: 0 0 calc(var(--sc-field-stack) - var(--sc-field-gap)) !important; }
body.sc .ossn-message-box form[action*="/album/"] .ossn-privacy { display: flex; flex-direction: column; gap: var(--sc-field-gap); }
body.sc .ossn-message-box form[action*="/album/"] .ossn-privacy label { margin: 0 !important; }
body.sc .ossn-message-box form[action*="/album/"] .ossn-privacy .radio-block { display: flex !important; align-items: center; gap: 0.5rem; }
body.sc .ossn-message-box form[action*="/album/"] .ossn-privacy .radio-block span { width: auto !important; margin: 0 !important; }

/* Add photos: picker spacing on the token scale, 16px icons */
body.sc .ossn-message-box .ossn-photos-add-button { padding: var(--sc-card-pad) !important; }
body.sc .ossn-message-box #ossn-photos-add-button-inner { height: var(--sc-control-h); gap: 0.5rem; }
body.sc .ossn-message-box .ossn-photos-add-button svg { width: 16px; height: 16px; }

/* likes/comments under a single photo: the card has 16px padding, so drop the feed's -10px side offset */
body.sc .ossn-layout-media .content:has(> .ossn-photo-view) .ossn-photos-comments .comments-list { margin-left: 0 !important; margin-right: 0 !important; }

/* ------------------------------------------------------------------ full-screen viewer (fancybox: album view, messages, chat) */
/* this stylesheet loads on every page, so the viewer is styled here.
   Toolbar and arrows become shadcn ghost icon buttons: 32px square, 6px corners, transparent with a subtle hover,
   16px Lucide icons drawn as CSS masks (the fancybox SVGs are hidden). The dark overlay stays. */
body.sc .fancybox-container .fancybox-toolbar { display: flex; gap: 4px; top: 8px; right: 8px; }
body.sc .fancybox-container .fancybox-button,
body.sc .fancybox-container .fancybox-navigation .fancybox-button { width: var(--sc-control-h, 32px); height: var(--sc-control-h, 32px); padding: 0; margin: 0; border: 0; border-radius: var(--sc-control-radius, 6px); background: transparent; background-clip: border-box; color: rgba(255, 255, 255, 0.8); display: inline-flex; align-items: center; justify-content: center; transition: background-color .15s, color .15s; }
body.sc .fancybox-container .fancybox-button:hover,
body.sc .fancybox-container .fancybox-button:focus-visible { background: rgba(255, 255, 255, 0.12); color: #fff; }
body.sc .fancybox-container .fancybox-button:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.5); outline-offset: 2px; }
body.sc .fancybox-container .fancybox-button[disabled],
body.sc .fancybox-container .fancybox-button[disabled]:hover { background: transparent; color: rgba(255, 255, 255, 0.35); }
body.sc .fancybox-container .fancybox-button > div,
body.sc .fancybox-container .fancybox-button > svg { display: none !important; }
body.sc .fancybox-container .fancybox-button::before { content: ""; display: block; width: var(--sc-icon, 16px); height: var(--sc-icon, 16px); background: currentColor; -webkit-mask: var(--sc-fb-icon) center / contain no-repeat; mask: var(--sc-fb-icon) center / contain no-repeat; }
/* prev / next arrows: vertically centred, 8px from the edge */
body.sc .fancybox-container .fancybox-navigation .fancybox-button { top: calc(50% - var(--sc-control-h, 32px) / 2); }
body.sc .fancybox-container .fancybox-navigation .fancybox-button--arrow_left { left: 8px; left: max(8px, env(safe-area-inset-left)); }
body.sc .fancybox-container .fancybox-navigation .fancybox-button--arrow_right { right: 8px; right: max(8px, env(safe-area-inset-right)); }
/* Lucide icon per button: x, chevron-left, chevron-right, zoom-in, play, pause, layout-grid, download, maximize, minimize, share-2 */
body.sc .fancybox-container .fancybox-button--close { --sc-fb-icon: url("data:image/svg+xml;utf8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M18 6 6 18%27/%3E%3Cpath d=%27m6 6 12 12%27/%3E%3C/svg%3E"); }
body.sc .fancybox-container .fancybox-button--arrow_left { --sc-fb-icon: url("data:image/svg+xml;utf8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27m15 18-6-6 6-6%27/%3E%3C/svg%3E"); }
body.sc .fancybox-container .fancybox-button--arrow_right { --sc-fb-icon: url("data:image/svg+xml;utf8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27m9 18 6-6-6-6%27/%3E%3C/svg%3E"); }
body.sc .fancybox-container .fancybox-button--zoom { --sc-fb-icon: url("data:image/svg+xml;utf8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Ccircle cx=%2711%27 cy=%2711%27 r=%278%27/%3E%3Cpath d=%27m21 21-4.35-4.35%27/%3E%3Cpath d=%27M11 8v6%27/%3E%3Cpath d=%27M8 11h6%27/%3E%3C/svg%3E"); }
body.sc .fancybox-container .fancybox-button--play { --sc-fb-icon: url("data:image/svg+xml;utf8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpolygon points=%276 3 20 12 6 21 6 3%27/%3E%3C/svg%3E"); }
body.sc .fancybox-container .fancybox-button--pause { --sc-fb-icon: url("data:image/svg+xml;utf8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Crect x=%2714%27 y=%274%27 width=%274%27 height=%2716%27 rx=%271%27/%3E%3Crect x=%276%27 y=%274%27 width=%274%27 height=%2716%27 rx=%271%27/%3E%3C/svg%3E"); }
body.sc .fancybox-container .fancybox-button--thumbs { --sc-fb-icon: url("data:image/svg+xml;utf8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Crect width=%277%27 height=%277%27 x=%273%27 y=%273%27 rx=%271%27/%3E%3Crect width=%277%27 height=%277%27 x=%2714%27 y=%273%27 rx=%271%27/%3E%3Crect width=%277%27 height=%277%27 x=%2714%27 y=%2714%27 rx=%271%27/%3E%3Crect width=%277%27 height=%277%27 x=%273%27 y=%2714%27 rx=%271%27/%3E%3C/svg%3E"); }
body.sc .fancybox-container .fancybox-button--download { --sc-fb-icon: url("data:image/svg+xml;utf8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4%27/%3E%3Cpath d=%27m7 10 5 5 5-5%27/%3E%3Cpath d=%27M12 15V3%27/%3E%3C/svg%3E"); }
body.sc .fancybox-container .fancybox-button--fsenter { --sc-fb-icon: url("data:image/svg+xml;utf8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M8 3H5a2 2 0 0 0-2 2v3%27/%3E%3Cpath d=%27M21 8V5a2 2 0 0 0-2-2h-3%27/%3E%3Cpath d=%27M3 16v3a2 2 0 0 0 2 2h3%27/%3E%3Cpath d=%27M16 21h3a2 2 0 0 0 2-2v-3%27/%3E%3C/svg%3E"); }
body.sc .fancybox-container .fancybox-button--fsexit { --sc-fb-icon: url("data:image/svg+xml;utf8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M8 3v3a2 2 0 0 1-2 2H3%27/%3E%3Cpath d=%27M21 8h-3a2 2 0 0 1-2-2V3%27/%3E%3Cpath d=%27M3 16h3a2 2 0 0 1 2 2v3%27/%3E%3Cpath d=%27M16 21v-3a2 2 0 0 1 2-2h3%27/%3E%3C/svg%3E"); }
body.sc .fancybox-container .fancybox-button--share { --sc-fb-icon: url("data:image/svg+xml;utf8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Ccircle cx=%2718%27 cy=%275%27 r=%273%27/%3E%3Ccircle cx=%276%27 cy=%2712%27 r=%273%27/%3E%3Ccircle cx=%2718%27 cy=%2719%27 r=%273%27/%3E%3Cpath d=%27m8.59 13.51 6.83 3.98%27/%3E%3Cpath d=%27m15.41 6.51-6.82 3.98%27/%3E%3C/svg%3E"); }
 