/**
 * Popup đăng nhập / đăng ký — design gift box TV88.
 */

.stream-auth-popup {
	position: fixed;
	inset: 0;
	z-index: 10050;
	display: none;
}

body.stream-auth-popup-open {
	overflow: hidden;
}

.stream-auth-popup.is-open {
	display: block;
}

.stream-auth-popup__overlay {
	position: absolute;
	inset: 0;
	background: #120000;
	opacity: 0.9;
}

.stream-auth-popup__dialog {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: min(92vw, 28rem);
	max-height: 95vh;
	overflow: visible;
}

.stream-auth-popup__box {
	position: relative;
	width: 100%;
	padding: 3.5rem 1.25rem 5rem;
	background-image: var(--stream-auth-bg);
	background-repeat: no-repeat;
	background-position: center top;
	background-size: 100% auto;
	box-sizing: border-box;
}

.stream-auth-popup__close {
	position: absolute;
	top: 0.35rem;
	right: -0.15rem;
	z-index: 5;
	padding: 0;
	border: none;
	background: transparent;
	cursor: pointer;
	line-height: 0;
}

.stream-auth-popup__close img {
	display: block;
	width: 2.25rem;
	height: auto;
}

.stream-auth-popup__close--text {
	font-size: 2rem;
	color: #fff;
	line-height: 1;
}

.stream-auth-popup__tabs {
	display: flex;
	justify-content: center;
	align-items: stretch;
	gap: 0.25rem;
	margin: 0 0 0.75rem;
	padding: 0 0.35rem;
	margin-bottom: 0;
	width: 70%;
    margin: 0 auto;
    padding-top: 15px;
}

.stream-auth-popup__tab {
	position: relative;
	flex: 1 1 0;
	max-width: 50%;
	padding: 0;
	border: none;
	background: transparent;
	cursor: pointer;
	line-height: 0;
	transition: transform 0.2s ease;
	margin: 0;
}

.stream-auth-popup__tab:hover {
	transform: translateY(-1px);
}

.stream-auth-popup__tab:focus-visible {
	outline: 2px solid #ffeb3b;
	outline-offset: 2px;
	border-radius: 8px;
}

.stream-auth-popup__tab-img {
	display: block;
	width: 100%;
	height: auto;
}

/* Tab inactive: hiển thị ảnh unactive */
.stream-auth-popup__tab .stream-auth-popup__tab-img--active {
	display: none;
}

.stream-auth-popup__tab .stream-auth-popup__tab-img--inactive {
	display: block;
}

/* Tab active: hiển thị ảnh active */
.stream-auth-popup__tab.is-active .stream-auth-popup__tab-img--active {
	display: block;
}

.stream-auth-popup__tab.is-active .stream-auth-popup__tab-img--inactive {
	display: none;
}

.stream-auth-popup__tab-label {
	display: inline-block;
	padding: 0.5rem 1rem;
	font-size: 0.9rem;
	font-weight: 700;
	color: #fff;
}

.stream-auth-popup__panels {
	position: relative;
	min-height: 14rem;
}

.stream-auth-popup__panel {
	display: none;
}

.stream-auth-popup__panel.is-active {
	display: block;
}

.stream-auth-popup__form {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	padding: 0 0.35rem;
	width: 60%;
	margin: 0 auto;
}

.stream-auth-popup__panel.stream-auth-popup__panel--register {
	padding-top: 1rem;
}

.stream-auth-popup__panel.stream-auth-popup__panel--login {
	padding-top: 2rem;
}
.stream-auth-popup__field {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 2.5rem;
	padding: 0 0.65rem 0 2.5rem;
	border-radius: 999px;
	background: linear-gradient(180deg, #ff8a65 0%, #e85d3a 55%, #d84320 100%);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
	color-scheme: dark;
}

.stream-auth-popup__field-icon {
	position: absolute;
	left: 0.85rem;
	width: 1.15rem;
	height: auto;
	pointer-events: none;
}

.stream-auth-popup__panel .stream-auth-popup__input,
.stream-auth-popup input.stream-auth-popup__input[type="text"],
.stream-auth-popup input.stream-auth-popup__input[type="password"],
.stream-auth-popup input.stream-auth-popup__input[type="tel"] {
	flex: 1;
	width: 100%;
	min-width: 0;
	padding: 0.65rem 0.25rem;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	background-color: transparent !important;
	color: #fff !important;
	-webkit-text-fill-color: #fff !important;
	caret-color: #fff;
	font-size: 0.95rem;
	font-weight: 600;
	outline: none !important;
	box-shadow: none !important;
	appearance: none;
	-webkit-appearance: none;
	margin: 0;
}

.stream-auth-popup__panel .stream-auth-popup__input:focus,
.stream-auth-popup__panel .stream-auth-popup__input:hover,
.stream-auth-popup__panel .stream-auth-popup__input:active,
.stream-auth-popup__panel .stream-auth-popup__input:valid,
.stream-auth-popup__panel .stream-auth-popup__input:invalid {
	border: 0 !important;
	background: transparent !important;
	background-color: transparent !important;
	color: #fff !important;
	-webkit-text-fill-color: #fff !important;
	box-shadow: none !important;
	outline: none !important;
}

/* Chrome/Safari autofill — tránh nền trắng + chữ đen */
.stream-auth-popup__panel .stream-auth-popup__input:-webkit-autofill,
.stream-auth-popup__panel .stream-auth-popup__input:-webkit-autofill:hover,
.stream-auth-popup__panel .stream-auth-popup__input:-webkit-autofill:focus,
.stream-auth-popup__panel .stream-auth-popup__input:-webkit-autofill:active {
	-webkit-text-fill-color: #fff !important;
	caret-color: #fff;
	border: 0 !important;
	/* Màu khớp pill cam — che nền autofill */
	-webkit-box-shadow: 0 0 0 1000px #e85d3a inset !important;
	box-shadow: 0 0 0 1000px #e85d3a inset !important;
	transition: background-color 60000s ease-in-out 0s;
}

.stream-auth-popup__input::placeholder {
	color: rgba(255, 255, 255, 0.92) !important;
	opacity: 1;
	font-weight: 500;
}

.stream-auth-popup__toggle-pass {
	position: absolute;
	right: 0.5rem;
	padding: 0.25rem;
	border: none;
	background: transparent;
	cursor: pointer;
	line-height: 0;
	margin: 0;
}

.stream-auth-popup__toggle-pass img {
	width: 1.25rem;
	height: auto;
	margin: 0;
}

.stream-auth-popup__error {
	margin: 0.15rem 0 0;
	padding: 0 0.25rem;
	font-size: 0.8rem;
	line-height: 1.35;
	color: red;
	text-align: center;
	background: #fdd9ac;
	border-radius: 10px;
}

.stream-auth-popup__error:not([hidden]) {
	display: block;
}

.stream-auth-popup__submit {
	display: block;
	width: 100%;
	margin: 0.35rem auto 0;
	padding: 0;
	border: none;
	background: transparent;
	cursor: pointer;
	line-height: 0;
	transition: transform 0.2s ease, filter 0.2s ease;
	position: absolute;
	bottom: -3rem;
	left: 0;
}

.stream-auth-popup__submit img {
	display: block;
	width: min(100%, 16rem);
	height: auto;
	margin: 0 auto;
}

.stream-auth-popup__submit:hover {
	transform: translateY(-2px);
	filter: brightness(1.05);
}

.stream-auth-popup__submit:disabled {
	opacity: 0.65;
	cursor: wait;
	transform: none;
}

/* Nút trigger (header, shortcode) */
.stream-auth-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.4rem 1rem;
	border: 1px solid #e85d04;
	border-radius: 999px;
	background: transparent;
	color: #e85d04;
	font-size: 0.875rem;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease;
}

.stream-auth-trigger:hover {
	background: #e85d04;
	color: #fff;
}

@media (max-width: 767px) {
	.stream-auth-popup__dialog {
		width: min(94vw, 22rem);
	}

	.stream-auth-popup__box {
		padding: 3rem 0.85rem 1.25rem;
	}

	.stream-auth-popup__field {
		min-height: 1rem;
		padding-left: 2rem;
	}

	.stream-auth-popup__input {
		font-size: 0.875rem;
	}

	.stream-auth-popup__submit {
		bottom: 0.4rem;
	}

	.stream-auth-popup__tabs, .stream-auth-popup__panel.stream-auth-popup__panel--register {
		padding-top: 5px;
	}
}
