/* =========================================================================
   КУЗНЯ КАВИ — попап авторизації (реєстрація / вхід)
   Використовує токени з kk-header.css (:root)
   ========================================================================= */

.kk-auth-modal {
	position: fixed; inset: 0; z-index: 320;
	display: flex; align-items: flex-start; justify-content: center;
	padding: 20px;
}
.kk-auth-modal[hidden] { display: none; }

.kk-auth__backdrop {
	position: absolute; inset: 0;
	background: rgba(20,18,16,.5);
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
	animation: kkFade .2s ease;
}

.kk-auth-card {
	position: relative; z-index: 1;
	width: min(560px, 100%);
	margin-top: 9vh;
	background: #F6F2E9;
	border-radius: 22px;
	box-shadow: 0 30px 90px rgba(0,0,0,.45);
	padding: 34px 40px 30px;
	animation: kkPop .25s cubic-bezier(.4,0,.2,1);
}
.kk-auth-card[hidden] { display: none; }

/* Шапка */
.kk-auth-head { position: relative; display: flex; align-items: center; justify-content: center; margin-bottom: 26px; }
.kk-auth-head h2 {
	margin: 0; text-align: center;
	font-size: 30px; font-weight: 800; letter-spacing: .01em;
	text-transform: uppercase; color: var(--kk-text-dark);
}
.kk-auth-close {
	position: absolute; right: -8px; top: 50%; transform: translateY(-50%);
	width: 40px; height: 40px; border: 0; background: transparent; cursor: pointer;
	color: var(--kk-text-dark); border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center;
	transition: background var(--kk-ease);
	padding: 0;
}
.kk-auth-close:hover { background: unset; color: #DB8622; }
.kk-auth-close svg { width: 24px; height: 24px; display: block; }

/* Поля */
.kk-auth-form { display: flex; flex-direction: column; gap: 18px; }
.kk-auth-row { display: flex; gap: 16px; }
.kk-auth-row .kk-field { flex: 1 1 0; min-width: 0; }

.kk-field { display: flex; flex-direction: column; gap: 8px; }
.kk-field > span {
	font-size: 15px; font-weight: 700; color: var(--kk-text-dark);
}
.kk-field input {
	width: 100%;
	background: #FBF9F3;
	border: 1px solid rgba(27,26,24,.14);
	border-radius: 12px;
	padding: 15px 16px;
	font-size: 16px;
	color: var(--kk-text-dark);
	outline: none;
	transition: border-color var(--kk-ease), box-shadow var(--kk-ease);
	-webkit-appearance: none; appearance: none;
}
.kk-field input::placeholder { color: #9a958b; }
.kk-field input:focus {
	border-color: var(--kk-text-dark);
	box-shadow: 0 0 0 3px rgba(27,26,24,.06);
}

/* Телефон з прапорцем */
.kk-phone-input {
	display: flex; align-items: center;
	background: #FBF9F3;
	border: 1px solid rgba(27,26,24,.14);
	border-radius: 12px;
	padding-left: 14px;
	overflow: hidden;
}
.kk-phone-input__flag { font-size: 20px; line-height: 1; margin-right: 8px; }
.kk-phone-input input {
	border: 0 !important; background: transparent !important;
	border-radius: 0 !important; box-shadow: none !important;
	padding-left: 6px;
}

/* Помилка */
.kk-auth-error {
	display: none;
	color: #b3261e; font-size: 14px; line-height: 1.35;
}
.kk-auth-error.is-visible { display: block; }

/* Кнопка */
.kk-auth-submit {
	margin-top: 6px;
	width: 100%; border: 0; cursor: pointer;
	background: #111; color: #fff;
	font-size: 17px; font-weight: 700;
	padding: 17px 20px;
	border-radius: var(--kk-pill);
	transition: background var(--kk-ease), opacity var(--kk-ease);
}
.kk-auth-submit:hover { background: #000; }
.kk-auth-submit[disabled] { opacity: .6; cursor: default; }

/* Перемикач знизу */
.kk-auth-switch {
	margin: 20px 0 0; text-align: center;
	font-size: 15px; color: rgba(27,26,24,.7);
}
.kk-auth-switch button {
	border: 0; background: transparent; cursor: pointer;
	color: #56694C; font-weight: 700; font-size: 15px;
	padding: 0 2px;
}
.kk-auth-switch button:hover { text-decoration: underline; }

body.kk-auth-open { overflow: hidden; }

/* Мобілка */
@media (max-width: 560px) {
	.kk-auth-card { padding: 26px 22px 24px; margin-top: 6vh; border-radius: 18px; }
	.kk-auth-head h2 { font-size: 24px; }
	.kk-auth-row { flex-direction: column; gap: 18px; }
}
