/* Group Photos components. Personal and Business photograph selectors are unchanged. */
.photoV2Group { container:group-photos / inline-size; width:100%; max-width:1440px; min-width:0; margin-inline:auto; padding:clamp(12px,2vw,24px); color:#243c32; box-sizing:border-box; }
.photoV2Group *, .gpDialog *, .gpMenu * { box-sizing:border-box; }
.photoV2Group [hidden], .gpDialog [hidden] { display:none !important; }
.photoV2Group .gpToolbar { display:flex; align-items:center; gap:8px; margin:0 0 14px; padding-bottom:14px; border-bottom:1px solid #dce4db; }
.gpButton, .gpMenuToggle, .gpDialogClose { font:inherit; font-size:14px; font-weight:650; line-height:1.3; min-height:44px; padding:9px 14px; border:1px solid #d9e2d6; border-radius:10px; background:#fff; color:#284337; cursor:pointer; white-space:normal; max-width:100%; }
.gpButton:hover, .gpMenuToggle:hover { background:#f2f7ed; }
.gpButton:disabled, .gpMenuItem:disabled { opacity:.5; cursor:not-allowed; }
.gpPrimary { background:#398600; color:#fff; border-color:#398600; }
.gpPrimary:hover { background:#2c6b00; color:#fff; }
.gpNavTab { border-color:transparent; background:transparent; }
.gpNavTab[aria-pressed="true"] { background:#183f30; color:#fff; }
.gpCreate { margin-left:auto; }
.gpRefresh { flex:0 0 44px; width:44px; padding:4px; font-size:24px; }
.gpRefreshIcon { font-size:24px; line-height:1; }
.gpMenuIcon { font-size:26px; line-height:1; }
.gpRecovery:empty { display:none; }
.photoV2Group .gpSizes { margin-bottom:12px; display:flex; gap:6px; font-size:12px; }
.photoV2Group .gpSizes > span { margin-right:auto; color:#617067; }
.photoV2Group .gpStatus { margin:8px 0 18px; color:#637169; font-size:14px; }
.photoV2Group .gpContext { margin:0 0 16px; }
.photoV2Group .gpContext:empty { display:none; }
.photoV2Group .gpPhotoGrid { display:grid; align-items:start; gap:16px; min-width:0; }
.photoV2Group .gpPhotoGrid[data-photo-v2-size="small"] { grid-template-columns:repeat(auto-fill,minmax(min(100%,175px),1fr)); gap:12px; }
.photoV2Group .gpPhotoGrid[data-photo-v2-size="medium"] { grid-template-columns:repeat(auto-fill,minmax(min(100%,240px),1fr)); }
.photoV2Group .gpPhotoGrid[data-photo-v2-size="large"] { grid-template-columns:repeat(auto-fill,minmax(min(100%,330px),1fr)); gap:20px; }
.photoV2Group .gpPhotoCard { display:flex; flex-direction:column; gap:0; padding:0; min-width:0; overflow:visible; border:1px solid #dde4da; border-radius:14px; background:#fff; }
.gpPhotoCardTop { display:flex; justify-content:flex-end; align-items:center; padding:2px 5px; gap:5px; min-height:46px; }
.gpMenuToggle { display:grid; place-items:center; flex:none; width:44px; height:44px; padding:0; font-size:26px; border-color:transparent; background:transparent; }
.gpMainBadge { margin-right:auto; padding:4px 7px; background:#eaf3e3; border-radius:6px; color:#34612e; font-size:11px; font-weight:750; overflow-wrap:anywhere; }
.gpQuiet { display:none; }
.photoV2Group .gpPhotoCard .photoV2Thumbnail { position:relative; aspect-ratio:4 / 3; border:0; border-radius:0; background:#eef1ec; padding:0; width:100%; }
.photoV2Group .gpPhotoCard .photoV2Thumbnail img { width:100%; height:auto; aspect-ratio:4 / 3; max-height:none; object-fit:cover; border-radius:0; }
.gpPhotoMeta { display:grid; gap:4px; padding:10px 12px 12px; min-width:0; font-size:13px; line-height:1.4; overflow-wrap:anywhere; }
.gpUploader { font-weight:650; }
.gpPhotoMeta time { color:#6b766f; font-size:12px; }
.gpCaption { margin:3px 0 0; color:#5a685e; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.gpMenu { position:fixed; z-index:10000030; display:grid; gap:2px; padding:6px; background:#fff; color:#243c32; border:1px solid #dbe3d6; border-radius:12px; box-shadow:0 8px 30px #193d3329; overflow:auto; overscroll-behavior:contain; }
.gpMenuItem { display:block; min-height:44px; width:100%; text-align:left; padding:10px 12px; border:0; border-radius:7px; font:inherit; font-size:14px; background:transparent; color:inherit; cursor:pointer; }
.gpMenuItem:hover { background:#f1f6ed; }
.gpDanger { color:#a4362c; border-top:1px solid #edf0e9; border-radius:0 0 7px 7px; margin-top:5px; }
.gpPositionEditor { display:grid; grid-template-columns:1fr 1fr; gap:8px; padding:8px; }
.gpPositionEditor label, .gpPositionEditor small { grid-column:1 / -1; }
.gpPositionEditor input { width:100%; min-height:44px; font:inherit; }
.photoV2Group .gpAlbumList[data-photo-v2-size] { grid-template-columns:minmax(0,1fr); gap:18px; }
.gpGalleryCard { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(0,1fr); align-items:center; border:1px solid #dce4d8; border-radius:16px; overflow:hidden; background:#fff; min-width:0; }
.gpGalleryPreview { display:flex; gap:4px; padding:10px; min-width:0; min-height:150px; background:#f0f3ed; }
.gpPreviewPhoto { display:block; flex:1 1 0; min-width:0; padding:0; border:0; background:#e5eae1; overflow:hidden; border-radius:8px; cursor:pointer; }
.gpPreviewPhoto img { display:block; width:100%; height:180px; object-fit:cover; }
.gpPreviewPhoto { position:relative; }
.gpImageLoading::after,.gpImageError::after { position:absolute; inset:0; display:grid; place-items:center; padding:8px; font-size:12px; color:#637166; background:#eef1ec; white-space:normal; }
.gpImageLoading::after { content:'Loading photograph…'; }
.gpImageError::after { content:'Preview unavailable'; }
.gpImageError img { opacity:0; }
.gpGalleryInfo { padding:20px; min-width:0; overflow-wrap:anywhere; }
.gpGalleryInfo h3 { font-size:21px; margin:0 0 8px; line-height:1.3; }
.gpGalleryMeta { display:grid; gap:5px; font-size:14px; color:#637167; margin:0 0 10px; }
.gpLink { color:#367421; border:0; padding-left:0; text-align:left; background:none; }
.photoV2Group .gpGalleryHeader { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding-bottom:16px; border-bottom:1px solid #dce4d8; }
.gpGalleryHeading { min-width:0; overflow-wrap:anywhere; }
.gpGalleryHeading h2 { margin:8px 0; font-size:25px; line-height:1.3; }
.gpGalleryHeading p { margin:3px 0; color:#637167; font-size:14px; line-height:1.4; }
.gpBack { border:0; background:transparent; padding-left:0; color:#467c35; }
.gpGalleryActions { display:flex; flex-shrink:0; align-items:center; gap:6px; }
.gpDraftDock { display:flex; flex-wrap:wrap; gap:8px; flex-basis:100%; }
.gpEmpty { padding:28px 16px; background:#f5f7f1; border-radius:12px; margin:0; color:#627065; overflow-wrap:anywhere; font-size:14px; }
.gpDialog { width:min(540px,calc(100vw - 24px)); max-height:calc(100dvh - 24px); margin:auto; padding:0; overflow:auto; overscroll-behavior:contain; border:1px solid #d8e3d2; border-radius:18px; box-shadow:0 18px 65px #152c3840; background:#fffefa; color:#243c32; }
.gpDialog::backdrop { background:#10271d80; }
.gpDialogHeader { position:sticky; top:0; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 20px; background:#fffefa; z-index:1; border-bottom:1px solid #e2e8dd; }
.gpDialogHeader h2 { margin:0; font-size:21px; }
.gpDialogClose { width:44px; padding:0; font-size:25px; background:transparent; border-color:transparent; }
.gpDialog .photoV2Upload { display:flex; flex-direction:column; gap:14px; padding:20px; box-sizing:border-box; }
.gpField { display:grid; gap:7px; min-width:0; font-size:13px; font-weight:650; }
.gpDialog :is(input,select,textarea) { display:block; width:100%; max-width:100%; min-width:0; min-height:44px; padding:10px 12px; font:inherit; font-size:16px; border:1px solid #cfdacd; border-radius:9px; color:#263e32; background:#fff; box-sizing:border-box; }
.gpDialog input[type=file] { font-size:13px; }
.gpDialog input[type=file]::file-selector-button { min-height:34px; border:0; border-radius:6px; background:#eaf2e3; color:#355a2c; margin-right:8px; font:inherit; padding:5px 8px; }
.gpMetadata { display:grid; gap:12px; min-width:0; }
.gpWalkSelection { margin:0; font-size:13px; color:#58704c; overflow-wrap:anywhere; }
.gpWalkResults { max-height:250px; overflow:auto; overscroll-behavior:contain; border:1px solid #d8e4cd; border-radius:9px; padding:4px; background:#fff; }
.gpWalkOption { display:block; width:100%; text-align:left; min-height:44px; border:0; padding:10px; border-radius:6px; background:#fff; color:#2d4436; font:inherit; font-size:14px; overflow-wrap:anywhere; cursor:pointer; }
.gpWalkOption[aria-selected=true], .gpWalkOption:hover { background:#edf5e6; }
.gpDialog :is(p,small) { overflow-wrap:anywhere; }
.gpDialog button { min-height:44px; }
.photoV2Group :is(button,input,summary):focus-visible, .gpMenu :is(button,input):focus-visible, .gpDialog :is(button,input,select,textarea):focus-visible { outline:3px solid #287d87; outline-offset:2px; }
/* The existing Social Hub tab theme uses important declarations. Limit the
   matching exception to its selected Photos tab, without changing other tabs. */
body:has(.photoV2Group) #socialDropdown [data-social-panel-tab=photos].isActive { color:white !important; background:#286e17 !important; border-color:#286e17 !important; }
@container group-photos (max-width:600px) {
 .photoV2Group .gpPhotoGrid[data-photo-v2-size="small"] { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
 .photoV2Group .gpPhotoGrid[data-photo-v2-size="medium"] { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
 .photoV2Group .gpPhotoGrid[data-photo-v2-size="large"] { grid-template-columns:minmax(0,1fr); }
 .photoV2Group .gpPhotoGrid.gpAlbumList[data-photo-v2-size] { grid-template-columns:minmax(0,1fr); }
 .gpPhotoMeta { padding:8px; font-size:12px; }
 .gpPhotoMeta time { font-size:11px; }
 .gpGalleryCard { grid-template-columns:minmax(0,1fr); }
 .gpPreviewPhoto img { height:145px; }
 .gpGalleryInfo { padding:15px; }
 .gpGalleryInfo h3 { font-size:20px; }
 .gpGalleryHeader { flex-wrap:wrap; }
 .gpGalleryActions { width:100%; justify-content:flex-end; }
 .photoV2Group .gpToolbar { gap:4px; flex-wrap:nowrap; }
 .gpNavTab { padding:8px; font-size:13px; }
 .gpCreate { font-size:0; padding:0; width:44px; flex:0 0 44px; }
 .gpCreateLabel { display:none; }
 .gpCreate::before { content:'+'; font-size:26px; }
 .photoV2Group .gpSizes { gap:4px; }
 .photoV2Group .gpSizes .bmuButton { padding:6px 8px; }
}
@media(max-width:767px) {
 body:has(.photoV2Group) #socialDropdown .socialPanelTabs { scroll-snap-type:x proximity; scrollbar-width:thin; padding-bottom:6px; }
 body:has(.photoV2Group) #socialDropdown .socialPanelTab { scroll-snap-align:center; }
 .gpDialog .photoV2Upload { padding:14px; }
 .gpDialogHeader { padding:10px 14px; }
}
.gpAudienceHelp,.gpAssociation { color:#506655; font-size:13px; line-height:1.4; margin:4px 0 12px; }
.gpDialog input[readonly] { background:#f2f6ee; color:#294333; }
#photoLightboxModal.isGroupPhotoCarousel .photoLightboxHeader { padding-top:5px; padding-bottom:10px; }
#photoLightboxModal.isGroupPhotoCarousel .photoLightboxCaption { line-height:1.4; font-size:13px; }
.gpLegacyChoice { padding:12px; border:1px solid #d4dfcc; border-radius:10px; background:#f6f8f2; }
.gpLegacyChoice label:has(input[type="checkbox"]) { display:flex; align-items:center; gap:8px; }
.gpLegacyChoice input[type="checkbox"] { order:-1; width:20px; min-height:20px; flex:none; }
.gpProfileContributions { position:fixed; inset:0; z-index:12000; overflow:auto; overscroll-behavior:contain; background:#10271d80; }
/* Compact chrome is over the image, not a blank row above every thumbnail. */
.gpPhotoCard { position:relative; }
.gpPhotoCardTop { position:absolute; inset:3px 3px auto; min-height:0; padding:0; z-index:1; pointer-events:none; }
.gpPhotoCardTop .gpMenuToggle { pointer-events:auto; background:#fffffff2; border:1px solid #dbe3d6; border-radius:10px; }
.photoV2Group .gpPhotoCard .photoV2Thumbnail { border-radius:13px 13px 0 0; overflow:hidden; }
.gpAudienceBadge { display:block; align-self:start; font-size:11px; line-height:1.3; color:#355742; background:#edf4e7; border-radius:5px; padding:3px 5px; max-width:100%; box-sizing:border-box; overflow-wrap:anywhere; }
.gpUploader { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.photoV2ProfileCollection { container:profile-photos / inline-size; min-width:0; }
.photoV2ProfileCollection .photoV2Toolbar { flex-wrap:wrap; }
.photoV2ProfileCollection .photoV2Toolbar > button { min-height:44px; white-space:normal; max-width:100%; }
.photoV2ProfileCollection .photoV2Toolbar > button[aria-pressed=true] { color:#fff; background:#183f30; }
.photoV2ProfileCollection .photoV2Grid { gap:8px; min-width:0; }
.photoV2ProfileCollection .photoV2Grid[data-photo-v2-size=small] { grid-template-columns:repeat(3,minmax(0,1fr)); }
.photoV2ProfileCollection .photoV2Grid[data-photo-v2-size=medium] { grid-template-columns:repeat(2,minmax(0,1fr)); }
.photoV2ProfileCollection .photoV2Grid[data-photo-v2-size=large] { grid-template-columns:minmax(0,1fr); }
.gpProfilePhoto { min-width:0; overflow:hidden; padding:0; gap:5px; }
.gpProfilePhoto .photoV2Thumbnail { padding:0; border:0; width:100%; }
.gpProfilePhoto img { display:block; width:100%; aspect-ratio:4/3; object-fit:cover; }
.gpProfilePhoto > :is(small,strong) { padding-inline:6px; font-size:12px; overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow-wrap:anywhere; }
.gpSharingAction { min-height:44px; margin:4px; padding:5px; border:1px solid #cfdbca; border-radius:7px; background:white; color:#245639; white-space:normal; font:inherit; font-size:12px; }
.gpPrivacyLock { background:#edf4e7; padding:10px; border-radius:8px; }
.gpViewerSharing { min-height:44px; padding:5px 10px; border:1px solid #cfdacd; border-radius:8px; background:#fff; color:#243c32; }
@container group-photos (max-width:600px) {
 .photoV2Group .gpPhotoCard > small { display:none; }
 .photoV2Group .gpPhotoGrid[data-photo-v2-size=small] .gpPhotoMeta { padding:5px; gap:3px; }
 .photoV2Group .gpPhotoGrid[data-photo-v2-size=small] .gpPhotoMeta time,
 .photoV2Group .gpPhotoGrid[data-photo-v2-size=small] .gpCaption { display:none; }
}
@container profile-photos (max-width:600px) {
 .photoV2ProfileCollection .photoV2Grid[data-photo-v2-size=small] .gpProfilePhoto > strong,
 .photoV2ProfileCollection .photoV2Grid[data-photo-v2-size=small] .gpProfilePhoto > .gpProfileGroup { display:none; }
}
/* Only containers narrower than a normal 320px phone need the deliberate fallback. */
@container profile-photos (max-width:220px) {
 .photoV2ProfileCollection .photoV2Grid[data-photo-v2-size=small] { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
.gpPrivacyPreview { width:100%; max-height:160px; object-fit:contain; border-radius:8px; background:#edf2e8; }
/* Legacy Social Hub button sizing is more specific; retain a real 44px target. */
.gpPhotoCardTop .gpMenuToggle { min-width:44px; min-height:44px; }
.gpProfilePhoto .photoV2Thumbnail img { height:auto; }
.gpProfileBy { display:block !important; white-space:nowrap; text-overflow:ellipsis; }
@container profile-photos (max-width:600px) {
 .photoV2ProfileCollection .photoV2Grid[data-photo-v2-size=small] .gpProfileUploaded { display:none; }
}

/* The legacy Social shell uses important minimum sizes; scope this exception to photo actions. */
#socialDropdown .photoV2Group .gpPhotoCardTop .gpMenuToggle { width:44px !important; min-width:44px !important; height:44px; flex:0 0 44px; }
