/**
 * สไตล์พื้นฐานของ Popup ฝั่งหน้าเว็บ
 * เจตนาให้เรียบง่ายที่สุด ธีมเว็บ (Plant3) จะช่วยจัดฟอนต์/สีปุ่มให้เองผ่าน element มาตรฐาน
 */
.ryc-popup-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	background: rgba( 0, 0, 0, 0.6 );
	z-index: 999998;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}

.ryc-popup-box {
	position: relative;
	background: #fff;
	max-width: 560px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	border-radius: 6px;
	padding: 32px 28px;
	box-sizing: border-box;
	box-shadow: 0 10px 40px rgba( 0, 0, 0, 0.25 );
}

.ryc-popup-content {
	font-size: 15px;
	line-height: 1.6;
	/*
	 * จัดเนื้อหาให้อยู่กึ่งกลางเสมอ ไม่พึ่งพาการจัดกึ่งกลางจาก WordPress editor
	 * เพราะ shortcode บางตัว (เช่น [nextend_social_login]) เรนเดอร์เป็น <div>
	 * ซึ่งเมื่อ wpautop ห่อด้วย <p style="text-align:center"> จะเกิด HTML ซ้อนกันผิดรูปแบบ
	 * (<div> ซ้อนใน <p>) ทำให้เบราว์เซอร์ตัด <p> ออกก่อนและ text-align เดิมใช้ไม่ได้ผล
	 * ใช้ flex จัดกึ่งกลางแทนจึงเสถียรกว่า ไม่ขึ้นกับโครงสร้าง HTML ที่ shortcode สร้างขึ้น
	 */
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.ryc-popup-content img {
	max-width: 100%;
	height: auto;
}

.ryc-popup-close {
	position: absolute;
	top: 10px;
	right: 14px;
	background: transparent;
	border: none;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	color: #555;
	padding: 4px 8px;
}

.ryc-popup-close:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.ryc-popup-close:hover:not(:disabled) {
	color: #000;
}

body.ryc-popup-open {
	overflow: hidden;
}
