/**
 * WP Portal Frontend Styles
 *
 * @package WP_Portal
 */

body.wp-portal {
background: linear-gradient(to right, var(--base-3) 40%, rgba(255, 255, 255, 0.5) 65%), url(https://g4coastal.com/wp-content/uploads/2025/12/warping-graph-bg.webp) 100% 0% / cover no-repeat;
    height: 100vh;
}

body.wp-portal .inside-article {
	background-color:transparent;	
}


.wp-portal-dashboard {
	max-width: 1200px;
	margin: 0 auto;
	padding: 40px 20px;
}

.wp-portal-header {
	display: flex;
	align-items: center;
	gap: 20px;
	margin-bottom: 30px;
	padding-bottom: 20px;
	border-bottom: 2px solid #e0e0e0;
}

.wp-portal-logo img {
	max-width: 150px;
	height: auto;
}

.wp-portal-company-info h1 {
	margin: 0 0 5px 0;
	font-size: 28px;
	color: #333;
}

.wp-portal-role {
	margin: 0;
	color: #666;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.wp-portal-header-meta {
	margin: 0;
	color: #666;
	font-size: 14px;
	letter-spacing: 0.5px;
}

.wp-portal-logout-link {
	color: #65541e;
	text-decoration: underline;
}

.wp-portal-logout-link:hover {
	text-decoration: underline;
	color: #D4B147;
}

.wp-portal-message {
	background: #f8f9fa;
	padding: 20px;
	border-radius: 8px;
	margin-bottom: 30px;
	border-left: 4px solid #f7cc48;
}

.wp-portal-message h2 {
	margin-top: 0;
	margin-bottom: 15px;
	font-size: 20px;
	color: #333;
}

.wp-portal-message-content {
	color: #555;
	line-height: 1.6;
}

.wp-portal-content-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 30px;
	margin-top: 30px;
}

.wp-portal-section {
	background: #fff;
	padding: 25px;
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wp-portal-section h2 {
	margin-top: 0;
	margin-bottom: 20px;
	font-size: 22px;
	color: #333;
	border-bottom: 2px solid #0073aa;
	padding-bottom: 10px;
}

.wp-portal-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.wp-portal-item {
	padding: 15px;
	margin-bottom: 15px;
	background: #f8f9fa;
	border-radius: 6px;
	border-left: 3px solid #0073aa;
	transition: all 0.3s ease;
}

.wp-portal-item:hover {
	background: #e9ecef;
	transform: translateX(5px);
}

.wp-portal-item h3 {
	margin: 0 0 10px 0;
	font-size: 18px;
	color: #333;
}

.wp-portal-excerpt {
	margin: 0 0 10px 0;
	color: #666;
	font-size: 14px;
	line-height: 1.5;
}

.wp-portal-actions {
	display: flex;
	gap: 10px;
	margin-top: 10px;
}

.wp-portal-view-btn,
.wp-portal-download-btn {
	display: inline-block;
	padding: 8px 16px;
	color: #fff;
	text-decoration: none;
	border-radius: 4px;
	font-size: 14px;
	transition: background 0.3s ease;
}

.wp-portal-view-btn {
	background: #0073aa;
}

.wp-portal-view-btn:hover {
	background: #005a87;
	color: #fff;
}

.wp-portal-download-btn {
	background: #666;
}

.wp-portal-download-btn:hover {
	background: #444;
	color: #fff;
}

.wp-portal-video {
	width: 100%;
	max-width: 100%;
	height: auto;
	border-radius: 4px;
	margin-top: 10px;
}

.wp-portal-no-video {
	color: #999;
	font-style: italic;
	margin: 10px 0 0 0;
}

.wp-portal-empty {
	color: #999;
	font-style: italic;
	text-align: center;
	padding: 20px;
}

/* Category cards – 3-column grid (DesignCo-style with icons) */
.wp-portal-dashboard .wp-portal-categories {
	margin-top: 30px;
}

.wp-portal-dashboard .wp-portal-categories-grid {
	display: grid !important;
	grid-template-columns: repeat(3, 1fr) !important;
	gap: 24px;
	width: 100%;
}

.wp-portal-category-card {
	background: #fafafa;
	border: 1px solid #eee;
	border-radius: 12px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
	padding: 28px 24px;
	display: flex;
	flex-direction: column;
	min-height: 260px;
	transition: box-shadow 0.2s ease;
}

.wp-portal-category-card:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.wp-portal-category-card-icon {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	margin-bottom: 16px;
}

.wp-portal-category-card-icon .dashicons {
	font-size: 48px;
	width: 48px;
	height: 48px;
	color: #f7cc48;;
}

.wp-portal-category-card-title {
	margin: 0 0 14px 0;
	font-size: 18px;
	font-weight: 700;
	color: #1a1a1a;
	line-height: 1.3;
}

.wp-portal-asset-list-wrapper {
	flex: 1;
	min-height: 0;
	margin-bottom: 8px;
}

/* Collapsed: show ~4 items; "Show all" visible below the list */
.wp-portal-card-has-more:not(.wp-portal-card-expanded) .wp-portal-asset-list-wrapper {
	max-height: 9em;
	overflow: hidden;
}

/* "Show all" must stay visible and never be shrunk by flex */
.wp-portal-category-card .wp-portal-show-all {
	flex-shrink: 0;
}

.wp-portal-card-has-more:not(.wp-portal-card-expanded) .wp-portal-show-all {
	margin-top: 6px;
	margin-bottom: 4px;
}

/* Expanded: full list, scroll if very long; hide "Show all" */
.wp-portal-card-expanded .wp-portal-asset-list-wrapper {
	max-height: 280px;
	overflow-y: auto;
}

.wp-portal-card-expanded .wp-portal-show-all {
	display: none !important;
}

/* Visible by default (button only in DOM when card has >4 items); force visibility so theme/other CSS cannot override */
.wp-portal-dashboard .wp-portal-category-card .wp-portal-show-all {
	display: inline-block !important;
	background: none;
	border: none;
	padding: 0;
	font-size: 14px;
	color: #65541e;
	cursor: pointer;
	text-decoration: underline;
}

.wp-portal-dashboard .wp-portal-category-card .wp-portal-show-all:hover {
	text-decoration: underline;
	color: #d4b147;
}

.wp-portal-category-card .wp-portal-asset-list {
	list-style: none;
	padding: 0;
	margin: 0;
	flex: 1;
	font-size: 14px;
	color: #555;
}

.wp-portal-category-card .wp-portal-asset-list li {
	margin-bottom: 6px;
}

.wp-portal-subcategory-label {
	margin: 12px 0 4px 0;
	font-size: 12px;
	font-weight: 600;
	color: #666;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.wp-portal-asset-list-subcategory {
	margin-bottom: 8px;
}

.wp-portal-asset-link {
	text-decoration: underline;
    color: #65541e;
	font-size: 14px;
}

.wp-portal-asset-link:hover {
	text-decoration: underline;
	color: #D4B147;
}

.wp-portal-external-link {
	text-decoration: underline;
	color: #65541e;
	font-size: 14px;
}

.wp-portal-external-link:hover {
	text-decoration: underline;
	color: #D4B147;
}

.wp-portal-link-description {
	margin: 2px 0 0 0;
	font-size: 12px;
	color: #666;
	line-height: 1.4;
}

.wp-portal-card-empty {
	margin: 0 0 16px 0;
	color: #999;
	font-size: 14px;
	flex: 1;
}

.wp-portal-card-count {
	margin: 0;
	font-size: 13px;
	color: #666;
	flex-shrink: 0;
}

/* Modal viewer – full viewport popup with overlay (script may move modal to body) */
.wp-portal-modal {
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	width: 100vw !important;
	height: 100vh !important;
	z-index: 999999 !important;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}

/* Hidden by default; JS removes this class to show modal */
.wp-portal-modal.wp-portal-modal-hidden {
	display: none !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

.wp-portal-modal-overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: rgba(0, 0, 0, 0.65);
	cursor: pointer;
}

.wp-portal-modal-content {
	position: relative;
	z-index: 2;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
	max-width: 90vw;
	max-height: 90vh;
	width: 90vw;
	height: 90vh;
	display: flex;
	flex-direction: column;
	pointer-events: auto;
}

.wp-portal-modal-note {
	margin: 0;
	padding: 12px 50px 8px 12px;
	font-size: 14px;
	color: #000;
	flex-shrink: 0;
	text-align:center;
	font-weight:500;
}


.wp-portal-modal-close {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 10;
	width: 36px;
	height: 36px;
	padding: 0;
	border: none;
	background: red;
	color: #fff;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	border-radius: 4px;
}

.wp-portal-modal-close:hover {
	background: red;
    font-size: 24px;
}

.wp-portal-modal-body {
	flex: 1;
	min-height: 0;
	padding: 10px;
}

.wp-portal-modal-body iframe {
	width: 100%;
	height: 100%;
	min-height: 500px;
	border: none;
	border-radius: 4px;
}

/* Responsive */
@media (max-width: 992px) {
	.wp-portal-dashboard .wp-portal-categories-grid {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

@media (max-width: 768px) {
	.wp-portal-header {
		flex-direction: column;
		text-align: center;
	}
	
	.wp-portal-content-grid {
		grid-template-columns: 1fr;
	}

	.wp-portal-dashboard .wp-portal-categories-grid {
		grid-template-columns: 1fr !important;
	}

	.wp-portal-modal-content {
		width: 100%;
		height: 80vh;
	}

	.wp-portal-modal-body iframe {
		min-height: 400px;
	}
}
