/* ==========================================================================
   Kharo UI Kit — Adapted Uiverse.io Components (MIT Licensed)
   Brand Palette: Kharo Green #2EBC13 / #1f8a0b | Dark Slate #17231f

   Credits:
   1. Animated Button: From Uiverse.io by adamgiebl - https://uiverse.io/adamgiebl/smart-moth-68
      MIT License, Copyright (c) adamgiebl (Adam Giebl)
   2. 3-Bar Loader: From Uiverse.io by aryamitra06 - https://uiverse.io/aryamitra06/silent-lion-21
      MIT License, Copyright (c) aryamitra06 (Aryamitra Chaudhuri)
   3. Underline Input: From Uiverse.io by Satwinder04 - https://uiverse.io/Satwinder04/pink-bat-77
      MIT License, Copyright (c) Satwinder04 (Satwinder Singh)
   4. Dark Form Card: From Uiverse.io by Yaya12085 - https://uiverse.io/Yaya12085/short-panda-24
      MIT License, Copyright (c) Yaya12085 (Yaya Mohamed)
   5. Dot-Matrix Pattern: From Uiverse.io by kennyotsu - https://uiverse.io/kennyotsu/short-warthog-33
      MIT License, Copyright (c) kennyotsu (kotsu)
   6. Animated Tooltip / Hint: From Uiverse.io by vnuny - https://uiverse.io/vnuny/stale-mouse-74
      MIT License, Copyright (c) vnuny (Diaa)
   ========================================================================== */

img:is(.kharo-brand-mark, [src*="/assets/kharo-brand.png"]) {
	background-color: #17231f;
	border-radius: 50%;
}

/* --------------------------------------------------------------------------
   1. Kharo Animated Fly Button (adamgiebl/smart-moth-68)
   -------------------------------------------------------------------------- */
.kharo-btn-fly {
	font-family: inherit;
	font-size: 13.5px;
	font-weight: 700;
	background: var(--kharo-primary, #1e7e2b);
	color: #ffffff !important;
	padding: 0.62em 1.15em 0.62em 0.95em;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4em;
	border: none;
	border-radius: 10px;
	overflow: hidden;
	transition: all 0.2s ease;
	cursor: pointer;
	text-decoration: none !important;
	line-height: 1.25;
	box-shadow: none;
	position: relative;
}
.kharo-btn-fly.is-full {
	width: 100%;
}
.kharo-btn-fly .kharo-btn-fly-label {
	display: block;
	transition: transform 0.3s ease-in-out;
}
.kharo-btn-fly .kharo-btn-fly-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.kharo-btn-fly svg {
	display: block;
	width: 16px;
	height: 16px;
	transform-origin: center center;
	transition: transform 0.3s ease-in-out;
}
.kharo-btn-fly:visited,
.kharo-btn-fly:hover,
.kharo-btn-fly:active {
	color: #ffffff !important;
}
.kharo-btn-fly:hover {
	background: var(--kharo-primary-hover, #176622);
	box-shadow: none;
}
.kharo-btn-fly:focus {
	border-radius: 10px;
	color: #ffffff !important;
	box-shadow: none;
	outline: none;
}
.kharo-btn-fly:hover .kharo-btn-fly-icon {
	animation: kharo-fly-bob 0.6s ease-in-out infinite alternate;
}
.kharo-btn-fly:hover svg {
	transform: translateX(0.45em) rotate(45deg) scale(1.12);
}
.kharo-btn-fly:hover .kharo-btn-fly-label {
	transform: translateX(0.28em);
}
.kharo-btn-fly:active {
	transform: scale(0.95);
}
.kharo-btn-fly:disabled {
	opacity: 0.65;
	cursor: wait;
}
@keyframes kharo-fly-bob {
	from { transform: translateY(0.08em); }
	to   { transform: translateY(-0.08em); }
}

/* --------------------------------------------------------------------------
   2. Kharo 3-Bar Wave Loader (aryamitra06/silent-lion-21)
   -------------------------------------------------------------------------- */
.kharo-loader-bars {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 28px;
}
.kharo-loader-bars .kharo-bar {
	display: inline-block;
	width: 3px;
	height: 18px;
	background-color: rgba(255, 255, 255, 0.55);
	border-radius: 10px;
	animation: kharo-bar-scale 1s linear infinite;
}
.kharo-loader-bars .kharo-bar:nth-child(2) {
	height: 30px;
	margin: 0 5px;
	animation-delay: 0.25s;
}
.kharo-loader-bars .kharo-bar:nth-child(3) {
	animation-delay: 0.5s;
}
.kharo-loader-bars.is-compact {
	height: 16px;
}
.kharo-loader-bars.is-compact .kharo-bar {
	height: 10px;
	width: 2.5px;
}
.kharo-loader-bars.is-compact .kharo-bar:nth-child(2) {
	height: 16px;
	margin: 0 3px;
}
.kharo-loader-bars.is-dark .kharo-bar {
	background-color: rgba(23, 35, 31, 0.45);
}
@keyframes kharo-bar-scale {
	20% {
		background-color: #ffffff;
		transform: scaleY(1.5);
	}
	40% {
		transform: scaleY(1);
	}
}

/* --------------------------------------------------------------------------
   3. Kharo Animated Underline Input (Satwinder04/pink-bat-77)
   -------------------------------------------------------------------------- */
.kharo-input-underline {
	position: relative;
	display: block;
	width: 100%;
	max-width: 440px;
}
.kharo-input-underline input {
	font-size: 13.5px;
	width: 100%;
	border: none !important;
	border-bottom: 2px solid #cfd8d1 !important;
	border-radius: 0 !important;
	padding: 7px 2px !important;
	background-color: transparent !important;
	box-shadow: none !important;
	outline: none !important;
	color: #17231f;
	transition: border-color 0.2s ease;
}
.kharo-input-underline .kharo-underline-bar {
	position: absolute;
	bottom: 0;
	left: 0;
	height: 2px;
	width: 100%;
	background-color: var(--kharo-primary, #2EBC13);
	transform: scaleX(0);
	transform-origin: center;
	transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
	pointer-events: none;
}
.kharo-input-underline input:focus ~ .kharo-underline-bar {
	transform: scaleX(1);
}
.kharo-input-underline.is-floating {
	margin-top: 14px;
}
.kharo-input-underline.is-floating .kharo-floating-label {
	position: absolute;
	top: 7px;
	left: 2px;
	color: #7c8a80;
	font-size: 13.5px;
	transition: all 0.25s ease;
	pointer-events: none;
}
.kharo-input-underline.is-floating input:focus ~ .kharo-floating-label,
.kharo-input-underline.is-floating input:not(:placeholder-shown) ~ .kharo-floating-label {
	top: -14px;
	font-size: 11.5px;
	font-weight: 600;
	color: var(--kharo-primary, #2EBC13);
}

/* --------------------------------------------------------------------------
   4. Kharo Dark Slate Form Card (Yaya12085/short-panda-24)
   -------------------------------------------------------------------------- */
.kharo-form-card {
	border-radius: 12px;
	background-color: #17231f;
	padding: 24px 28px;
	color: #f3f6f4;
	border: 1px solid #283a33;
	box-shadow: 0 12px 32px rgba(13, 24, 19, 0.18);
}
.kharo-form-card h2,
.kharo-form-card h3 {
	color: #ffffff;
	margin-top: 0;
}
.kharo-form-card p,
.kharo-form-card th,
.kharo-form-card label {
	color: #b7c9be;
}
.kharo-form-card input[type="text"],
.kharo-form-card input[type="url"],
.kharo-form-card input[type="password"],
.kharo-form-card select {
	border-radius: 6px;
	border: 1px solid #33483f;
	background-color: #111a17;
	color: #f3f6f4;
	padding: 8px 12px;
	outline: 0;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.kharo-form-card input:focus,
.kharo-form-card select:focus {
	border-color: var(--kharo-primary, #2EBC13);
	box-shadow: 0 0 0 2px rgba(46, 188, 19, 0.22);
}
.kharo-form-card .kharo-form-divider {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 16px 0;
	color: #8ea396;
	font-size: 12px;
}
.kharo-form-card .kharo-form-divider::before,
.kharo-form-card .kharo-form-divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: #2c3e37;
}

/* --------------------------------------------------------------------------
   5. Kharo Dot-Matrix Patterns (kennyotsu/short-warthog-33)
   -------------------------------------------------------------------------- */
.kharo-pattern-dots {
	background-color: #1e2622 !important;
	background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1.5px, transparent 0) !important;
	background-size: 24px 24px !important;
	background-position: -4px -4px !important;
}
.kharo-pattern-dots-light {
	background-color: #ffffff;
	background-image: radial-gradient(rgba(46, 188, 19, 0.14) 1.4px, transparent 0);
	background-size: 20px 20px;
	background-position: -4px -4px;
}

/* --------------------------------------------------------------------------
   6. Kharo Animated Tooltips & Pointer Hints (vnuny/stale-mouse-74)
   -------------------------------------------------------------------------- */
[data-kharo-tip] {
	position: relative;
}
[data-kharo-tip]::after {
	content: attr(data-kharo-tip);
	position: absolute;
	right: calc(100% + 10px);
	top: 50%;
	transform: translateY(-50%) translateX(6px);
	background: #101714;
	color: #ffffff;
	border: 1px solid #2EBC13;
	font-size: 11.5px;
	font-weight: 600;
	line-height: 1.25;
	white-space: nowrap;
	padding: 5px 10px;
	border-radius: 5px;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
	transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
	z-index: 10300;
}
[data-kharo-tip]::before {
	content: "";
	position: absolute;
	right: calc(100% + 4px);
	top: 50%;
	transform: translateY(-50%);
	width: 0;
	height: 2px;
	background: #2EBC13;
	transition: width 0.2s ease;
	pointer-events: none;
	z-index: 10299;
}
[data-kharo-tip]:hover::after,
[data-kharo-tip]:focus-visible::after {
	opacity: 1;
	visibility: visible;
	transform: translateY(-50%) translateX(0);
}
[data-kharo-tip]:hover::before,
[data-kharo-tip]:focus-visible::before {
	width: 6px;
}

/* Right-pointing variant for left-side controls */
[data-kharo-tip-pos="bottom"]::after {
	right: auto;
	left: 50%;
	top: calc(100% + 8px);
	transform: translateX(-50%) translateY(-4px);
}
[data-kharo-tip-pos="bottom"]::before {
	display: none;
}
[data-kharo-tip-pos="bottom"]:hover::after,
[data-kharo-tip-pos="bottom"]:focus-visible::after {
	transform: translateX(-50%) translateY(0);
}

/* Inline Help Hint Badge (adapted from vnuny/stale-mouse-74) */
.kharo-hint {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-left: 6px;
	vertical-align: middle;
	cursor: help;
}
.kharo-hint-dot {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 1.5px solid #2EBC13;
	background: #eaf9e6;
	color: #18680a;
	font-size: 11px;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.kharo-hint:hover .kharo-hint-dot {
	background: #2EBC13;
	color: #ffffff;
	transform: scale(1.08);
}
.kharo-hint-content {
	position: absolute;
	left: calc(100% + 14px);
	top: 50%;
	transform: translateY(-50%) translateX(-4px);
	width: 240px;
	background: #17231f;
	color: #eef5f0;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.45;
	padding: 9px 12px;
	border-radius: 6px;
	border-left: 3px solid #2EBC13;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
	z-index: 9999;
}
.kharo-hint-content::before {
	content: "";
	position: absolute;
	left: -14px;
	top: 50%;
	width: 0;
	height: 1.5px;
	background: #2EBC13;
	transition: width 0.22s ease;
}
.kharo-hint:hover .kharo-hint-content {
	opacity: 1;
	visibility: visible;
	transform: translateY(-50%) translateX(0);
}
.kharo-hint:hover .kharo-hint-content::before {
	width: 14px;
}
