/* SK1: свадебная страница по макету 2.9 (inc/wedding-v2.php), поверх nl-wedding.css.
   Правило DF1: у каждой горизонтальной ленты position: relative; overflow-x: hidden на html
   и body не ставим никогда. */

.nl-wed-gal__strip { position: relative; }

/* Две кнопки вверху. */
.nl-wed2-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px !important; }
.nl-wed2-ctas .nl-wed-btn { flex: 0 1 auto; }
.nl-wed-list__body + .nl-wed-list__body { margin-top: 10px; }

/* Форма после галерей. */
.nl-wed2-form {
	margin-top: 44px; border-top: 1px solid var(--nl-ink, #222222); padding-top: 14px;
	scroll-margin-top: calc(var(--nl-header-h, 0px) + 16px);
}
.nl-wed2-form__label { display: none; font-size: 11px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--nl-mute, #6e6e6e); }
.nl-wed2-form__title { font-weight: 300; font-size: 22px; line-height: 1.2; margin: 0; text-wrap: balance; }
.nl-wed2-form .nl-quick--top { margin-top: 18px; }
.nl-wed2-form .nl-inq { margin-top: 26px; }
.nl-wed2-form__side { display: none; }
.nl-wed2-form__main:has(.nl-inq-ok) .nl-quick--top { display: none; }

/* Строки-приглашения: только планшет и десктоп. */
.nl-wed2-invite { display: none; }

/* Липкая полоса и лист: только мобайл (до 767). */
.nl-wed2-bar {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; max-width: 100vw;
	background: var(--nl-surface, #f7f5f1); border-top: 1px solid var(--nl-line, #e6e3dc);
	padding: 0 0 env(safe-area-inset-bottom, 0);
	transform: translateY(100%); opacity: 0; pointer-events: none; transition: transform .25s, opacity .25s;
}
.nl-wed2-bar.is-on { transform: translateY(0); opacity: 1; pointer-events: auto; }
.nl-wed2-bar__in { padding: 10px 12px; }
.nl-wed2-bar__btn {
	width: 100%; padding: 15px; border: 1px solid var(--nl-ink, #222222); border-radius: 0;
	background: var(--nl-ink, #222222); color: #fff; cursor: pointer;
	font: 700 14px/1 var(--wp--preset--font-family--open-sans, "Open Sans", sans-serif);
}
html.nl-wed2-bar-on body { padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }

.nl-sheet-backdrop { position: fixed; inset: 0; z-index: 9990; background: rgba(20, 30, 25, 0.42); opacity: 0; transition: opacity .3s; }
.nl-sheet-backdrop.is-open { opacity: 1; }
.nl-sheet {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 9991; box-sizing: border-box;
	max-height: 90vh; max-height: 90dvh; overflow-y: auto; overscroll-behavior: contain;
	background: var(--nl-canvas, #ffffff); border-top: 1px solid var(--nl-line, #e6e3dc);
	padding-bottom: env(safe-area-inset-bottom, 0);
	transform: translateY(105%); transition: transform .34s cubic-bezier(.4, 0, .2, 1);
}
.nl-sheet.is-open { transform: translateY(0); }
.nl-sheet[hidden], .nl-sheet-backdrop[hidden] { display: none; }
.nl-sheet__head { position: sticky; top: 0; z-index: 1; background: var(--nl-canvas, #ffffff); padding: 10px 18px 14px; border-bottom: 1px solid var(--nl-line, #e6e3dc); }
.nl-sheet__grip { width: 40px; height: 3px; background: var(--nl-line, #e6e3dc); margin: 0 auto 12px; }
.nl-sheet__row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.nl-sheet__title { font-size: 19px; font-weight: 300; line-height: 1.25; margin: 0; text-wrap: balance; }
.nl-sheet__close { border: 0; background: none; font-size: 26px; line-height: 1; color: var(--nl-ink, #222222); padding: 0 2px; min-width: 40px; min-height: 40px; cursor: pointer; }
.nl-sheet__body { padding: 18px 18px 26px; }
.nl-sheet .nl-quick { margin-top: 24px; }
.nl-sheet__body:has(.nl-inq-ok) .nl-quick { display: none; }

/* Временная блокировка прокрутки, пока лист открыт; позиция возвращается при закрытии. */
html.nl-sheet-lock body { position: fixed; left: 0; right: 0; top: var(--nl-lock-top, 0); }

@media (min-width: 768px) {
	.nl-wed2-bar, .nl-sheet, .nl-sheet-backdrop { display: none !important; }
	html.nl-wed2-bar-on body { padding-bottom: 0; }

	.nl-wed2-ctas { margin-top: 22px !important; }

	.nl-wed2-invite {
		display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px 28px;
		margin: 0 calc(var(--nl-wg, 32px) * -1); padding: 22px var(--nl-wg, 32px);
		border-top: 1px solid var(--nl-line, #e6e3dc); border-bottom: 1px solid var(--nl-line, #e6e3dc);
	}
	.nl-wed2-invite__gap { display: none; }
	.nl-wed2-invite__text { font-size: 20px; font-weight: 300; line-height: 1.3; margin: 0; }
	.nl-wed2-invite__btn { padding: 13px 24px; font-size: 12.5px; }

	.nl-wed2-form { margin-top: 56px; display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 0 32px; }
	.nl-wed2-form__title { font-size: 26px; margin-bottom: 22px; grid-column: 1 / -1; }
	.nl-wed2-form .nl-quick--top { display: none; }
	.nl-wed2-form .nl-inq { margin-top: 0; }
	.nl-wed2-form__side { display: block; }
}

@media (min-width: 768px) and (max-width: 1023px) {
	.nl-wed2-form__main { display: contents; }
	.nl-wed2-form__main > .nl-inq { grid-column: 1; }
	.nl-wed2-form__side { grid-column: 2; }
}

@media (min-width: 1024px) {
	.nl-wed2-ctas { margin-top: 9px !important; }
	.nl-wed2-invite { display: grid; grid-template-columns: 190px minmax(0, 1fr) auto; gap: 20px 48px; padding: 24px var(--nl-wg, 40px); }
	.nl-wed2-invite__gap { display: block; }
	.nl-wed2-invite__text { font-size: 22px; }
	.nl-wed2-invite__btn { padding: 14px 26px; font-size: 13px; }

	.nl-wed2-form { grid-template-columns: 190px minmax(0, 520px) 300px; gap: 48px; margin-top: 72px; padding-top: 16px; }
	.nl-wed2-form__label { display: block; position: sticky; top: calc(var(--nl-header-h, 0px) + 18px); align-self: start; }
	.nl-wed2-form__title { font-size: 30px; margin-bottom: 24px; grid-column: auto; }
	.nl-wed2-form__side { padding-top: 6px; }
}

@media (prefers-reduced-motion: reduce) {
	.nl-wed2-bar, .nl-sheet, .nl-sheet-backdrop { transition: none; }
}
