/**
 * Blocksy 登录/注册弹窗自定义样式
 * 覆盖 Blocksy 主题的默认弹窗样式
 */

/* 弹窗容器 */
#account-modal.ct-panel {
	/* 自定义弹窗容器样式 */
}

/* 弹窗内容区域 */
#account-modal .ct-panel-content {
	/* 自定义内容区域样式 */
}

/* 账户弹窗主体 */
#account-modal .ct-account-modal {
	/* 自定义账户弹窗主体样式 */
    border-radius: 16px;
    padding: 32px;
}

/* 标签切换（Login/Sign Up） */
#account-modal .ct-account-modal > ul {
	/* 自定义标签列表样式 */
	list-style: none;
	margin: 0 0 36px 0;
	padding: 0;
	display: flex;
	gap: 0;
}

#account-modal .ct-account-modal > ul li {
	/* 自定义标签项样式 */
	flex: 1;
	padding: 0;
    height: auto;
	text-align: center;
	cursor: pointer;
	transition: all 0.3s ease;
	color: rgba(0, 0, 0, 0.2);
    font-family: 'Bebas Neue', sans-serif;
	font-weight: 500;
    font-size: 36px;
    line-height: 40px;
    border-bottom: 0;
}
#account-modal .ct-account-modal > ul li:first-child {
    border-right: 0;
}
#account-modal .ct-account-modal > ul li:not(.active) {
    background: transparent;
}

#account-modal .ct-account-modal > ul li:hover {
	color: rgba(0, 0, 0, 1);
}

#account-modal .ct-account-modal > ul li.active {
	color: rgba(0, 0, 0, 1);
}

/* 表单容器 */
#account-modal .ct-account-forms {
	/* 自定义表单容器样式 */
	padding: 0;
}

#account-modal .ct-account-forms {
  scrollbar-width: thin;                 /* Firefox */
  scrollbar-color: #ddd transparent;
  padding-right: 12px;
}

/* WebKit (Chrome / Edge / Safari) */
#account-modal .ct-account-forms::-webkit-scrollbar {
  width: 6px;
}

#account-modal .ct-account-forms::-webkit-scrollbar-track {
  background: transparent;
}

#account-modal .ct-account-forms::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.35);
  border-radius: 6px;
}

#account-modal .ct-account-forms::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.55);
}

/* 登录表单 */
#account-modal .ct-login-form {
	/* 自定义登录表单样式 */
}

/* 注册表单 */
#account-modal .ct-register-form {
	/* 自定义注册表单样式 */
}

/* 忘记密码表单 */
#account-modal .ct-forgot-password-form {
	/* 自定义忘记密码表单样式 */
}

/* 表单字段 */
#account-modal form p {
	/* 自定义表单段落样式 */
	margin-bottom: 20px;
}
#account-modal .ct-account-modal form>*:last-of-type{
    margin-bottom: 0;
}
#account-modal form p.login-submit{
    margin-bottom: 0;
}

#account-modal form label {
	/* 自定义标签样式 */
	display: block;
	margin-bottom: 4px;
	font-weight: 400;
	color: #767676;
	font-size: 14px;
    line-height: 20px;
}
.ct-account-modal .login-remember span{

}
#account-modal form .input {
	/* 自定义输入框样式 */
	width: 100%;
	padding: 12px 14px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	line-height: 1.5;
	transition: all 0.3s ease;
}

#account-modal form .input:focus,
#account-modal form .input.focused {
	outline: none;
	border-color: var(--theme-palette-color-1);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-palette-color-1) 10%, transparent);
}

/* 密码输入框容器 */
#account-modal .account-password-input {
	position: relative;
	display: flex;
	align-items: center;
}

#account-modal .account-password-input .input {
	padding-right: 45px;
}

#account-modal .show-password-input {
	position: absolute;
	right: 12px;
	cursor: pointer;
	width: 18px;
	height: 18px;
    top: calc(var(--theme-form-field-height, 40px)/2 - 8px);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #ADB1CD;
    background-color: #ADB1CD;
	transition: color 0.3s ease;
}

#account-modal .show-password-input:hover {
	color: var(--theme-palette-color-1);
}

/* 记住我复选框 */
#account-modal .login-remember {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
}
#account-modal .ct-account-modal .login-remember input{
    --top: 2px;
}
#account-modal .login-remember label {
	margin-bottom: 0;
	font-weight: 400;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 8px;
    margin-left: 8px;
    color: #000;
}

#account-modal .login-remember input[type="checkbox"] {
	margin: 0;
	cursor: pointer;
}

/* 忘记密码链接 */
#account-modal .ct-forgot-password,
#account-modal .ct-forgot-password-static {
	color: #000;
	text-decoration: none;
	font-size: 14px;
	transition: color 0.3s ease;
}

#account-modal .ct-forgot-password:hover,
#account-modal .ct-forgot-password-static:hover {
	color: color-mix(in srgb, var(--theme-palette-color-1) 80%, black);
	text-decoration: underline;
}

/* 提交按钮 */
#account-modal .ct-button,
#account-modal button[type="submit"],
#account-modal .ct-account-login-submit {
	width: 100%;
	padding: 12px 24px;
	background-color: var(--theme-palette-color-1);
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 16px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.3s ease;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

#account-modal .ct-button:hover,
#account-modal button[type="submit"]:hover,
#account-modal .ct-account-login-submit:hover {
	background-color: color-mix(in srgb, var(--theme-palette-color-1) 80%, black);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px color-mix(in srgb, var(--theme-palette-color-1) 20%, transparent);
}

#account-modal .ct-button:active,
#account-modal button[type="submit"]:active,
#account-modal .ct-account-login-submit:active {
	transform: translateY(0);
}

/* 加载动画 */
#account-modal .ct-button-loader {
	animation: spin 0.6s linear infinite;
}

@keyframes spin {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

/* 返回登录链接 */
#account-modal .ct-back-to-login {
	display: inline-block;
	margin-top: 20px;
	color: var(--theme-palette-color-1);
	text-decoration: none;
	font-size: 14px;
	transition: color 0.3s ease;
}

#account-modal .ct-back-to-login:hover {
	color: color-mix(in srgb, var(--theme-palette-color-1) 80%, black);
	text-decoration: underline;
}

/* 关闭按钮 */
#account-modal .ct-panel-actions {
	/* 自定义关闭按钮容器样式 */
}

#account-modal .ct-toggle-close {
	/* 自定义关闭按钮样式 */
	position: absolute;
	top: 15px;
	right: 15px;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: none;
	cursor: pointer;
	color: #666;
	transition: all 0.3s ease;
	border-radius: 4px;
	z-index: 10;
}

#account-modal .ct-toggle-close:hover {
	background-color: #f5f5f5;
	color: var(--theme-palette-color-1);
}

#account-modal .ct-toggle-close .ct-icon {
	width: 16px;
	height: 16px;
}

/* 自定义下拉选择器样式 */
#account-modal .tooto-custom-select {
	position: relative;
	width: 100%;
}

#account-modal .tooto-custom-select-trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 14px;
	border: 1px solid #ddd;
	border-radius: 4px;
	background: #fff;
	cursor: pointer;
	transition: all 0.3s ease;
	font-size: 14px;
	line-height: 1.5;
}

#account-modal .tooto-custom-select-trigger:hover {
	border-color: var(--theme-palette-color-1);
}

#account-modal .tooto-custom-select-trigger.changed {
	border-color: var(--theme-palette-color-1);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-palette-color-1) 10%, transparent);
}

#account-modal .tooto-custom-select.open .tooto-custom-select-trigger {
	border-color: var(--theme-palette-color-1);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-palette-color-1) 10%, transparent);
}

#account-modal .tooto-custom-select-value {
	flex: 1;
	color: #333;
}

#account-modal .tooto-custom-select-arrow {
	width: 12px;
	height: 8px;
	margin-left: 10px;
	color: #666;
	transition: transform 0.3s ease;
}

#account-modal .tooto-custom-select.open .tooto-custom-select-arrow {
	transform: rotate(180deg);
}

#account-modal .tooto-custom-select-options {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
	margin-top: 4px;
	max-height: 0;
	overflow: hidden;
	opacity: 0;
	transform: translateY(-10px);
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	z-index: 1000;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	list-style: none;
	padding: 0;
}

#account-modal .tooto-custom-select.open .tooto-custom-select-options {
	max-height: 200px;
	opacity: 1;
	transform: translateY(0);
	overflow-y: auto;
}

#account-modal .tooto-custom-select-option {
	padding: 10px 14px;
	cursor: pointer;
	transition: background-color 0.2s ease;
	color: #333;
	font-size: 14px;
}

#account-modal .tooto-custom-select-option:hover {
	background-color: #f5f5f5;
}

#account-modal .tooto-custom-select-option.selected {
	background-color: color-mix(in srgb, var(--theme-palette-color-1) 10%, transparent);
	color: var(--theme-palette-color-1);
	font-weight: 500;
}

/* 文件上传样式 */
#account-modal .tooto-file-upload-wrapper {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}

#account-modal .tooto-upload-button {
	padding: 8px 20px;
	background: #fff;
	border: 1px solid var(--theme-palette-color-1);
	color: var(--theme-palette-color-1);
	border-radius: 99px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.3s ease;
	white-space: nowrap;
}

#account-modal .tooto-upload-button:hover {
	background-color: var(--theme-palette-color-1);
	color: #fff;
	transform: translateY(-1px);
	box-shadow: 0 2px 8px color-mix(in srgb, var(--theme-palette-color-1) 30%, transparent);
}

#account-modal .tooto-upload-button:active {
	transform: translateY(0);
}

#account-modal .tooto-file-name {
	font-size: 14px;
	color: #666;
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	display: none;
}

#account-modal .tooto-file-name:not(:empty) {
	display: block;
}

#account-modal .tooto-download-example {
	color: var(--theme-palette-color-1);
	text-decoration: underline;
	font-size: 14px;
	transition: color 0.3s ease;
	white-space: nowrap;
}

#account-modal .tooto-download-example:hover {
	color: color-mix(in srgb, var(--theme-palette-color-1) 80%, black);
}

/* 错误弹窗样式 */
.tooto-error-dialog {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1000000 !important; /* 确保在 account-modal (z-index: 999999) 之上 */
	display: flex;
	align-items: center;
	justify-content: center;
}

.tooto-error-dialog-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(4px);
}

.tooto-error-dialog-content {
	position: relative;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	max-width: 500px;
	width: 90%;
	max-height: 80vh;
	display: flex;
	flex-direction: column;
	z-index: 1;
	animation: tootoErrorDialogSlideIn 0.3s ease-out;
}

@keyframes tootoErrorDialogSlideIn {
	from {
		opacity: 0;
		transform: translateY(-20px) scale(0.95);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.tooto-error-dialog-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: none;
	cursor: pointer;
	color: #666;
	border-radius: 4px;
	transition: all 0.2s ease;
	z-index: 10;
}

.tooto-error-dialog-close:hover {
	background: #f5f5f5;
	color: #000;
}

.tooto-error-dialog-close svg {
	width: 16px;
	height: 16px;
}

.tooto-error-dialog-header {
	padding: 24px 24px 16px;
	border-bottom: 1px solid #eee;
}

.tooto-error-dialog-title {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
	color: #000;
}

.tooto-error-dialog-body {
	padding: 24px;
	flex: 1;
	overflow-y: auto;
}

.tooto-error-dialog-message {
	color: #666;
	line-height: 1.6;
	font-size: 14px;
}

.tooto-error-dialog-message p {
	margin: 0 0 12px 0;
}

.tooto-error-dialog-message p:last-child {
	margin-bottom: 0;
}

.tooto-error-dialog-message ul {
	margin: 0;
	padding-left: 20px;
}

.tooto-error-dialog-message li {
	margin-bottom: 8px;
}

.tooto-error-dialog-message li:last-child {
	margin-bottom: 0;
}

.tooto-error-dialog-footer {
	padding: 16px 24px 24px;
	border-top: 1px solid #eee;
	display: flex;
	justify-content: flex-end;
}

.tooto-error-dialog-button {
	padding: 10px 24px;
	background-color: var(--theme-palette-color-1);
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.3s ease;
}

.tooto-error-dialog-button:hover {
	background-color: color-mix(in srgb, var(--theme-palette-color-1) 80%, black);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px color-mix(in srgb, var(--theme-palette-color-1) 20%, transparent);
}

.tooto-error-dialog-button:active {
	transform: translateY(0);
}

body.tooto-error-dialog-open {
	overflow: hidden;
}

/* 响应式调整 */
@media (max-width: 767px) {
	#account-modal .ct-account-modal {
		padding: 16px;
		border-radius: 8px;
	}
	#account-modal .ct-account-modal > ul {
		margin-bottom: 18px;
	}
	#account-modal .ct-account-modal > ul li {
		padding: 0;
		font-size: 18px;
		line-height: 1.1;
	}

	#account-modal .tooto-file-upload-wrapper {
		flex-direction: column;
		align-items: flex-start;
	}

	#account-modal .tooto-upload-button {
		width: 100%;
		justify-content: center;
	}

	.tooto-error-dialog-content {
		width: 95%;
		max-height: 90vh;
	}
	#account-modal form label {
		font-size: 12px;
	}
	.tooto-error-dialog-header,
	.tooto-error-dialog-body,
	.tooto-error-dialog-footer {
		padding: 20px;
	}
	#account-modal form p {
		margin-bottom: 10px;
	}
	#account-modal .ct-forgot-password, #account-modal .ct-forgot-password-static {
		font-size: 12px;
	}
	#account-modal .ct-account-login-submit,#account-modal .ct-button {
		height: 35px;
		font-size: 13px;
		min-height: auto;
	}
	#account-modal .login-remember {
		flex-direction: row;
	}
	#account-modal form .input {
		min-height: auto;
		height: 40px;
	}
	#account-modal .tooto-upload-button {
		width: auto;
		font-size: 13px;
	}
}

