/*
 * =============================================================================
 * Teleffon — Ultimate Member custom styles
 * Авторизация, регистрация, полоска надёжности пароля
 * =============================================================================
 */

/* --------------------------------------------------------------------------
   Общие стили форм UM
   -------------------------------------------------------------------------- */

.um-form,
.um .um-form {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Поля ввода */
.um .um-field input[type="text"],
.um .um-field input[type="email"],
.um .um-field input[type="password"],
.um .um-field textarea {
	border: 1px solid #e2e8f0 !important;
	border-radius: 8px !important;
	padding: 10px 14px !important;
	font-size: 14px !important;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
	color: #1e293b !important;
	transition: border-color 0.2s, box-shadow 0.2s !important;
	background: #fff !important;
}

.um .um-field input[type="text"]:focus,
.um .um-field input[type="email"]:focus,
.um .um-field input[type="password"]:focus {
	border-color: var(--e-global-color-primary, #f7c045) !important;
	outline: none !important;
	box-shadow: 0 0 0 3px rgba(247, 192, 69, 0.12) !important;
}

/* Лейблы */
.um .um-field-label {
	font-size: 13px !important;
	font-weight: 500 !important;
	color: #475569 !important;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* --------------------------------------------------------------------------
   Кнопки
   -------------------------------------------------------------------------- */

/* Основная кнопка (Войти / Зарегистрироваться) */
.um .um-button,
.um a.um-button,
.um button.um-button {
	background-color: var(--e-global-color-primary, #f7c045) !important;
	color: #1e293b !important;
	border: none !important;
	border-radius: 8px !important;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	padding: 12px 28px !important;
	transition: background-color 0.2s ease, transform 0.1s ease !important;
	cursor: pointer !important;
	letter-spacing: 0.01em !important;
}

.um .um-button:hover,
.um a.um-button:hover {
	background-color: #e8b23a !important;
	color: #1e293b !important;
	transform: translateY(-1px) !important;
}

/* Вторичная кнопка (ссылка-кнопка) */
.um .um-alt-icon-btn,
.um .um-button.um-alt {
	background-color: transparent !important;
	color: #64748b !important;
	border: 1px solid #e2e8f0 !important;
}

.um .um-alt-icon-btn:hover,
.um .um-button.um-alt:hover {
	background-color: #f8fafc !important;
	color: #1e293b !important;
}

/* --------------------------------------------------------------------------
   Ссылки внутри форм
   -------------------------------------------------------------------------- */

.um .um-form a,
.um-login .um-form a,
.um-register .um-form a {
	color: #475569;
	font-size: 13px;
	text-decoration: underline;
}

.um .um-form a:hover {
	color: #1e293b;
}

/* Плашка «Обновите профиль» — единый шрифт в одной фразе */
.um-profile-note a {
	font-family: inherit !important;
	font-size: inherit !important;
	font-weight: inherit !important;
}

/* --------------------------------------------------------------------------
   Описание под заголовком страницы регистрации
   -------------------------------------------------------------------------- */

.teleffon-register-desc {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 15px;
	line-height: 1.6;
	color: #64748b;
	margin-top: 8px;
	margin-bottom: 28px;
}

/* --------------------------------------------------------------------------
   Полоска надёжности пароля
   -------------------------------------------------------------------------- */

/* Контейнер */
.um .um-field-password .um-password-progress,
.um .um-field .um-password-progress {
	margin-top: 8px;
	height: 6px;
	background-color: #e2e8f0;
	border-radius: 9999px;
	overflow: hidden;
}

/* Индикатор */
.um .um-field-password .um-password-progress-bar,
.um .um-field .um-password-progress-bar {
	height: 100%;
	border-radius: 9999px;
	transition: width 0.3s ease, background-color 0.3s ease;
}

/* Уровни надёжности по data-strength / классам */
.um .um-password-progress-bar.um-progress-short,
.um .um-password-progress-bar[data-strength="1"] {
	background-color: #ef4444; /* красный — слабый */
}

.um .um-password-progress-bar.um-progress-medium,
.um .um-password-progress-bar[data-strength="2"] {
	background-color: #f97316; /* оранжевый — средний */
}

.um .um-password-progress-bar.um-progress-good,
.um .um-password-progress-bar[data-strength="3"] {
	background-color: #eab308; /* жёлтый — хороший */
}

.um .um-password-progress-bar.um-progress-strong,
.um .um-password-progress-bar[data-strength="4"] {
	background-color: #22c55e; /* зелёный — сильный */
}

/* Текстовое описание надёжности */
.um .um-field-password .um-password-strength,
.um .um-field .um-password-strength {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 12px;
	color: #94a3b8;
	margin-top: 4px;
}

/* --------------------------------------------------------------------------
   Модальное окно (modal popup)
   -------------------------------------------------------------------------- */

.um-modal,
#um-modal {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.um-modal .um-modal-header {
	border-bottom: 1px solid #f1f5f9;
	padding-bottom: 16px;
	margin-bottom: 20px;
}

.um-modal .um-modal-header h3 {
	font-size: 20px;
	font-weight: 700;
	color: #1e293b;
	letter-spacing: -0.02em;
}

.um-modal-overlay {
	background: rgba(15, 23, 42, 0.6) !important;
}

/* --------------------------------------------------------------------------
   Уведомления / ошибки
   -------------------------------------------------------------------------- */

.um .um-notice.err {
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 8px;
	color: #b91c1c;
	padding: 10px 14px;
	font-size: 13px;
	margin-bottom: 12px;
}

.um .um-notice.success {
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	border-radius: 8px;
	color: #166534;
	padding: 10px 14px;
	font-size: 13px;
}

/* --------------------------------------------------------------------------
   Профиль UM: баннер, аватар, имя, описание, кнопка настроек, нижнее меню
   -------------------------------------------------------------------------- */

.um-profile .um-cover,
.um-profile .um-cover-e {
	border-radius: 12px;
	overflow: hidden;
}

.um-profile .um-cover-e img {
	object-fit: cover;
}

.um-profile .um-profile-photo,
.um-profile .um-profile-photo a.um-profile-photo-img,
.um-profile .um-profile-photo img {
	border-radius: 50%;
	border: 3px solid #fff;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.um-profile .um-name,
.um-profile .um-name a {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
	font-size: 22px !important;
	font-weight: 700 !important;
	color: #1e293b !important;
	letter-spacing: -0.02em;
}

.um-profile .um-name a:hover {
	color: var(--e-global-color-primary, #f7c045) !important;
}

.um-profile .um-meta {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
	font-size: 14px !important;
	line-height: 1.5 !important;
	color: #64748b !important;
	margin-top: 4px;
}

/* Текст «о себе» (um-meta-text) — ниже аватара, без перекрытия */
.um-profile .um-header .um-meta-text {
	margin-top: 24px !important;
}

/* Блок с ником и «о себе» — ниже аватара, без перекрытия */
.um-profile .um-profile-meta,
.um-profile .um-main-meta {
	margin-top: 32px !important;
	padding-top: 0;
	min-height: 0;
}

/* Шестерёнка настроек — по центру, без оранжевого фона и анимации */
.um-profile .um-header {
	position: relative;
}

.um-profile .um-profile-edit {
	position: absolute !important;
	top: 15px !important;
	left: 50% !important;
	right: auto !important;
	transform: translateX(-50%) !important;
	margin: 0 !important;
	z-index: 200 !important;
	pointer-events: auto !important;
}

.um-profile .um-profile-edit a,
.um-profile a.um-profile-edit-a {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 40px !important;
	height: 40px !important;
	background-color: #fff !important;
	color: #475569 !important;
	border: 1px solid #e2e8f0 !important;
	border-radius: 50% !important;
	font-size: 18px !important;
	padding: 0 !important;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
	cursor: pointer !important;
	position: relative !important;
	z-index: 102 !important;
}

.um-profile .um-profile-edit a:hover,
.um-profile a.um-profile-edit-a:hover {
	background-color: #f8fafc !important;
	color: #1e293b !important;
}

.um-profile .um-profile-edit a.active,
.um-profile .um-profile-edit a.um-profile-edit-a.active {
	background-color: #f8fafc !important;
}

.um-profile .um-profile-edit i {
	font-size: 18px !important;
}

/* Dropdown меню шестерёнки */
.um-profile .um-profile-edit .um-dropdown {
	z-index: 101 !important;
	left: 50% !important;
	right: auto !important;
	margin-left: -150px !important;
	width: 300px !important;
	min-width: 300px !important;
	max-width: 90vw !important;
	border-radius: 8px !important;
	border: 1px solid #e2e8f0 !important;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
	background: #fff !important;
	padding: 12px 10px 10px !important;
	box-sizing: border-box !important;
	text-align: left !important;
	overflow: hidden !important;
}

.um-profile .um-profile-edit .um-dropdown .um-dropdown-b {
	position: relative !important;
	padding: 0 !important;
	overflow: hidden !important;
}

.um-profile .um-profile-edit .um-dropdown .um-dropdown-arr {
	position: absolute !important;
	top: -17px !important;
	left: 50% !important;
	right: auto !important;
	margin-left: -12px !important;
	width: 24px !important;
	height: 24px !important;
	overflow: hidden !important;
	pointer-events: none !important;
}

.um-profile .um-profile-edit .um-dropdown .um-dropdown-arr i {
	display: block !important;
}

.um-profile .um-profile-edit .um-dropdown ul {
	display: block !important;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.um-profile .um-profile-edit .um-dropdown li {
	display: block !important;
	margin: 0 0 6px 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.um-profile .um-profile-edit .um-dropdown li:last-child {
	margin-bottom: 0 !important;
}

.um-profile .um-profile-edit .um-dropdown li a {
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	box-sizing: border-box !important;
	padding: 10px 12px !important;
	font-size: 14px !important;
	line-height: 1.4 !important;
	color: #475569 !important;
	text-decoration: none !important;
	border-radius: 6px !important;
	white-space: normal !important;
	word-wrap: break-word !important;
	overflow-wrap: break-word !important;
}

.um-profile .um-profile-edit .um-dropdown li a:hover {
	background: #f1f5f9 !important;
	color: #1e293b !important;
}

/* Скрыть пункт «Отмена» */
.um-profile .um-profile-edit .um-dropdown li:has(> a.um-dropdown-hide) {
	display: none !important;
}

.um-profile .um-profile-edit .um-dropdown-arr i {
	color: #fff !important;
}

/* um-header: не overflow:hidden — иначе обрезает аватар, накладывающийся на баннер */

.um-profile .um-name,
.um-profile .um-name a {
	white-space: normal;
	word-wrap: break-word;
	overflow-wrap: break-word;
}

.um-profile .um-meta {
	word-wrap: break-word;
	overflow-wrap: break-word;
}

.um-profile .um-profile-nav {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 8px;
	margin-top: 20px;
	display: flex !important;
	flex-wrap: wrap !important;
	gap: 8px !important;
	text-align: left !important;
}

.um-profile .um-profile-nav-item {
	flex-shrink: 0;
	float: none !important;
}

.um-profile .um-profile-nav-item a {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	color: #475569 !important;
	border-radius: 6px !important;
	padding: 8px 12px !important;
	transition: background 0.2s, color 0.2s !important;
	display: inline-flex !important;
	align-items: center !important;
	gap: 6px !important;
	white-space: nowrap !important;
	overflow: hidden !important;
	text-overflow: ellipsis !important;
	max-width: 100% !important;
	float: none !important;
	position: relative !important;
}

.um-profile .um-profile-nav-item a i {
	flex-shrink: 0 !important;
	font-size: 14px !important;
	position: static !important;
	top: auto !important;
	left: auto !important;
	display: inline-block !important;
}

.um-profile .um-profile-nav-item a span.title {
	overflow: hidden !important;
	text-overflow: ellipsis !important;
	min-width: 0 !important;
}

.um-profile .um-profile-nav-item a:hover {
	background: #f1f5f9 !important;
	color: #1e293b !important;
}

.um-profile .um-profile-nav-item.active a,
.um-profile .um-profile-nav-item.um-active a {
	background: #fff !important;
	color: var(--e-global-color-primary, #f7c045) !important;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* Скрыть дубликат ссылок на десктопе (UM выводит 2 ссылки: мобильную и десктопную) */
@media (min-width: 801px) {
	.um-profile .um-profile-nav-item a.uimob340-show,
	.um-profile .um-profile-nav-item a.uimob500-show,
	.um-profile .um-profile-nav-item a.uimob800-show,
	.um-profile .um-profile-nav-item a.uimob960-show {
		display: none !important;
	}
}

/* --------------------------------------------------------------------------
   Страница настроек UM (Account)
   -------------------------------------------------------------------------- */

.um.um-account {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	max-width: 960px;
	margin: 0 auto;
}

.um-account .um-form form {
	display: flex;
	flex-wrap: wrap;
	gap: 32px;
	align-items: flex-start;
}

.um-account .um-account-side {
	float: none;
	width: 220px;
	flex-shrink: 0;
	padding: 0;
}

.um-account .um-account-side ul {
	border: none !important;
	border-radius: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
	background: transparent;
}

.um-account .um-account-side li {
	margin-bottom: 0 !important;
	background: transparent !important;
}

.um-account .um-account-side li a {
	display: flex !important;
	align-items: center;
	gap: 10px;
	padding: 12px 16px !important;
	height: auto !important;
	line-height: 1.4 !important;
	border-radius: 8px !important;
	border: 1px solid #e2e8f0 !important;
	background: #fff !important;
	color: #475569 !important;
	text-decoration: none !important;
	transition: background 0.2s, color 0.2s, border-color 0.2s !important;
}

.um-account .um-account-side li a:hover {
	background: #f8fafc !important;
	color: #1e293b !important;
	border-color: #cbd5e1 !important;
}

.um-account .um-account-side li a.current,
.um-account .um-account-side li a.current:hover {
	background: var(--e-global-color-primary, #f7c045) !important;
	color: #1e293b !important;
	border-color: var(--e-global-color-primary, #f7c045) !important;
	font-weight: 600 !important;
}

.um-account .um-account-side li a span.um-account-icon {
	border-right: none !important;
	float: none !important;
	padding: 0 !important;
	width: auto !important;
	height: auto !important;
	font-size: 18px !important;
	color: inherit !important;
}

.um-account .um-account-side li a span.um-account-title {
	float: none !important;
	padding-left: 0 !important;
	height: auto !important;
	line-height: inherit !important;
}

.um-account .um-account-side li a span.um-account-arrow {
	display: none;
}

.um-account .um-account-main {
	float: none;
	flex: 1;
	min-width: 280px;
	padding: 0;
}

.um-account .um-account-main div.um-account-heading {
	font-size: 20px !important;
	font-weight: 700 !important;
	color: #1e293b !important;
	margin-bottom: 20px !important;
}

.um-account .um-account-main div.um-account-heading i {
	font-size: 22px !important;
	margin-right: 10px !important;
	color: var(--e-global-color-primary, #f7c045) !important;
}

.um-account .um-account-meta {
	text-align: center;
	margin-bottom: 0;
	padding: 20px;
	padding-top: 28px;
	background: #f8fafc;
	border-radius: 12px;
	border: 1px solid #e2e8f0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
}

.um-account .um-account-side .um-account-meta {
	margin-bottom: 20px;
}

.um-account .um-account-meta img {
	border-radius: 50%;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* Блок с ником и «о себе» — ниже аватара, без перекрытия */
.um-account .um-account-name {
	clear: both;
	margin-top: 8px;
}

.um-account .um-account-name a {
	font-weight: 700 !important;
	font-size: 18px !important;
	color: #1e293b !important;
}

.um-account .um-account-profile-link a {
	font-size: 14px !important;
	color: #64748b !important;
}

/* Мобильный блок meta (uimob340-show) — на всю ширину */
.um-account .um-account-meta.uimob340-show,
.um-account .um-account-meta.uimob500-show {
	width: 100%;
	margin-bottom: 20px;
}

/* Мобильная навигация настроек (um-account-nav) */
.um-account .um-account-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 20px;
}

.um-account .um-account-nav a {
	display: flex !important;
	align-items: center;
	gap: 8px;
	padding: 10px 14px !important;
	height: auto !important;
	line-height: 1.4 !important;
	border-radius: 8px !important;
	border: 1px solid #e2e8f0 !important;
	background: #fff !important;
	color: #475569 !important;
	text-decoration: none !important;
	transition: background 0.2s, color 0.2s !important;
}

.um-account .um-account-nav a.current {
	background: var(--e-global-color-primary, #f7c045) !important;
	color: #1e293b !important;
	border-color: var(--e-global-color-primary, #f7c045) !important;
	font-weight: 600 !important;
}

.um-account .um-account-nav span.ico {
	position: static !important;
	margin-left: 12px;
	flex-shrink: 0;
	font-size: 18px;
}

.um-account .um-account-nav span.arr {
	display: none;
}

.um-account .um-account-tab {
	padding: 24px 0;
	border-top: 1px solid #e2e8f0;
}

/* --------------------------------------------------------------------------
   Мобильная адаптация
   -------------------------------------------------------------------------- */

/* LK: sidebar — без подчёркиваний у ссылок */
.lk-sidebar .lk-sidebar__link,
.lk-sidebar__link {
	text-decoration: none !important;
}

@media (max-width: 768px) {
	/* LK: sidebar сверху, пункты в ряд с переносом */
	.lk-wrapper {
		flex-direction: column;
		padding: 16px 12px;
		gap: 20px;
	}

	.lk-sidebar-wrap {
		width: 100%;
		order: -1;
	}

	.lk-sidebar__list {
		display: flex;
		flex-wrap: wrap;
		gap: 6px;
	}

	.lk-sidebar__item {
		flex: 1 1 auto;
		min-width: fit-content;
	}

	.lk-sidebar__link {
		padding: 8px 12px;
		font-size: 13px;
	}

	.lk-content {
		width: 100%;
	}

	/* Профиль UM: табы в колонку */
	.um-profile .um-profile-nav {
		flex-direction: column;
		gap: 6px;
	}

	.um-profile .um-profile-nav-item a {
		justify-content: flex-start;
		width: 100%;
	}

	/* Настройки UM: main на всю ширину */
	.um-account .um-account-main {
		flex: 1 1 100%;
		min-width: 100%;
	}

	.um-account .um-account-side ul {
		flex-direction: column;
	}

	.um-account .um-account-side li a {
		width: 100%;
	}

	.um-account .um-account-tab {
		padding: 16px 0;
	}

	.um-account .um-account-main div.um-account-heading {
		font-size: 18px !important;
	}

	.um-account .um-form form {
		gap: 20px;
	}
}

@media (max-width: 480px) {
	.lk-sidebar__list {
		flex-direction: column;
	}

	.um-profile .um-name,
	.um-profile .um-name a {
		font-size: 18px !important;
	}

	.um-profile .um-profile-nav-item a {
		padding: 10px 12px !important;
		font-size: 13px !important;
	}
}
