.sub-popup-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.6);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 999999;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

body.admin-bar .sub-popup-overlay {
	top: var(--wp-admin--admin-bar--height, 32px);
}

@media screen and (max-width: 782px) {
	body.admin-bar .sub-popup-overlay {
		top: 46px;
	}
}

.sub-popup-overlay.sub-popup-open {
	opacity: 1;
	visibility: visible;
}

.sub-popup-box {
	background: #ffffff;
	padding: 30px;
	border-radius: 12px;
	width: 90%;
	max-width: 450px;
	position: relative;
	box-shadow: 0 10px 30px rgba(0,0,0,0.25);
	text-align: center;
	transform: scale(0.85);
	transition: transform 0.3s ease;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.sub-popup-overlay.sub-popup-open .sub-popup-box {
	transform: scale(1);
}

.sub-popup-close {
	position: absolute;
	top: 15px;
	right: 15px;
	background: none;
	border: none;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	color: #999;
	transition: color 0.2s ease;
}

.sub-popup-close:hover {
	color: #333;
}

.sub-popup-title {
	margin: 0 0 10px 0;
	font-size: 22px;
	color: #111;
	font-weight: 700;
}

.sub-popup-desc {
	margin: 0 0 20px 0;
	font-size: 14px;
	color: #666;
	line-height: 1.5;
}

.sub-popup-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.sub-popup-field input {
	width: 100%;
	padding: 12px 16px;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-size: 14px;
	box-sizing: border-box;
	transition: border-color 0.2s ease;
}

.sub-popup-field input:focus {
	outline: none;
	border-color: #3b82f6;
}

.sub-popup-submit {
	background-color: #111;
	color: #fff;
	padding: 12px;
	font-size: 14px;
	font-weight: 600;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.sub-popup-submit:hover {
	background-color: #333;
}

.sub-popup-msg {
	margin: 8px 0 0 0;
	font-size: 13px;
	display: none;
}

.sub-popup-msg.success {
	color: #155724;
	display: block;
}

.sub-popup-msg.error {
	color: #721c24;
	display: block;
}
