/* Popup Overlay */
.cap-popup-overlay {
	display: none;
	/* Hidden by default, JS will show it */
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.6);
	z-index: 999999;
	align-items: center;
	justify-content: center;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.cap-popup-overlay.cap-show {
	display: flex;
}

/* Main Container */
.cap-popup-container {
	display: flex;
	background: #fff;
	width: 90%;
	max-width: 900px;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
	position: relative;
	height: 480px;
}

/* Sidebar */
.cap-popup-sidebar {
	width: 30%;
	background-color: #17375e;
	color: #fff;
	display: flex;
	flex-direction: column;
	position: relative;
}

.cap-sidebar-logo {
	padding: 20px;
	text-align: center;
	border-bottom: 2px solid #e1a624;
}

.cap-sidebar-logo img {
	max-width: 100px;
	height: auto;
	margin: 0 auto;
	display: block;
}

.cap-sidebar-content {
	padding: 16px;
}

.cap-sidebar-title {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	color: #e1a624;
	margin-bottom: 15px;
}

.cap-sidebar-title h3 {
	color: #e1a624;
	font-size: 16px;
	margin: 0;
	line-height: 1.3;
	text-transform: uppercase;
}

.cap-megaphone-icon {
	font-size: 24px;
}

.cap-sidebar-content p {
	font-size: 14px;
	line-height: 1.5;
	margin: 0;
}

/* Main Content Area */
.cap-popup-main {
	width: 70%;
	padding: 0;
	display: flex;
	flex-direction: column;
	position: relative;
}

/* Close Button */
.cap-popup-close {
	position: absolute !important;
	top: 15px !important;
	right: 15px !important;
	background: #17375e;
	color: #fff !important;
	border: none !important;
	width: 30px !important;
	height: 30px !important;
	border-radius: 50% !important;
	font-size: 18px !important;
	line-height: 1 !important;
	padding: 0 !important;
	margin: 0 !important;
	cursor: pointer !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	z-index: 10 !important;
	box-sizing: border-box !important;
}

/* Header */
.cap-popup-header {
	display: flex;
	padding: 25px;
	border-bottom: 1px solid #e5e5e5;
	position: relative;
}

.cap-header-text {
	flex: 1;
	padding-right: 20px;
}

.cap-header-title {
	color: #17375e;
	font-size: 12px;
	font-weight: 600;
	margin-bottom: 5px;
}

.cap-header-main {
	color: #17375e;
	font-size: 24px;
	font-weight: bold;
	margin: 0 0 5px 0;
	line-height: 1.2;
}

.cap-header-sub {
	color: #555;
	font-size: 12px;
	line-height: 1.5;
}

.cap-header-image {
	width: 150px;
	display: flex;
	align-items: center;
	justify-content: flex-end;
}

.cap-header-image img {
	max-width: 100%;
	height: auto;
	opacity: 0.8;
	/* Style to match the faded look */
}

/* Notices List */
.cap-popup-notices {
	flex: 1;
	padding: 0 25px;
	overflow-y: auto;
	max-height: 500px;
}

/* Custom Scrollbar for Notices */
.cap-popup-notices::-webkit-scrollbar {
	width: 8px;
}

.cap-popup-notices::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 4px;
}

.cap-popup-notices::-webkit-scrollbar-thumb {
	background: #c1c1c1;
	border-radius: 4px;
}

.cap-popup-notices::-webkit-scrollbar-thumb:hover {
	background: #a8a8a8;
}

.cap-notice-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.cap-notice-list li {
	display: flex;
	align-items: center;
	padding: 12px 0;
	border-bottom: 1px dashed #e5e5e5;
	gap: 15px;
}

.cap-notice-list li:last-child {
	border-bottom: none;
}

.cap-flash-new {
	width: 40px;
	height: auto;
}

.cap-notice-list a {
	color: #17375e;
	text-decoration: none;
	font-weight: 600;
	font-size: 14px;
	flex: 1;
}

.cap-notice-list a:hover {
	text-decoration: underline;
}

.cap-click-here {
	color: #e1a624 !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	flex: none !important;
}

.cap-mobile-header-logo {
	display: none;
}

/* Footer */
.cap-popup-footer {
	padding: 15px 25px;
	display: flex;
	justify-content: flex-end;
	align-items: center;
}

.cap-btn-view-all {
	background: #17375e;
	color: #fff;
	text-decoration: none;
	padding: 10px 20px;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 600;
}

.cap-btn-view-all:hover {
	background: #0f2540;
	color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .cap-popup-close {
    top: 10px !important;
    right: 12px !important;
    width: 20px !important;
    height: 20px !important;
    font-size: 15px !important;
}
.cap-popup-container {
    flex-direction: column;
    max-height: 85vh;
    overflow: hidden;
    width: 95%;
    height: 600px;
}

	.cap-popup-sidebar {
		width: 100%;
		order: 2;
		padding-bottom: 20px;
	}

	.cap-sidebar-logo {
		display: none;
	}

	.cap-popup-main {
		width: 100%;
		order: 1;
		display: flex;
		flex-direction: column;
		overflow: hidden;
		flex: 1;
	}

	.cap-popup-notices {
		max-height: none;
		overflow-y: auto;
		padding: 0 15px;
		flex: 1;
	}

	.cap-popup-header {
		padding: 6px 0px !important;
	}

	.cap-popup-footer {
		padding: 15px;
		justify-content: center;
		display: flex;
	}

	.cap-btn-view-all {
		width: 100%;
		text-align: center;
		box-sizing: border-box;
	}

	.cap-notice-list li {
		gap: 10px;
		flex-wrap: wrap;
		/* allow long titles to push the button to a new line */
	}

	.cap-click-here {
		margin-left: auto;
		/* push the button to the right if wrapped */
	}

	.cap-desktop-header-logo {
		display: none !important;
	}

	.cap-mobile-header-logo {
		display: block !important;
		margin: 0 auto;
		max-width: 100%;
		height: auto;
	}

	.cap-popup-overlay.cap-show.cap-hide-mobile {
		display: none !important;
	}
}

@media (min-width: 769px) {
	.cap-popup-overlay.cap-show.cap-hide-desktop {
		display: none !important;
	}
}