/* =============================================================
   Hub Child — WooCommerce Account, Auth & Popup
   Tokens (all px, no em chains):
     primary  #184341   Hub green
     telegram #229ed9   Telegram blue
     border   #e5e7eb
     text     #374151
     muted    #9ca3af
   ============================================================= */

/* ── Resets: undo Hub / Woo overrides ─────────────────────── */

.lqd-account-nav ul,
.lqd-account-nav li {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Undo Woo float-based layout inside our grid wrapper */
.lqd-myaccount-wrap .woocommerce-MyAccount-navigation,
.lqd-myaccount-wrap .woocommerce-MyAccount-content {
	float: none;
	width: auto;
}

/* Hub restricts logged-out .woocommerce to 50% — undo */
.woocommerce-account:not(.logged-in) > .container > .woocommerce {
	width: auto !important;
	margin: 0 !important;
	max-width: none !important;
}

/* ── Logged-in: two-column grid ────────────────────────────── */

.lqd-myaccount-wrap {
	display: grid;
	grid-template-columns: 220px 1fr;
	gap: 28px;
	align-items: flex-start;
}

/* ── Navigation sidebar ────────────────────────────────────── */

.woocommerce-MyAccount-navigation.lqd-account-nav {
	padding: 0 !important;
	border: 1px solid #e5e7eb !important;
	border-radius: 10px !important;
	background: #fff;
	overflow: hidden;
}

.lqd-account-nav li {
	border-bottom: 1px solid #f3f4f6;
}
.lqd-account-nav li:last-child {
	border-bottom: none;
}

/* Feather SVG icon */
.lqd-account-nav__icon {
	display: flex;
	flex-shrink: 0;
	color: #9ca3af;
	transition: color 0.15s;
}

/* Override Hub's `display:block` – must use !important here */
.woocommerce-MyAccount-navigation.lqd-account-nav li a {
	display: flex !important;
	align-items: center;
	gap: 10px;
	padding: 13px 18px;
	font-family: "Rubik", sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.4;
	color: #374151;
	text-decoration: none;
	transition: color 0.15s, background 0.15s;
	border-left: 3px solid transparent;
}

.woocommerce-MyAccount-navigation.lqd-account-nav li a:hover {
	color: #184341;
	background: #f9fafb;
}

.woocommerce-MyAccount-navigation.lqd-account-nav li a:hover .lqd-account-nav__icon,
.woocommerce-MyAccount-navigation.lqd-account-nav li.is-active a .lqd-account-nav__icon {
	color: #184341;
}

.woocommerce-MyAccount-navigation.lqd-account-nav li.is-active a,
.woocommerce-MyAccount-navigation.lqd-account-nav li a[aria-current="page"] {
	color: #184341;
	font-weight: 600;
	background: rgba(24, 67, 65, 0.05);
	border-left-color: #184341;
}

/* Telegram nav accent */
.woocommerce-MyAccount-navigation.lqd-account-nav
.woocommerce-MyAccount-navigation-link--telegram a:hover,
.woocommerce-MyAccount-navigation.lqd-account-nav
.woocommerce-MyAccount-navigation-link--telegram.is-active a {
	color: #229ed9;
	background: rgba(34, 158, 217, 0.05);
	border-left-color: #229ed9;
}

.woocommerce-MyAccount-navigation.lqd-account-nav
.woocommerce-MyAccount-navigation-link--telegram a:hover .lqd-account-nav__icon,
.woocommerce-MyAccount-navigation.lqd-account-nav
.woocommerce-MyAccount-navigation-link--telegram.is-active a .lqd-account-nav__icon {
	color: #229ed9;
}

/* Kill Hub's lqd-essentials ::before icons on our nav */
.woocommerce-MyAccount-navigation.lqd-account-nav li a::before {
	display: none !important;
}

/* ── Content area ──────────────────────────────────────────── */

.woocommerce-MyAccount-content {
	min-width: 0;
}

/* ── Dashboard ─────────────────────────────────────────────── */

.lqd-dashboard {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.lqd-dashboard-header {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 20px 22px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
}

.lqd-dashboard-header__avatar {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid #e5e7eb;
	flex-shrink: 0;
}

.lqd-dashboard-header__name {
	margin: 0 0 3px;
	font-family: "Manrope", sans-serif;
	font-size: 18px;
	font-weight: 700;
	color: #111827;
	line-height: 1.3;
}

.lqd-dashboard-header__sub {
	margin: 0;
	font-size: 13px;
	color: #9ca3af;
}

.lqd-dashboard-header__sub a {
	color: #6b7280;
	text-decoration: underline;
}

.lqd-dashboard-tiles {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
}

.lqd-dashboard-tile {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 18px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	color: #374151;
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.3;
	transition: border-color 0.15s, box-shadow 0.15s, color 0.15s;
}

.lqd-dashboard-tile:hover {
	border-color: #184341;
	box-shadow: 0 2px 12px rgba(24, 67, 65, 0.08);
	color: #184341;
}

.lqd-dashboard-tile__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	flex-shrink: 0;
	border-radius: 8px;
	background: #f3f4f6;
	color: #6b7280;
	transition: background 0.15s, color 0.15s;
}

.lqd-dashboard-tile:hover .lqd-dashboard-tile__icon {
	background: rgba(24, 67, 65, 0.08);
	color: #184341;
}

.lqd-dashboard-tile__label { flex: 1; }

.lqd-dashboard-tile__arrow {
	color: #d1d5db;
	flex-shrink: 0;
	transition: color 0.15s, transform 0.15s;
}

.lqd-dashboard-tile:hover .lqd-dashboard-tile__arrow {
	color: #184341;
	transform: translateX(2px);
}

/* Telegram tile */
.lqd-dashboard-tile--telegram:hover {
	border-color: #229ed9;
	box-shadow: 0 2px 12px rgba(34, 158, 217, 0.1);
	color: #229ed9;
}

.lqd-dashboard-tile--telegram .lqd-dashboard-tile__icon {
	background: rgba(34, 158, 217, 0.08);
	color: #229ed9;
}

.lqd-dashboard-tile--telegram:hover .lqd-dashboard-tile__icon {
	background: rgba(34, 158, 217, 0.14);
	color: #229ed9;
}

.lqd-dashboard-tile--telegram:hover .lqd-dashboard-tile__arrow {
	color: #229ed9;
}

/* ── Auth form (shared — page & popup) ─────────────────────── */

.lqd-auth-wrap {
	display: flex;
	justify-content: center;
}

.lqd-auth-card {
	width: 100%;
	max-width: 520px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	overflow: hidden;
}

/* Tabs */
.lqd-auth-tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	border-bottom: 1px solid #e5e7eb;
}

.lqd-auth-tab {
	padding: 16px 12px;
	background: transparent;
	border: none;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	font-family: "Rubik", sans-serif;
	font-size: 14px;
	font-weight: 500;
	color: #9ca3af;
	cursor: pointer;
	transition: color 0.15s, border-color 0.15s;
}

.lqd-auth-tab:hover { color: #374151; }

.lqd-auth-tab.is-active {
	color: #184341;
	border-bottom-color: #184341;
	font-weight: 600;
}

/* Panels */
.lqd-auth-panel {
	padding: 28px 32px 24px;
}

.lqd-auth-heading {
	margin: 0 0 22px;
	font-family: "Manrope", sans-serif;
	font-size: 22px;
	font-weight: 700;
	color: #111827;
}

/* Fields */
.lqd-auth-fields {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-bottom: 22px;
}

.lqd-auth-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.lqd-auth-label {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 13px;
	font-weight: 500;
	color: #374151;
	line-height: 1.4;
}

.lqd-auth-label .required {
	color: #ef4444;
	margin-left: 2px;
}

.lqd-auth-forgot {
	font-size: 12px;
	font-weight: 400;
	color: #9ca3af;
	text-decoration: none;
	transition: color 0.15s;
}
.lqd-auth-forgot:hover { color: #184341; }

/* Inputs — hard px, override Hub + Woo */
.lqd-auth-input,
.lqd-auth-card .woocommerce-Input--text,
.lqd-auth-popup .woocommerce-Input--text,
.lqd-auth-card input[type="text"],
.lqd-auth-card input[type="email"],
.lqd-auth-card input[type="password"],
.lqd-auth-popup input[type="text"],
.lqd-auth-popup input[type="email"],
.lqd-auth-popup input[type="password"] {
	display: block !important;
	width: 100% !important;
	height: 44px !important;
	padding: 0 14px !important;
	border: 1px solid #d1d5db !important;
	border-radius: 7px !important;
	font-family: "Rubik", sans-serif !important;
	font-size: 15px !important;
	color: #111827 !important;
	background: #fff !important;
	box-shadow: none !important;
	transition: border-color 0.15s, box-shadow 0.15s !important;
	box-sizing: border-box !important;
}

.lqd-auth-card .woocommerce-Input--text:focus,
.lqd-auth-popup .woocommerce-Input--text:focus,
.lqd-auth-card input[type="text"]:focus,
.lqd-auth-card input[type="email"]:focus,
.lqd-auth-card input[type="password"]:focus,
.lqd-auth-popup input[type="text"]:focus,
.lqd-auth-popup input[type="email"]:focus,
.lqd-auth-popup input[type="password"]:focus {
	border-color: #184341 !important;
	box-shadow: 0 0 0 3px rgba(24, 67, 65, 0.1) !important;
	outline: none !important;
}

/* Footer row */
.lqd-auth-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.lqd-auth-footer--register {
	flex-direction: column;
	align-items: stretch;
	gap: 14px;
}

.lqd-auth-remember {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: #6b7280;
	cursor: pointer;
	flex-shrink: 0;
}

.lqd-auth-remember input[type="checkbox"] {
	width: 15px;
	height: 15px;
	accent-color: #184341;
	flex-shrink: 0;
}

/* Submit button */
.lqd-auth-submit,
.lqd-auth-submit.button {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	height: 44px !important;
	padding: 0 26px !important;
	background: #184341 !important;
	color: #fff !important;
	border: none !important;
	border-radius: 7px !important;
	font-family: "Rubik", sans-serif !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	cursor: pointer;
	transition: background 0.15s, box-shadow 0.15s !important;
	box-shadow: none !important;
	text-decoration: none !important;
	white-space: nowrap;
	transform: none !important;
}

.lqd-auth-submit:hover,
.lqd-auth-submit.button:hover {
	background: #0f2e2d !important;
	color: #fff !important;
	box-shadow: 0 4px 14px rgba(24, 67, 65, 0.22) !important;
	transform: none !important;
}

.lqd-auth-footer--register .lqd-auth-submit {
	width: 100%;
}

.lqd-auth-terms {
	margin: 0;
	font-size: 12px;
	color: #9ca3af;
	line-height: 1.5;
}
.lqd-auth-terms a { color: #6b7280; text-decoration: underline; }

/* Switch link */
.lqd-auth-switch {
	margin: 16px 32px 20px;
	font-size: 13px;
	color: #9ca3af;
	text-align: center;
}

.lqd-auth-switch-btn {
	background: none;
	border: none;
	padding: 0;
	font-family: "Rubik", sans-serif;
	font-size: 13px;
	font-weight: 600;
	color: #184341;
	cursor: pointer;
	text-decoration: underline;
}

.lqd-auth-hint {
	margin: 0;
	font-size: 13px;
	color: #9ca3af;
	line-height: 1.5;
}

/* Telegram connect panel inside auth form */
.lqd-auth-panel .wctg-connect {
	margin-bottom: 20px;
	border-radius: 8px;
}

/* Woo notices inside auth card / popup */
.lqd-auth-card .woocommerce-notices-wrapper,
.lqd-auth-popup .woocommerce-notices-wrapper {
	padding: 0 32px;
}

/* ── Auth popup overlay ─────────────────────────────────────── */

.lqd-auth-popup {
	position: fixed;
	inset: 0;
	z-index: 999999;
	background: rgba(0, 0, 0, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px 16px;
	/* open animation */
	animation: lqdPopupFadeIn 0.2s ease both;
}

.lqd-auth-popup[hidden] {
	display: none !important;
}

.lqd-auth-popup.lqd-popup-closing {
	animation: lqdPopupFadeOut 0.2s ease both;
}

@keyframes lqdPopupFadeIn {
	from { opacity: 0; }
	to   { opacity: 1; }
}
@keyframes lqdPopupFadeOut {
	from { opacity: 1; }
	to   { opacity: 0; }
}

.lqd-auth-popup__inner {
	width: 100%;
	max-width: 500px;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
	animation: lqdPopupSlideIn 0.22s ease both;
}

.lqd-auth-popup.lqd-popup-closing .lqd-auth-popup__inner {
	animation: lqdPopupSlideOut 0.2s ease both;
}

@keyframes lqdPopupSlideIn {
	from { transform: translateY(16px); opacity: 0; }
	to   { transform: translateY(0);    opacity: 1; }
}
@keyframes lqdPopupSlideOut {
	from { transform: translateY(0);    opacity: 1; }
	to   { transform: translateY(12px); opacity: 0; }
}

/* Popup topbar */
.lqd-auth-popup__topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 24px 14px;
	border-bottom: 1px solid #f3f4f6;
}

.lqd-auth-popup__site-name {
	font-family: "Manrope", sans-serif;
	font-size: 15px;
	font-weight: 700;
	color: #111827;
}

.lqd-auth-popup__close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	background: #f3f4f6;
	border: none;
	border-radius: 50%;
	color: #6b7280;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
	flex-shrink: 0;
}

.lqd-auth-popup__close:hover {
	background: #e5e7eb;
	color: #111827;
}

/* Inside popup: strip the .lqd-auth-card border/radius (popup IS the card) */
.lqd-auth-popup .lqd-auth-wrap {
	display: block;
	padding: 0;
}

.lqd-auth-popup .lqd-auth-card {
	max-width: none;
	border: none;
	border-radius: 0;
	box-shadow: none;
}

/* Prevent body scroll when popup is open */
body.lqd-popup-open {
	overflow: hidden;
}

/* ── Telegram account endpoint ─────────────────────────────── */

.woocommerce-MyAccount-content .wctg-account > h3 {
	font-family: "Manrope", sans-serif;
	font-size: 18px;
	font-weight: 700;
	color: #111827;
	margin: 0 0 8px;
}

.woocommerce-MyAccount-content .wctg-account > p {
	font-size: 14px;
	color: #6b7280;
	line-height: 1.6;
	margin-bottom: 20px;
}

/* ── Responsive ────────────────────────────────────────────── */

@media (max-width: 860px) {
	.lqd-myaccount-wrap {
		grid-template-columns: 1fr;
	}

	.lqd-account-nav ul {
		display: grid;
		grid-template-columns: repeat(4, 1fr);
	}

	.lqd-account-nav li {
		border-bottom: none;
		border-right: 1px solid #f3f4f6;
	}
	.lqd-account-nav li:last-child { border-right: none; }

	.woocommerce-MyAccount-navigation.lqd-account-nav li a {
		flex-direction: column !important;
		align-items: center;
		text-align: center;
		padding: 12px 6px;
		gap: 5px;
		font-size: 11px;
		border-left: none;
		border-bottom: 3px solid transparent;
	}

	.woocommerce-MyAccount-navigation.lqd-account-nav li.is-active a,
	.woocommerce-MyAccount-navigation.lqd-account-nav li a[aria-current="page"] {
		border-left: none;
		border-bottom-color: #184341;
	}

	.woocommerce-MyAccount-navigation.lqd-account-nav
	.woocommerce-MyAccount-navigation-link--telegram.is-active a {
		border-bottom-color: #229ed9;
	}

	.lqd-dashboard-tiles {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.lqd-account-nav ul {
		grid-template-columns: repeat(3, 1fr);
	}

	.lqd-auth-panel {
		padding: 22px 20px 18px;
	}

	.lqd-auth-switch {
		margin: 14px 20px 16px;
	}

	.lqd-auth-footer {
		flex-direction: column;
		align-items: stretch;
	}

	.lqd-auth-submit,
	.lqd-auth-submit.button {
		width: 100% !important;
	}

	.lqd-dashboard-tiles {
		grid-template-columns: 1fr;
	}

	.lqd-auth-popup__inner {
		border-radius: 12px 12px 0 0;
		max-height: 90vh;
	}

	.lqd-auth-popup {
		align-items: flex-end;
		padding: 0;
	}
}
