/**
 * Popup overlay and content styles.
 *
 * @package bhumibolhospital
 */

.bh-popup-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	/* height: 100vh; */
	box-sizing: border-box;
}

.bh-popup-backdrop {
	position: absolute;
	inset: 0;
	background: #C0DFFDC9;
	cursor: pointer;
}

.bh-popup-box {
	position: relative;
	z-index: 1;
	display: none;
	max-width: 850px;
	margin-block: 24px;
	aspect-ratio: 1;
	object-fit: cover;
	max-height: calc(100vh - 50px);
	/* overflow: auto; */
	background: #F4F9FD;
	border-radius: 20px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.bh-popup-box.bh-popup-box--active {
	display: block;
}

.bh-popup-close {
	position: absolute;
	top: -9px;
	right: -5px;
	z-index: 2;
	display: flex;
	width: 20px;
	height: 20px;
	background-color: #fff;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: 50%;
	font-size: 20px;
	color: #333;
	cursor: pointer;
}

.bh-popup-content {
	padding: 20px;
	background: #F4F9FD;
	border-radius: 20px;
	overflow: hidden;
}

/* Popup 1: image only */
.bh-popup-box--image .bh-popup-content {
	padding: 0;
}

.bh-popup-image {
	display: block;
	max-width: 100%;
	height: auto;
	border-radius: 4px;
}

/* Popup 2: heading + cards */
.bh-popup-heading {
	font-size: var(--wp--preset--font-size--6-xl);
	text-align: center;
	color: var(--wp--preset--color--primary);
	line-height: 1.3;
}

.bh-popup-cards {
	display: grid;
	gap: 16px;
	overflow: auto;
    height: 70vh;
	max-width: 673px;
}

.bh-popup-card {
	padding: 16px;
	border-radius: 12px;
	background: linear-gradient(180deg, #FFFFFF 25.77%, #FFFAEF 100%);
	box-shadow: 0px 6px 12px 0px #ABBED14D;
	display: flex;
	gap: 24px;
	flex-direction: column;
	box-sizing: border-box;
}

a.bh-popup-card--link {
	text-decoration: none;
	color: inherit;
	cursor: pointer;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

a.bh-popup-card--link:hover {
	box-shadow: 0px 8px 16px 0px #ABBED180;
}

a.bh-popup-card--link:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary, #2271b1);
	outline-offset: 3px;
}

@media (min-width: 992px) {
	.bh-popup-card {
		flex-direction: row;
		align-items: center;
	}
}


.bh-popup-card__content {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.bh-popup-card__image {
	max-width: 75px;
	height: auto;
	object-fit: cover;
	border-radius: 12px;
	aspect-ratio: 1;
}

.bh-popup-card__image.image-icon {
	object-fit: contain;
}

.bh-popup-card__text {
	font-weight: 600;
	font-size: 1.125rem;
}

.bh-popup-card__description {
	font-size: 1rem;
	color: #000;
	font-weight: 400;
	line-height: 1.5;
	color: var(--wp--preset--color--gray);
}
