/**
 * SWEB — Auth popups (Autentificare / Creare cont / Confirmare)
 * Figma: #16292:16350 · #16438:21290 · #16438:21827
 */
.sweb-auth {
	position: fixed;
	inset: 0;
	z-index: 1200;
	visibility: hidden;
	opacity: 0;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}
.sweb-auth.is-open { visibility: visible; opacity: 1; }
.sweb-auth__overlay { position: absolute; inset: 0; background: rgba(49, 21, 7, 0.15); }

/* Dropdown ancorat sub butonul de logare (dreapta-sus), aliniat la grila 1344 */
.sweb-authpop {
	position: absolute;
	top: calc(var(--sweb-nav-off, 92px) + 8px);
	right: max(clamp(16px, 5.33px + 2.963vw, 48px), (100% - 1344px) / 2);
	width: 486px;
	max-width: calc(100vw - 32px);
	max-height: calc(100vh - var(--sweb-nav-off, 92px) - 24px);
	overflow-y: auto;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: 32px;
	padding: 32px;
	background: #FFFDF9;
	border: 1px solid #DFD5CF;
	border-radius: 24px;
	box-shadow: 0 8px 24px 0 rgba(49, 21, 7, 0.25);
	transform-origin: top right;
	transform: translateY(-10px) scale(0.98);
	transition: transform 0.2s ease;
}
.sweb-auth.is-open .sweb-authpop { transform: none; }
.sweb-authpop[hidden] { display: none; }
.sweb-authpop button { -webkit-appearance: none; appearance: none; box-shadow: none; }

.sweb-authpop__head { display: flex; align-items: center; justify-content: space-between; gap: 48px; }
.sweb-authpop__title {
	font-family: 'Google Sans Flex', 'Inter', sans-serif;
	font-weight: 600; font-size: 24px; line-height: 1; letter-spacing: -0.02em;
	color: #4E220B;
}
.sweb-authpop__close {
	width: 32px; height: 32px; flex: 0 0 auto;
	display: inline-flex; align-items: center; justify-content: center;
	padding: 0; border: none !important; background: transparent !important;
	color: #4E220B; cursor: pointer;
}
.sweb-authpop__close svg { width: 22px; height: 22px; }

.sweb-authpop__body { display: flex; flex-direction: column; gap: 24px; }

/* Câmp cu etichetă flotantă pe bordură */
.sweb-field { position: relative; display: flex; align-items: center; }
.sweb-field__label {
	position: absolute; top: -8px; left: 12px;
	padding: 0 4px; background: #FFFDF9;
	font-family: 'Inter', sans-serif; font-weight: 500; font-size: 12px; letter-spacing: 0.02em;
	color: #8D6C5A;
}
.sweb-field__input {
	width: 100%; box-sizing: border-box;
	padding: 14px 16px;
	border: 1px solid #DFD5CF; border-radius: 8px;
	background: #FFFDF9;
	font-family: 'Inter', sans-serif; font-size: 16px; letter-spacing: 0.01em; color: #4E220B;
	outline: none;
}
.sweb-field__input::placeholder { color: #8D6C5A; }
.sweb-field__input:focus { border-color: var(--sweb-c-primary, #D35A0C); }
.sweb-field--pass .sweb-field__input { padding-right: 44px; }
.sweb-field__eye {
	position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
	width: 24px; height: 24px; min-width: 0; padding: 0 !important; margin: 0; line-height: 0;
	display: inline-flex; align-items: center; justify-content: center;
	border: none !important; background: transparent !important; box-shadow: none !important;
	color: #8D6C5A; cursor: pointer;
}
.sweb-field__eye svg { width: 18px; height: 18px; display: block; }
.sweb-field__eye.is-on { color: var(--sweb-c-primary, #D35A0C); }

/* Opțiuni: ține-mă minte + am uitat parola */
.sweb-authpop__opts {
	display: flex; align-items: center; justify-content: space-between; gap: 8px;
	padding: 8px 0; border-top: 1px solid #DFD5CF; border-bottom: 1px solid #DFD5CF;
}
.sweb-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-family: 'Inter', sans-serif; font-size: 16px; color: #4E220B; }
.sweb-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.sweb-check__box { width: 24px; height: 24px; border: 1px solid #DFD5CF; border-radius: 4px; background: #FEFAF0; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.sweb-check input:checked + .sweb-check__box { background: var(--sweb-c-primary, #D35A0C); border-color: var(--sweb-c-primary, #D35A0C); }
.sweb-check input:checked + .sweb-check__box::after { content: ""; width: 12px; height: 7px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.sweb-authpop__link { font-family: 'Inter', sans-serif; font-size: 16px; color: #8D6C5A; text-decoration: underline; }

.sweb-authpop__switch { margin: 0; text-align: center; font-family: 'Inter', sans-serif; font-size: 16px; color: #8D6C5A; }
.sweb-authpop__switch a { color: #8D6C5A; text-decoration: underline; cursor: pointer; }

.sweb-authpop__msg { margin: 0; font-family: 'Inter', sans-serif; font-size: 14px; color: #D73B3B; }
.sweb-authpop__msg.is-ok { color: #277109; }

.sweb-authpop__btn {
	display: flex; align-items: center; justify-content: center;
	padding: 14px 24px;
	-webkit-appearance: none; appearance: none;
	border: 1px solid var(--sweb-c-primary, #D35A0C) !important;
	border-radius: 6px;
	background: var(--sweb-c-primary, #D35A0C) !important;
	color: #FEFAF0 !important;
	font-family: 'Google Sans Flex', 'Inter', sans-serif; font-weight: 600; font-size: 16px;
	text-decoration: none; cursor: pointer; box-shadow: none; transition: opacity 0.15s ease;
}
.sweb-authpop__btn:hover { opacity: 0.92; }
.sweb-authpop__btn.is-loading { opacity: 0.6; pointer-events: none; }

/* Confirmare */
.sweb-authpop__confirm { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.sweb-authpop__badge { width: 112px; height: 112px; border: 1px solid #DFD5CF; border-radius: 16px; background: #FEFAF0; display: flex; align-items: center; justify-content: center; }
.sweb-authpop__badge-ic { width: 64px; height: 64px; border-radius: 999px; background: #277109; display: flex; align-items: center; justify-content: center; }
.sweb-authpop__badge-ic svg { width: 36px; height: 36px; }
.sweb-authpop__ok { margin: 0; font-family: 'Inter', sans-serif; font-weight: 600; font-size: 16px; color: #4E220B; }
.sweb-authpop__hint { margin: 0; font-family: 'Inter', sans-serif; font-weight: 500; font-size: 14px; line-height: 1.4; letter-spacing: 0.01em; color: #8D6C5A; }

/* -------- Jerry: alb + bordură rough negru -------- */
.sweb-brand--jerry .sweb-authpop {
	background: #FFFFFF;
	border: 4px solid transparent !important;
	border-image: var(--jerry-rough, url('../../img/rough-border-irregular.svg')) 8 / 4px round !important;
	border-radius: 0 !important;
}
.sweb-brand--jerry .sweb-authpop__title { font-family: 'Afacad', sans-serif; color: #1A1A1A; }
.sweb-brand--jerry .sweb-field__label { background: #FFFFFF; }
.sweb-brand--jerry .sweb-authpop__btn { border-radius: 0; font-family: 'Afacad', sans-serif; }

/* -------- Americana: dark -------- */
.sweb-brand--americana .sweb-authpop { background: #161616; border: 1px solid #363636; }
.sweb-brand--americana .sweb-authpop__title { font-family: 'Racing Sans One', sans-serif; color: #FFFCFA; }
.sweb-brand--americana .sweb-authpop__close { color: #FFFCFA; }
.sweb-brand--americana .sweb-field__label { background: #161616; color: #CCCCCC; }
.sweb-brand--americana .sweb-field__input { background: #161616; border-color: #363636; color: #FFFCFA; }
.sweb-brand--americana .sweb-field__input::placeholder { color: #888; }
.sweb-brand--americana .sweb-check { color: #FFFCFA; }
.sweb-brand--americana .sweb-check__box { background: #161616; border-color: #363636; }
.sweb-brand--americana .sweb-authpop__opts { border-color: #363636; }
.sweb-brand--americana .sweb-authpop__link,
.sweb-brand--americana .sweb-authpop__switch,
.sweb-brand--americana .sweb-authpop__switch a { color: #CCCCCC; }
.sweb-brand--americana .sweb-authpop__ok { color: #FFFCFA; }
.sweb-brand--americana .sweb-authpop__hint { color: #CCCCCC; }
.sweb-brand--americana .sweb-authpop__badge { background: #1E1E1E; border-color: #363636; }
.sweb-brand--americana .sweb-authpop__btn { font-family: 'Racing Sans One', sans-serif; border-radius: 4px; }

@media (max-width: 520px) {
	.sweb-authpop { padding: 24px; gap: 24px; border-radius: 16px; }
	.sweb-authpop__title { font-size: 20px; }
}
