/* ============================================================
   Inner: List of Countries and Translation v2 (inner_locat_v2)
   Flat grid — no column grouping
   ============================================================ */

/* --- Grid container --- */
.cards-nm {
	max-width: 100%;
	margin: auto;
	display: grid;
	grid-template-columns: repeat(4, minmax(auto, 1fr));
	gap: 12px;
	padding: 0 10px 210px;
}

/* --- Placeholder holds the card's space in the grid --- */
.card-placeholder {
	position: relative;
	height: 81px;
	width: 100%;
}

/* --- Base card --- */
.cardnm {
	background: #fff;
	border: 1px solid #00a19c;
	border-radius: 10px;
	cursor: pointer;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 81px;
	z-index: 1;
	overflow: hidden;
	box-sizing: border-box;
	transition: box-shadow 0.3s ease;
	transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Expanded card --- */
.cardnm.expanded {
	height: 260px;
	z-index: 100;
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
	overflow-y: auto;
	scrollbar-gutter: stable;
	scrollbar-width: thin;
	scrollbar-color: #9e9e9e #e0e0e000;
}

/* --- Card header (always visible) --- */
.card-header {
	padding: 20px 30px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	height: 81px;
	box-sizing: border-box;
	font-weight: bold;
}

/* --- Card content (hidden until expanded) --- */
.card-content {
	padding: 0 30px 20px;
	opacity: 0;
	max-height: 0;
	overflow: hidden;
	transition:
		opacity 0.3s ease,
		max-height 0.5s ease;
}

.cardnm.expanded .card-content {
	opacity: 1;
	max-height: 400px;
}

/* --- PDF section --- */
.pdf-section h4 {
	color: #009999;
	margin-top: 10px;
	font-size: 1.2rem;
}

.pdf-section {
	padding-top: 10px;
}

.pdf-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin: 8px 0;
	font-size: 16px;
	line-height: 20px;
}

.pdf-item:hover {
	color: #00a19c;
}

.pdf-item:before {
	content: "";
	position: absolute;
	width: 4px;
	height: 4px;
	margin-left: -15px;
	background: #00a19c;
	border-radius: 50%;
	opacity: 1;
	transition: all 0.3s ease-in-out;
}

.pdf-item:hover:before {
	opacity: 1;
	height: 15px;
	border-radius: 0%;
}

.pdf-item .pdf-icons {
	opacity: 0;
	transition: opacity 0.3s ease-in-out;
	display: flex;
}

.pdf-item:hover .pdf-icons {
	opacity: 1;
}

.pdf-item span {
	flex: 1;
}

.pdf-item a {
	text-decoration: unset;
	color: #000000;
	transition: all 0.3s ease;
}

.pdf-item:hover a {
	text-decoration: unset;
	color: #00a19c;
}

.pdf-icons a {
	color: #009999;
	margin-left: 10px;
	font-size: 1.1rem;
	transition: color 0.3s;
	position: relative;
}

.pdf-icons a:hover {
	color: #007777;
}

/* --- Flag --- */
.flag {
	width: 40px;
	height: auto;
	border: #c3c3c3 0.001px solid;
	margin: auto 0 auto auto;
}

/* --- Icons --- */
.eye-icon:before {
	content: "";
	background-image: url(https://staging.petronas.com/sites/default/files/inline-images/cobe-eye-icon.svg);
	width: 20px;
	height: 20px;
	display: block;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center center;
}

.download-icon:before {
	content: "";
	background-image: url(https://staging.petronas.com/sites/default/files/inline-images/cobe-download-icon.svg);
	width: 20px;
	height: 20px;
	display: block;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center center;
}

/* --- Loading spinner --- */
@keyframes spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

.loading-icon {
	animation: spin 1s linear infinite;
	color: #00a19c;
}

.fa-download.loading-icon:before {
	opacity: 0;
}

.pdf-icons a.loading::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(255, 255, 255, 0.7);
	border-radius: 50%;
}

/* --- Scrollbar (Chrome / Safari / Edge) --- */
.cardnm.expanded::-webkit-scrollbar {
	width: 8px;
}

.cardnm.expanded::-webkit-scrollbar-track {
	background: #e0e0e000;
	border-radius: 8px;
}

.cardnm.expanded::-webkit-scrollbar-thumb {
	background-color: #9e9e9e;
	border-radius: 8px;
}

.cardnm.expanded::-webkit-scrollbar-thumb:hover {
	background-color: #7a7a7a;
}

@media (prefers-color-scheme: dark) {
	.cardnm.expanded {
		scrollbar-color: #a8a8a8 #3a3a3a;
	}
	.cardnm.expanded::-webkit-scrollbar-track {
		background: #3a3a3a00;
	}
	.cardnm.expanded::-webkit-scrollbar-thumb {
		background-color: #a8a8a8;
	}
}

/* --- Mobile --- */
@media (max-width: 768px) {
	.cards-nm {
		grid-template-columns: 1fr;
		grid-auto-rows: auto;
	}

	.card-placeholder {
		height: auto;
	}

	.cardnm {
		position: relative;
		max-height: 81px;
		transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
	}

	.cardnm.expanded {
		max-height: 220px;
		z-index: 1;
	}

	.pdf-section {
		padding-bottom: 10px;
	}
}
