/**
 * Catalog-add — landing styles (Phase 1.J).
 *
 * Namespace .mk-add__* — ізольовано від інших pages. Yellow accent
 * залишається консистентним з /реклама/.
 */

body.mykyiv-catadd-page { background: var( --paper, #fafafa ); }

.mk-add {
	padding: 0;
}

.mk-add__inner {
	max-width: 720px;
	margin: 0 auto;
	padding: 40px 24px 60px;
}

.mk-add__head { margin-bottom: 28px; }

.mk-add__back {
	display: inline-block;
	font-size: 13px;
	color: var(--ink-3);
	text-decoration: none;
	margin-bottom: 18px;
}
.mk-add__back:hover { color: var(--ink-1); }

.mk-add__title {
	font-family: var( --font-display, "Unbounded", sans-serif );
	font-size: clamp( 26px, 3.6vw, 36px );
	margin: 0 0 12px;
	color: var(--ink-1);
	font-weight: 700;
	line-height: 1.1;
}

.mk-add__lead {
	margin: 0;
	font-size: 14.5px;
	line-height: 1.55;
	color: var(--ink-3);
	max-width: 540px;
}

/* ---------- Form ---------- */

.mk-add__form {
	background: #fff;
	border: 1px solid var(--ink-5, #e5e7eb);
	border-radius: 16px;
	padding: 28px;
	margin: 0 0 12px;
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.mk-add__fs {
	border: 0;
	padding: 0;
	margin: 0;
}

.mk-add__legend {
	font-family: var( --font-display, "Unbounded", sans-serif );
	font-size: 14px;
	font-weight: 700;
	color: var(--ink-1);
	margin: 0 0 14px;
	padding: 0;
}

.mk-add__row {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
	margin-bottom: 12px;
}
.mk-add__row:last-child { margin-bottom: 0; }
.mk-add__row--2col { grid-template-columns: 1fr 1fr; }

@media ( max-width: 640px ) {
	.mk-add__row--2col { grid-template-columns: 1fr; }
	.mk-add__inner { padding: 28px 18px 40px; }
	.mk-add__form { padding: 22px 18px; }
}

.mk-add__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.mk-add__field--w-full { width: 100%; }

.mk-add__label {
	font-size: 12.5px;
	font-weight: 600;
	color: var(--ink-2);
	letter-spacing: .02em;
}

.mk-add__field input,
.mk-add__field textarea,
.mk-add__field select {
	width: 100%;
	padding: 11px 13px;
	font: inherit;
	font-size: 14px;
	color: var(--ink-1);
	background: #fff;
	border: 1px solid var(--ink-5, #e5e7eb);
	border-radius: 8px;
	transition: border-color .12s, box-shadow .12s;
}

.mk-add__field textarea {
	font-family: inherit;
	resize: vertical;
	min-height: 80px;
}

.mk-add__field select {
	cursor: pointer;
	appearance: none;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.6' fill='none' stroke-linecap='round'/></svg>");
	background-repeat: no-repeat;
	background-position: right 14px center;
	padding-right: 40px;
}

.mk-add__field input:focus,
.mk-add__field textarea:focus,
.mk-add__field select:focus {
	outline: none;
	border-color: #ffd744;
	box-shadow: 0 0 0 3px rgba( 255, 215, 68, .25 );
}

.mk-add__field input.is-invalid,
.mk-add__field textarea.is-invalid,
.mk-add__field select.is-invalid {
	border-color: #e5322a;
	background-color: rgba( 229, 50, 42, .04 );
}

/* ---------- Agreement + submit ---------- */

.mk-add__agreement {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 13px;
	line-height: 1.5;
	color: var(--ink-2);
	cursor: pointer;
}

.mk-add__agreement input { margin-top: 3px; cursor: pointer; }
.mk-add__agreement.is-invalid { color: #e5322a; }

.mk-add__agreement a { color: var(--red, #e5322a); text-decoration: underline; }

.mk-add__msg {
	min-height: 18px;
	font-size: 13px;
	margin-top: -4px;
}
.mk-add__msg.is-error { color: #e5322a; }
.mk-add__msg.is-info  { color: var(--ink-3); }
.mk-add__msg.is-ok    { color: #16a34a; }

.mk-add__submit {
	background: #1c1812;
	color: #ffd744;
	border: 0;
	padding: 14px 24px;
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	border-radius: 10px;
	cursor: pointer;
	transition: background .15s, transform .1s;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}
.mk-add__submit:hover { background: #000; color: #ffe06b; }
.mk-add__submit:active { transform: translateY(1px); }
.mk-add__submit:disabled { opacity: .55; cursor: not-allowed; }

.mk-add__note {
	margin: 8px 0 0;
	font-size: 13px;
	color: var(--ink-3);
	text-align: center;
}
.mk-add__note a { color: var(--ink-1); text-decoration: underline; }

/* ---------- Success state ---------- */

/* Author rules with explicit `display` override the UA `[hidden]` stylesheet,
   so JS-toggled `hidden` won't hide the form/head without this override. */
.mk-add__form[hidden],
.mk-add__head[hidden],
.mk-add__success[hidden] { display: none !important; }

.mk-add__success {
	background: linear-gradient( 135deg, #fffbe9 0%, #fff7d6 100% );
	border: 1px solid #f5d77a;
	border-radius: 18px;
	padding: 50px 32px;
	text-align: center;
}

.mk-add__success-icon {
	width: 72px;
	height: 72px;
	margin: 0 auto 18px;
	background: #16a34a;
	color: #fff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 36px;
	font-weight: 700;
}

.mk-add__success-title {
	font-family: var( --font-display, "Unbounded", sans-serif );
	font-size: 28px;
	margin: 0 0 12px;
	color: var(--ink-1);
}

.mk-add__success-lead {
	font-size: 15px;
	line-height: 1.55;
	color: var(--ink-2);
	max-width: 480px;
	margin: 0 auto 24px;
}

.mk-add__success-btn {
	display: inline-flex;
	padding: 12px 24px;
	background: #1c1812;
	color: #ffd744;
	border-radius: 10px;
	font-weight: 600;
	text-decoration: none;
	font-size: 14px;
}
.mk-add__success-btn:hover { background: #000; color: #ffe06b; }

/* ---------- Dark mode ---------- */

body[data-theme="dark"].mykyiv-catadd-page { background: #1a160c; }
body[data-theme="dark"] .mk-add__title { color: #fff; }
body[data-theme="dark"] .mk-add__lead { color: #c8b481; }
body[data-theme="dark"] .mk-add__form {
	background: var( --paper-3, #2a2515 );
	border-color: #3d3217;
}
body[data-theme="dark"] .mk-add__legend { color: #fff; }
body[data-theme="dark"] .mk-add__field input,
body[data-theme="dark"] .mk-add__field textarea,
body[data-theme="dark"] .mk-add__field select {
	background: #1a160c;
	color: #ece2c6;
	border-color: #3d3217;
}
body[data-theme="dark"] .mk-add__success {
	background: linear-gradient( 135deg, #2a2515 0%, #1f1c10 100% );
	border-color: #5a4a18;
}
body[data-theme="dark"] .mk-add__success-title { color: #fff; }
body[data-theme="dark"] .mk-add__success-lead { color: #c8b481; }

/* ========== Searchable combobox (категорія) ========== */

.mk-add__combo {
	position: relative;
}

.mk-add__combo-input {
	width: 100%;
	padding: 11px 36px 11px 13px; /* place for ▾ toggle */
	font: inherit;
	font-size: 14px;
	color: var(--ink-1);
	background: #fff;
	border: 1px solid var(--ink-5, #e5e7eb);
	border-radius: 8px;
	transition: border-color .12s, box-shadow .12s;
}

.mk-add__combo-input::placeholder { color: #9ca3af; }

.mk-add__combo-input:focus {
	outline: none;
	border-color: #ffd744;
	box-shadow: 0 0 0 3px rgba( 255, 215, 68, .25 );
}

.mk-add__combo-input.is-invalid,
.mk-add__combo.is-invalid .mk-add__combo-input {
	border-color: #e5322a;
	background-color: rgba( 229, 50, 42, .04 );
}

.mk-add__combo-toggle {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY( -50% );
	width: 22px;
	height: 22px;
	border: 0;
	background: transparent;
	font-size: 13px;
	color: #9ca3af;
	cursor: pointer;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
}
.mk-add__combo-toggle:hover { color: var(--ink-1); background: #f3f4f6; }

.mk-add__combo-list {
	position: absolute;
	top: calc( 100% + 4px );
	left: 0;
	right: 0;
	max-height: 280px;
	overflow-y: auto;
	background: #fff;
	border: 1px solid var(--ink-5, #e5e7eb);
	border-radius: 10px;
	box-shadow: 0 10px 30px -8px rgba( 0, 0, 0, .15 );
	margin: 0;
	padding: 4px;
	list-style: none;
	z-index: 100;
}

.mk-add__combo-list[hidden] { display: none; }

.mk-add__combo-item {
	padding: 8px 10px;
	font-size: 13.5px;
	color: var(--ink-1);
	border-radius: 6px;
	cursor: pointer;
	transition: background-color .1s;
	user-select: none;
}

.mk-add__combo-item:hover,
.mk-add__combo-item.is-highlight {
	background: rgba( 255, 215, 68, .25 );
}

.mk-add__combo-item.is-empty {
	color: #9ca3af;
	font-style: italic;
	cursor: default;
}
.mk-add__combo-item.is-empty:hover {
	background: transparent;
}

.mk-add__combo-more {
	padding: 8px 10px;
	font-size: 11.5px;
	color: var(--ink-3);
	font-style: italic;
	border-top: 1px dashed var(--ink-5, #e5e7eb);
	margin-top: 4px;
	list-style: none;
}

/* ========== Dark mode для combobox ========== */

body[data-theme="dark"] .mk-add__combo-input {
	background: #1a160c;
	color: #ece2c6;
	border-color: #3d3217;
}
body[data-theme="dark"] .mk-add__combo-input::placeholder { color: #786a45; }
body[data-theme="dark"] .mk-add__combo-toggle { color: #786a45; }
body[data-theme="dark"] .mk-add__combo-toggle:hover { color: #ffd744; background: #2a2515; }
body[data-theme="dark"] .mk-add__combo-list {
	background: #2a2515;
	border-color: #3d3217;
}
body[data-theme="dark"] .mk-add__combo-item { color: #ece2c6; }
body[data-theme="dark"] .mk-add__combo-item:hover,
body[data-theme="dark"] .mk-add__combo-item.is-highlight {
	background: rgba( 255, 215, 68, .15 );
}
body[data-theme="dark"] .mk-add__combo-more { color: #786a45; border-color: #3d3217; }
