/* ── Flowhub Login widget (widgets/class-flowhub-login.php) ────────────────
   "Neon Dispensary" moss-green theme, matching the cart drawer / store info
   modal / weight modal already built this session.
   --------------------------------------------------------------------------- */

/* ── Trigger button ──────────────────────────────────────────────────────── */

.fh-login-trigger {
	/* Default icon size (0.8em, no padding) now lives in the widget's own
	   "Icon Size" Elementor control (widgets/class-flowhub-login.php),
	   which compiles to {{WRAPPER}} .fh-login-trigger{font-size:...
	   !important} per-instance — kept out of this shared stylesheet so
	   admins can actually override it from the editor. */
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: none !important;
	border: none !important;
	padding: 0 !important;
	margin: 0;
	color: #eef4e2 !important;
	line-height: 1;
	cursor: pointer;
	transition: color 0.15s ease;
}

.fh-login-trigger i {
	padding: 0 !important;
	margin: 0 !important;
}

.fh-login-trigger:hover,
.fh-login-trigger:focus {
	background: none !important;
	color: #b3cd98 !important;
}

/* ── Modal shell (mirrors #fhStoreInfoModal) ────────────────────────────── */

.fh-login-dialog {
	max-width: 420px;
	transition: max-width 0.15s ease;
}

/* Wider once logged in — .is-account is toggled on .fh-login-modal by
   assets/js/flowhub-login.js so the profile form and orders list can sit
   side by side instead of squeezing into the sign-up/sign-in width. */
.fh-login-modal.is-account .fh-login-dialog {
	max-width: 920px;
}

.fh-login-modal .modal-content {
	background-color: #313d27;
	color: #f4f7ee;
	border: none;
	border-radius: 16px;
	font-family: 'Space Grotesk', sans-serif;
}

.fh-login-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.25rem 1.5rem;
	border-bottom: 1px solid #4a5a3c;
}

.fh-login-title {
	font-size: 1.05rem;
	font-weight: 700;
	margin: 0;
	color: #f4f7ee;
}

.fh-login-modal .fh-modal-close {
	appearance: none;
	box-sizing: border-box;
	padding: 0;
	margin: 0;
	width: 30px;
	height: 30px;
	min-width: 30px;
	min-height: 30px;
	flex: 0 0 30px;
	border-radius: 50%;
	border: 1px solid #4a5a3c !important;
	background: transparent !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #aeb7a2 !important;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.fh-login-modal .fh-modal-close:hover,
.fh-login-modal .fh-modal-close:focus {
	border-color: #597d36 !important;
	background-color: rgba(89, 125, 54, 0.25) !important;
	color: #b3cd98 !important;
}

.fh-login-body {
	padding: 1.25rem 1.5rem 1.5rem;
}

/* ── Divider between Sign Up and Sign In ────────────────────────────────── */

.fh-login-divider {
	display: flex;
	align-items: center;
	text-align: center;
	margin: 1.25rem 0 1rem;
	border-top: 1px solid #4a5a3c;
}

.fh-login-divider span {
	flex-shrink: 0;
	margin: -0.7rem auto 0;
	padding: 0 0.75rem;
	background: #313d27;
	color: #aeb7a2;
	font-size: 0.8rem;
}

.fh-login-copy {
	font-size: 0.85rem;
	color: #aeb7a2;
	line-height: 1.5;
	margin: 0 0 1.1rem;
}

/* ── Form fields ─────────────────────────────────────────────────────────── */

.fh-login-field-row {
	display: flex;
	gap: 0.75rem;
}

.fh-login-field-row .fh-login-field {
	flex: 1;
	min-width: 0;
}

.fh-login-field {
	margin-bottom: 0.9rem;
}

.fh-login-field label {
	display: block;
	font-size: 0.8rem;
	font-weight: 600;
	color: #b3cd98;
	margin-bottom: 0.3rem;
}

.fh-login-field input,
.fh-login-field select {
	appearance: none;
	width: 100%;
	background: #232a1c;
	border: 1px solid #4a5a3c;
	/* !important — the theme's reset.css has its own
	   "select{border:1px solid #666;border-radius:3px;...}" rule; without
	   it the native <select> kept the reset's 3px radius while text
	   inputs correctly picked up this rule's 10px. */
	border-radius: 10px !important;
	padding: 0.55rem 0.75rem;
	color: #f4f7ee;
	font-family: 'Space Grotesk', sans-serif;
	font-size: 0.9rem;
}

/* Native date-picker calendar icon (Date of Birth) is dark and stays dark
   even with filter:invert() in some Chrome/Edge/Safari versions — same
   fix as the <select> chevron above: hide the native glyph (opacity:0,
   still there and clickable, just invisible) and draw our own light one
   at the same spot instead of fighting the browser's rendering of it. */
.fh-login-field input[type="date"] {
	color-scheme: dark;
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23aeb7a2' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round' d='M2.5 3.5h11v10a1 1 0 0 1-1 1h-9a1 1 0 0 1-1-1v-10ZM2.5 6.5h11M5.5 2v2.5M10.5 2v2.5'/%3e%3c/svg%3e");
	background-repeat: no-repeat;
	background-position: right 0.75rem center;
	background-size: 15px 15px;
	padding-right: 2.5rem;
}

.fh-login-field input[type="date"]::-webkit-calendar-picker-indicator {
	opacity: 0;
	cursor: pointer;
}

.fh-login-field input::placeholder {
	color: #7f8a72;
}

.fh-login-field select {
	/* appearance:none above drops the native dropdown arrow along with the
	   reset.css radius it came with — replace it with a themed chevron so
	   the field still reads as a dropdown. */
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23aeb7a2' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
	background-repeat: no-repeat;
	background-position: right 0.75rem center;
	/* Without an explicit size, a raw SVG data-URI background defaults to
	   its CSS-spec intrinsic size (300x150px) — comically huge next to a
	   ~40px-tall select. */
	background-size: 12px 12px;
	padding-right: 2.25rem;
}

.fh-login-field input:focus,
.fh-login-field select:focus {
	outline: none;
	border-color: #597d36;
}

.fh-login-password-wrap {
	position: relative;
	display: flex;
}

.fh-login-password-wrap input {
	padding-right: 2.4rem;
}

.fh-login-password-toggle {
	appearance: none;
	position: absolute;
	right: 0.5rem;
	top: 50%;
	transform: translateY(-50%);
	background: none !important;
	border: none !important;
	border-radius: 0 !important;
	padding: 0.3rem;
	color: #aeb7a2 !important;
	cursor: pointer;
}

.fh-login-password-toggle:hover,
.fh-login-password-toggle:focus {
	background-color: transparent !important;
	color: #eef4e2 !important;
}

.fh-login-checkbox {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.85rem;
	color: #eef4e2;
	margin-bottom: 0.9rem;
	cursor: pointer;
}

.fh-login-checkbox input {
	accent-color: #597d36;
	width: 16px;
	height: 16px;
}

.fh-login-legal {
	font-size: 0.75rem;
	color: #7f8a72;
	line-height: 1.4;
	margin-bottom: 1rem;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.fh-login-submit {
	appearance: none;
	/* !important — reset.css's "[type=button],[type=submit],button{width:
	   auto}" ties this rule's specificity (both single-selector) and can
	   win by source order, same as the border/border-radius fixes above. */
	width: 100% !important;
	display: block;
	padding: 0.75rem 1rem;
	font-size: 0.95rem;
	font-weight: 700;
	font-family: 'Space Grotesk', sans-serif;
	border-radius: 999px !important;
	background: #597d36 !important;
	color: #eef4e2 !important;
	border: none !important;
	cursor: pointer;
	transition: background-color 0.18s ease;
}

.fh-login-submit:hover,
.fh-login-submit:focus {
	background: #3d5922 !important;
	color: #eef4e2 !important;
}

.fh-login-submit.is-loading {
	opacity: 0.7;
	cursor: wait;
}

/* Secondary (Sign In) variant — outline instead of solid fill, so Sign Up
   (the primary, in-page action) stays visually dominant. */
.fh-login-submit-secondary {
	background: transparent !important;
	color: #eef4e2 !important;
	border: 1px solid #4a5a3c !important;
}

.fh-login-submit-secondary:hover,
.fh-login-submit-secondary:focus {
	background: #3d5922 !important;
	border-color: #597d36 !important;
	color: #eef4e2 !important;
}

.fh-login-error {
	color: #d9756b;
	font-size: 0.85rem;
	margin-top: 0.75rem;
	margin-bottom: 0;
}

/* ── Account panel (logged-in) — profile + orders side by side ──────────── */

.fh-account-columns {
	display: flex;
	gap: 1.75rem;
	margin-bottom: 1.25rem;
}

.fh-account-col {
	flex: 1;
	min-width: 0;
}

.fh-account-col-title {
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #b3cd98;
	margin: 0 0 0.9rem;
}

/* Profile form reuses .fh-login-field/.fh-login-submit — no column-specific
   field styling needed. */

.fh-login-success {
	color: #b3cd98;
	font-size: 0.85rem;
	margin-top: 0.75rem;
	margin-bottom: 0;
}

.fh-account-orders-list {
	background: #232a1c;
	border-radius: 12px;
	padding: 0.5rem 0.9rem;
	max-height: 320px;
	overflow-y: auto;
}

.fh-account-order-row {
	display: flex;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.6rem 0;
	border-bottom: 1px solid #313d27;
	font-size: 0.85rem;
	color: #eef4e2;
}

.fh-account-order-row:last-child {
	border-bottom: none;
}

.fh-account-order-date {
	color: #aeb7a2;
}

.fh-account-orders-empty {
	color: #aeb7a2;
	font-size: 0.85rem;
	padding: 0.6rem 0;
	margin: 0;
}

.fh-account-logout {
	appearance: none;
	display: block;
	width: 100% !important;
	background: #232a1c !important;
	color: #eef4e2 !important;
	border: 1px solid #4a5a3c !important;
	border-radius: 999px !important;
	padding: 0.6rem 1rem;
	font-family: 'Space Grotesk', sans-serif;
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.fh-account-logout:hover,
.fh-account-logout:focus {
	background-color: #3d5922 !important;
	border-color: #597d36 !important;
	color: #eef4e2 !important;
}

/* Stack columns on narrow viewports rather than squeezing two 300px-ish
   columns into a phone-width modal. */
@media (max-width: 576px) {
	.fh-account-columns {
		flex-direction: column;
		gap: 1.25rem;
	}
}
