/* Hint under a tool prompt. Scoped to the block only. */

.kk-prompt-help {
	box-sizing: border-box;
	max-width: 100%;
	margin: 0.45rem 0 0;
}

.kk-prompt-help__text {
	margin: 0 0 0.35rem;
	max-width: 100%;
	font-family: var(--mk-font, Inter, system-ui, sans-serif);
	font-size: 0.75rem;
	line-height: 1.35;
	color: var(--mk-muted, #5c6480);
}

.kk-prompt-help__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	max-width: 100%;
}

.kk-prompt-help__btn {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 1 1 8.5rem;
	min-width: 0;
	max-width: 100%;
	margin: 0;
	padding: 0.28rem 0.65rem;
	border: 1px solid rgba(34, 51, 130, 0.22);
	border-radius: 999px;
	background: #fff;
	color: var(--mk-royal, #223382);
	font-family: var(--mk-font-display, Manrope, system-ui, sans-serif);
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	white-space: normal;
	cursor: pointer;
}

.kk-prompt-help__btn:hover,
.kk-prompt-help__btn:focus-visible {
	border-color: var(--mk-orange, #f98513);
	color: var(--mk-royal, #223382);
	outline: none;
}

@media (max-width: 414px) {
	.kk-prompt-help__text {
		font-size: 0.72rem;
	}

	.kk-prompt-help__actions {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	}

	.kk-prompt-help__btn {
		width: 100%;
		padding: 0.32rem 0.4rem;
		font-size: 0.72rem;
	}
}

/* 1.9.147 — mobile layout fixes for tool cards (scoped, no html/body rules). */

/* Grid blowout: .mk-tool-text__form / __field are grids with implicit auto
   tracks; a nowrap child (long uploaded filename) pushed the track past the card. */
.kk-tool-card form,
.kk-tool-card form > *,
.kk-tool-card .mk-tool-text__field,
.kk-tool-card .mk-tool-text__row > * {
	min-width: 0;
	max-width: 100%;
}

.kk-tool-card .mk-tool-text__form,
.kk-tool-card .mk-tool-text__field {
	grid-template-columns: minmax(0, 1fr);
}

.kk-tool-card form :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea) {
	box-sizing: border-box;
	max-width: 100%;
}

/* Uploaded file names: long unbroken names must never set the min-content width. */
.kk-tool-card .mk-tool-ie__file-card,
.kk-tool-card .mk-tool-ie__file-meta {
	min-width: 0;
	max-width: 100%;
}

.kk-tool-card .mk-tool-ie__file-name {
	min-width: 0;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.kk-tool-card label[class*="__drop"] {
	box-sizing: border-box;
	min-width: 0;
	max-width: 100%;
}

.kk-tool-card [class*="__drop-hint"],
.kk-tool-card [class*="__drop-title"],
.kk-tool-card .mk-tool-text__field-note {
	min-width: 0;
	max-width: 100%;
	overflow-wrap: anywhere;
}

/* Elements the tool scripts hide via the hidden attribute (cabinet picker, library,
   empty previews/thumbs) had display:grid/flex that overrode it — empty bars on mobile. */
.kk-tool-card [hidden] {
	display: none !important;
}

/* «Написать в ВК» is a link: body.mk-shell a recoloured it to pale azure. */
.kk-prompt-help a.kk-prompt-help__btn,
.kk-prompt-help a.kk-prompt-help__btn:visited {
	color: var(--mk-royal, #223382);
	text-decoration: none;
}

.kk-prompt-help a.kk-prompt-help__btn:hover,
.kk-prompt-help a.kk-prompt-help__btn:focus-visible {
	color: var(--mk-royal, #223382);
	border-color: var(--mk-orange, #f98513);
}

/* Room under the tool so the submit can scroll clear of the floating VK button. */
@media (max-width: 768px) {
	#primary.site-main--page {
		padding-bottom: 90px;
	}
}
