/* Popup đăng nhập bằng OTP Zalo, theo bố cục popup của Coolmate. */

body.tvcdt-modal-open {
	overflow: hidden;
}

.tvcdt-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.tvcdt-modal[hidden] {
	display: none !important;
}

/* Nền phía sau: tối và mờ. */
.tvcdt-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .4);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	animation: tvcdt-fade .2s ease-out;
}

/* Thẻ popup. Không đặt overflow ở đây để nút đóng nhô ra góc được. */
.tvcdt-modal-dialog {
	position: relative;
	width: 100%;
	max-width: 420px;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
	color: #111;
	font-size: 15px;
	line-height: 1.5;
	animation: tvcdt-rise .22s ease-out;
}

.tvcdt-modal-body {
	max-height: calc(100vh - 64px);
	overflow-y: auto;
	padding: 32px 28px 28px;
	border-radius: 14px;
}

/* Nút đóng: tròn đen, nằm đè lên góc trên bên phải của thẻ. */
.tvcdt-modal .tvcdt-modal-dialog > button.tvcdt-modal-close {
	position: absolute !important;
	top: -14px !important;
	right: -14px !important;
	left: auto !important;
	bottom: auto !important;
	z-index: 2 !important;
	width: 36px !important;
	height: 36px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 2px solid #fff !important;
	border-radius: 50% !important;
	background: #111 !important;
	color: #fff !important;
	font-size: 22px !important;
	line-height: 1 !important;
	cursor: pointer;
}

.tvcdt-modal .tvcdt-modal-dialog > button.tvcdt-modal-close:hover {
	background: #333 !important;
}

.tvcdt-modal .tvcdt-modal-logo {
	display: block;
	height: 34px;
	width: auto;
	margin: 0 0 22px;
}

.tvcdt-modal .tvcdt-modal-title {
	margin: 0 0 16px;
	color: #111;
	font-size: 24px;
	font-weight: 800;
	line-height: 1.25;
	text-align: left;
}

.tvcdt-modal .tvcdt-modal-sub {
	margin: 0 0 10px;
	color: #111;
	font-size: 13px;
	font-weight: 600;
}

.tvcdt-modal .tvcdt-modal-benefits {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
	margin: 0 0 22px;
	padding: 0;
	list-style: none;
}

.tvcdt-modal .tvcdt-modal-benefits li {
	padding: 12px 10px;
	border: 1px solid #d9d9d9;
	border-radius: 8px;
	color: #111;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
}

/* Form bên trong popup: tab kiểu gạch chân, ô nhập bo tròn, nút đen. Độ ưu tiên cao để thắng woo-buttons.css. */
.tvcdt-modal .tvcdt-auth {
	max-width: none;
	margin: 0;
	padding: 0;
	border: 0;
	box-shadow: none;
	background: transparent;
}

.tvcdt-modal .tvcdt-auth .tvcdt-auth-tabs {
	gap: 24px;
	margin: 0 0 18px;
	padding: 0;
	background: transparent;
	border-radius: 0;
	border-bottom: 1px solid #e3e3e3;
}

.tvcdt-modal .tvcdt-auth button.tvcdt-auth-tab {
	flex: none !important;
	padding: 10px 0 !important;
	margin: 0 0 -1px !important;
	border: 0 !important;
	border-bottom: 2px solid transparent !important;
	border-radius: 0 !important;
	background: transparent !important;
	color: #8a8a8a !important;
	box-shadow: none !important;
}

.tvcdt-modal .tvcdt-auth button.tvcdt-auth-tab.is-active {
	color: #111 !important;
	border-bottom-color: #111 !important;
	background: transparent !important;
	box-shadow: none !important;
}

.tvcdt-modal .tvcdt-auth .tvcdt-auth-hint {
	margin: 0 0 16px;
	color: #555;
	font-size: 14px;
	text-align: left;
}

.tvcdt-modal .tvcdt-auth .tvcdt-auth-field {
	margin-bottom: 14px;
	color: #111;
	font-size: 14px;
	font-weight: 600;
}

.tvcdt-modal .tvcdt-auth .tvcdt-auth-field input {
	height: 52px;
	margin-top: 8px;
	padding: 0 20px;
	border: 1px solid #cfcfcf;
	border-radius: 999px;
	color: #111;
	font-size: 16px;
}

.tvcdt-modal .tvcdt-auth .tvcdt-auth-field input::placeholder {
	color: #9a9a9a;
}

.tvcdt-modal .tvcdt-auth .tvcdt-auth-field input:focus {
	border-color: #111;
	box-shadow: none;
}

.tvcdt-modal .tvcdt-auth .tvcdt-auth-otp input {
	font-size: 22px;
	letter-spacing: 8px;
}

.tvcdt-modal .tvcdt-auth button.tvcdt-auth-btn {
	height: 52px !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: #111 !important;
	color: #fff !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	letter-spacing: .02em;
	text-transform: uppercase !important;
	box-shadow: none !important;
}

.tvcdt-modal .tvcdt-auth button.tvcdt-auth-btn:hover {
	background: #333 !important;
}

.tvcdt-modal .tvcdt-auth button.tvcdt-auth-btn:disabled {
	opacity: .6 !important;
}

.tvcdt-modal .tvcdt-auth button.tvcdt-auth-link,
.tvcdt-modal .tvcdt-auth button.tvcdt-auth-switch {
	color: #1f4fd1 !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	text-transform: none !important;
}

.tvcdt-modal .tvcdt-auth button.tvcdt-auth-link:disabled {
	opacity: .5 !important;
}

.tvcdt-modal .tvcdt-auth .tvcdt-auth-sent {
	margin: 0 0 14px;
	padding: 10px 14px;
	background: #f4f4f4;
	border-radius: 10px;
	color: #111;
	font-size: 14px;
}

.tvcdt-modal .tvcdt-auth .tvcdt-auth-msg {
	margin: 14px 0 0;
	min-height: 22px;
	font-size: 14px;
	text-align: left;
}

.tvcdt-modal .tvcdt-auth .tvcdt-auth-msg.is-err {
	color: #c0392b;
}

.tvcdt-modal .tvcdt-auth .tvcdt-auth-msg.is-ok {
	color: #0a7d32;
}

@keyframes tvcdt-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes tvcdt-rise {
	from { opacity: 0; transform: translateY(12px); }
	to { opacity: 1; transform: none; }
}

@media (max-width: 480px) {
	.tvcdt-modal-body {
		padding: 26px 20px 22px;
	}

	.tvcdt-modal .tvcdt-modal-title {
		font-size: 21px;
	}
}
