/* MyGSB global UI — Digest compact modal + hide Journal Description / Friendly URL */

/* 1) Digest popups: compact size, ONE scrollbar only (iframe), like PROD */
.liferay-modal.mygsb-modal .modal-dialog,
.liferay-modal.mygsb-modal .modal-dialog.modal-full-screen,
.mygsb-modal.modal-dialog,
.mygsb-modal .modal-dialog.modal-full-screen,
[id*="MyDigest"][id*="_modal"] .modal-dialog,
[id*="MyDigest"][id*="_modal"] .modal-dialog.modal-full-screen {
	max-width: 600px !important;
	width: 600px !important;
	min-height: 0 !important;
	height: auto !important;
	margin: 2rem auto !important;
	position: relative !important;
	inset: auto !important;
	top: auto !important;
	right: auto !important;
	bottom: auto !important;
	left: auto !important;
	overflow: hidden !important;
}

.liferay-modal.mygsb-modal .modal-content,
[id*="MyDigest"][id*="_modal"] .modal-content {
	max-height: none !important;
	min-height: 0 !important;
	height: auto !important;
	overflow: hidden !important;
}

/* Outer body must NOT scroll — that caused the 2nd scrollbar */
.liferay-modal.mygsb-modal .modal-body,
[id*="MyDigest"][id*="_modal"] .modal-body {
	height: 480px !important;
	max-height: 480px !important;
	min-height: 0 !important;
	flex: 0 1 auto !important;
	overflow: hidden !important;
	padding: 0 !important;
}

.liferay-modal.mygsb-modal iframe,
[id*="MyDigest"][id*="_modal"] iframe {
	display: block !important;
	width: 100% !important;
	height: 480px !important;
	min-height: 0 !important;
	max-height: 480px !important;
	border: 0 !important;
	overflow: auto !important;
}

/*
 * 2) Journal edit — hide Description + Friendly URL only (keep Title).
 * Covers pre-2026 field names and 2026.Q2 classes (article-content-*, friendly-url-*).
 */
.portlet-journal .article-content-description,
.portlet-journal .friendly-url-input-root,
.portlet-journal [id$='descriptionMapAsXML'],
.portlet-journal [id$='friendlyURLMapAsXML'],
.portlet-journal [name*='descriptionMapAsXML'],
.portlet-journal [name*='urlTitle'],
.portlet-journal [id*='urlTitle'],
.portlet-journal .form-group:has(label[for*='descriptionMap']),
.portlet-journal .form-group:has(label[for*='friendlyURL']),
.portlet-journal .form-group:has(> label):has([name*='descriptionMapAsXML']):not(:has(> label[for*='titleMapAsXML'])),
.portlet-journal .form-group:has(> label):has([id*='descriptionMapAsXML']):not(:has(> label[for*='titleMapAsXML'])),
.portlet-journal .form-group:has(> label):has([name*='urlTitle']),
.portlet-journal .form-group:has(> label):has([id*='urlTitle']),
.portlet-journal .form-group:has(.article-content-description):not(:has(.article-content-title)),
.portlet-journal .form-group:has(.friendly-url-input-root),
.portlet-journal .sheet-section:has(.article-content-description):not(:has(.article-content-title)),
.portlet-journal .sheet-section:has(.friendly-url-input-root),
[id*='JournalPortlet'] .article-content-description,
[id*='JournalPortlet'] .friendly-url-input-root,
[id*='JournalPortlet'] .form-group:has([name*='descriptionMapAsXML']):not(:has([name*='titleMapAsXML'])),
[id*='JournalPortlet'] .form-group:has([id*='descriptionMapAsXML']):not(:has([id*='titleMapAsXML'])),
[id*='JournalPortlet'] .form-group:has([name*='urlTitle']),
[id*='JournalPortlet'] .form-group:has([id*='urlTitle']),
[id*='JournalPortlet'] .form-group:has(.article-content-description):not(:has(.article-content-title)),
[id*='JournalPortlet'] .form-group:has(.friendly-url-input-root),
[data-mygsb-hidden-field='1'] {
	display: none !important;
}

/* Author EDIT — Content Block / Image Card / Button */
html:not(.mygsb-can-edit-wc) a.mygsb-contentblock-edit-btn,
html:not(.mygsb-can-edit-wc) a.mygsb-generalimagecard-edit-btn,
html:not(.mygsb-can-edit-wc) a.mygsb-button-edit-btn,
html:not(.mygsb-can-edit-wc) .mygsb-fragment a.pin-top-right {
	display: none !important;
	visibility: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

html.mygsb-can-edit-wc:not(.mygsb-page-edit-mode)
	a.mygsb-contentblock-edit-btn,
html.mygsb-can-edit-wc:not(.mygsb-page-edit-mode)
	a.mygsb-generalimagecard-edit-btn,
html.mygsb-can-edit-wc:not(.mygsb-page-edit-mode)
	a.mygsb-button-edit-btn {
	display: inline-block !important;
	visibility: visible !important;
	opacity: 1 !important;
	pointer-events: auto !important;
}

html.mygsb-page-edit-mode a.mygsb-contentblock-edit-btn,
html.mygsb-page-edit-mode a.mygsb-generalimagecard-edit-btn,
html.mygsb-page-edit-mode a.mygsb-button-edit-btn {
	display: none !important;
	visibility: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

/* Never force-hide Title */
.portlet-journal .article-content-title,
.portlet-journal .form-group:has(> label[for*='titleMapAsXML']),
.portlet-journal .form-group:has([name*='titleMapAsXML']),
.portlet-journal .form-group:has(label[for*='titleMap']),
[id*='JournalPortlet'] .article-content-title,
[id*='JournalPortlet'] .form-group:has([name*='titleMapAsXML']),
[id*='JournalPortlet'] .form-group:has([id*='titleMapAsXML']) {
	display: block !important;
	visibility: visible !important;
	height: auto !important;
	overflow: visible !important;
}
