/* =========================================================
   SamSam Newsletter Tab - fixed side tab + popup form
   Colours come from the dashboard settings (CSS variables
   are set inline on .ssnt-root).
   ========================================================= */

.ssnt-root {
	--ssnt-accent: #6EA24D;
	--ssnt-b1: #5F9642;
	--ssnt-b2: #41968A;
	--ssnt-ink: #1F3D2B;
	--ssnt-tabfg: #fff;
	--ssnt-top: 50%;
	--ssnt-ova: .55;
	--ssnt-py: 16px;
	--ssnt-px: 18px;
	--ssnt-ring: rgba(110, 162, 77, .24);
	font-family: inherit;
	color: var(--ssnt-ink);
	-webkit-font-smoothing: antialiased;
}
.ssnt-root *, .ssnt-root *::before, .ssnt-root *::after { box-sizing: border-box; }
.ssnt-root .screen-reader-text {
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0;
}

/* ---------- Fixed tab ---------- */
.ssnt-root button.ssnt-tab {
	position: fixed;
	top: var(--ssnt-top);
	z-index: 99990;
	display: flex; flex-direction: column; align-items: center; gap: 12px;
	margin: 0; padding: 18px 13px;
	font: inherit; font-size: 15px; font-weight: 700; line-height: 1; letter-spacing: .04em; text-transform: none; text-decoration: none;
	color: var(--ssnt-tabfg);
	background: var(--ssnt-accent);
	border: 0; border-radius: 0;
	box-shadow: 0 10px 30px -8px rgba(31, 61, 43, .45);
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}
.ssnt-side-right button.ssnt-tab {
	right: 0;
	border-radius: 14px 0 0 14px;
	transform: translateY(-50%);
}
.ssnt-side-left button.ssnt-tab {
	left: 0;
	border-radius: 0 14px 14px 0;
	transform: translateY(-50%);
}
.ssnt-side-right button.ssnt-tab:hover, .ssnt-side-right button.ssnt-tab:focus-visible { transform: translateY(-50%) translateX(-4px); filter: brightness(1.06); }
.ssnt-side-left button.ssnt-tab:hover, .ssnt-side-left button.ssnt-tab:focus-visible { transform: translateY(-50%) translateX(4px); filter: brightness(1.06); }
.ssnt-root button.ssnt-tab:focus-visible { outline: 3px solid var(--ssnt-ring); outline-offset: 2px; }
.ssnt-tab-ico { display: inline-flex; }
.ssnt-tab-text { writing-mode: vertical-rl; white-space: nowrap; }
.ssnt-side-left .ssnt-tab-text { transform: rotate(180deg); }

@media (max-width: 640px) {
	.ssnt-root button.ssnt-tab { padding: 14px 10px; font-size: 14px; }
	.ssnt-root.ssnt-hide-mobile button.ssnt-tab { display: none; }
}

/* ---------- Modal ---------- */
.ssnt-modal {
	position: fixed; inset: 0; z-index: 99995;
	display: flex; align-items: center; justify-content: center;
	padding: 16px;
	opacity: 0; transition: opacity .25s ease;
}
.ssnt-modal[hidden] { display: none !important; }
.ssnt-root.is-open .ssnt-modal { opacity: 1; }
.ssnt-backdrop {
	position: absolute; inset: 0;
	background: rgba(18, 38, 26, var(--ssnt-ova));
	-webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.ssnt-dialog {
	position: relative;
	width: 100%; max-width: 480px;
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	overflow-y: auto; overscroll-behavior: contain;
	background: #fff;
	border-radius: 26px;
	box-shadow: 0 40px 90px -24px rgba(18, 38, 26, .55);
	outline: 0;
	transform: translateY(18px) scale(.97);
	transition: transform .3s cubic-bezier(.2, .9, .3, 1.1);
}
.ssnt-root.is-open .ssnt-dialog { transform: none; }

.ssnt-root button.ssnt-x {
	position: absolute; top: 14px; right: 14px; z-index: 2;
	display: inline-flex; align-items: center; justify-content: center;
	width: 36px; height: 36px; margin: 0; padding: 0;
	color: #5C6F63; background: #F1F5EC;
	border: 0; border-radius: 50%; box-shadow: none;
	cursor: pointer; transition: background .2s, color .2s, transform .2s;
}
.ssnt-root button.ssnt-x:hover { background: #E3EBDB; color: var(--ssnt-ink); transform: rotate(90deg); }
.ssnt-root button.ssnt-x:focus-visible { outline: 3px solid var(--ssnt-ring); outline-offset: 2px; }

html.ssnt-lock, html.ssnt-lock body { overflow: hidden !important; }

/* ---------- Card ---------- */
.ssnt-card { position: relative; padding: 40px 34px 30px; }
@media (max-width: 480px) { .ssnt-card { padding: 34px 22px 24px; } }

.ssnt-logo-wrap { display: flex; justify-content: center; margin: 0 0 18px; line-height: 0; }
.ssnt-logo { display: block; width: auto; height: auto; max-width: 150px; max-height: 64px; object-fit: contain; border: 0; box-shadow: none; }

.ssnt-card-head { margin: 0 0 22px; text-align: center; }
.ssnt-card-title { margin: 0 0 6px; padding: 0; font-size: 26px; font-weight: 800; line-height: 1.2; color: var(--ssnt-ink); }
.ssnt-card-sub { margin: 0; padding: 0; font-size: 15px; line-height: 1.5; color: #5C6F63; }

.ssnt-form-view { transition: opacity .3s ease, transform .3s ease; }
.ssnt-form-view.is-leaving { opacity: 0; transform: translateY(-10px); }
.ssnt-form-view[hidden] { display: none; }

/* ---------- Fields ---------- */
.ssnt-fields { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px 12px; }
.ssnt-field { min-width: 0; grid-column: span 6; }
.ssnt-w-66 { grid-column: span 4; }
.ssnt-w-50 { grid-column: span 3; }
.ssnt-w-33 { grid-column: span 2; }
@media (max-width: 520px) { .ssnt-field { grid-column: span 6 !important; } }

.ssnt-label { display: block; margin: 0 0 8px; padding: 0; font-size: 14px; font-weight: 600; color: #5C6F63; }
.ssnt-req { color: #C0392B; }

.ssnt-control { position: relative; display: block; }
.ssnt-root .ssnt-input {
	display: block; width: 100%; height: auto; min-height: 0; margin: 0;
	padding: var(--ssnt-py) var(--ssnt-px);
	font: inherit; font-size: 16px; font-weight: 500; line-height: 1.3;
	color: var(--ssnt-ink);
	background: #F6F9F1;
	border: 2px solid #DDE7D6; border-radius: 14px;
	outline: 0; box-shadow: none;
	-webkit-appearance: none; appearance: none;
	transition: border-color .2s, background-color .2s, outline-color .2s;
}
.ssnt-root textarea.ssnt-input { resize: vertical; min-height: 100px; }
.ssnt-root .ssnt-input::placeholder { color: #8C9C92; opacity: 1; }
.ssnt-root .ssnt-input:focus { background: #fff; border-color: var(--ssnt-accent); outline: 4px solid var(--ssnt-ring); outline-offset: 0; box-shadow: none; }
.ssnt-root .ssnt-input.is-invalid { border-color: #D9534F; background: #FFF4F3; }

/* Floating labels */
.ssnt-labels-floating .ssnt-input { padding-top: calc(var(--ssnt-py) + 9px); padding-bottom: calc(var(--ssnt-py) - 7px); }
.ssnt-float {
	position: absolute; left: calc(var(--ssnt-px) + 2px); top: 50%; z-index: 1;
	max-width: calc(100% - 2 * var(--ssnt-px));
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
	margin: 0; padding: 0;
	font-size: 16px; font-weight: 500; line-height: 1; color: #8C9C92;
	transform: translateY(-50%);
	pointer-events: none;
	transition: top .18s ease, transform .18s ease, font-size .18s ease, color .18s ease;
}
.ssnt-type-textarea .ssnt-float { top: calc(var(--ssnt-py) + 8px); transform: none; }
.ssnt-input:focus ~ .ssnt-float,
.ssnt-input:not(:placeholder-shown) ~ .ssnt-float,
.ssnt-type-select .ssnt-float {
	top: 9px; transform: none;
	font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
	color: var(--ssnt-accent);
}
.ssnt-labels-floating .ssnt-input::placeholder { color: transparent; }

/* Select arrow */
.ssnt-type-select .ssnt-input { padding-right: 44px; cursor: pointer; }
.ssnt-type-select .ssnt-control::after {
	content: ""; position: absolute; right: 18px; top: 50%;
	width: 8px; height: 8px; margin-top: -6px;
	border: solid #8C9C92; border-width: 0 2.5px 2.5px 0;
	transform: rotate(45deg); pointer-events: none;
}

/* ---------- Chips ---------- */
.ssnt-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.ssnt-fieldset .ssnt-label { margin-bottom: 10px; }
.ssnt-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ssnt-chip { position: relative; margin: 0; cursor: pointer; }
.ssnt-chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ssnt-chip span {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 9px 15px;
	font-size: 14px; font-weight: 600; line-height: 1.2; color: var(--ssnt-ink);
	background: #F6F9F1; border: 2px solid #DDE7D6; border-radius: 999px;
	transition: background .2s, border-color .2s, color .2s, transform .15s;
}
.ssnt-chip:hover span { background: #EEF2C6; border-color: #AFB425; }
.ssnt-chip input:checked + span { background: var(--ssnt-accent); border-color: var(--ssnt-accent); color: #fff; }
.ssnt-chip input:checked + span::before { content: "\2713"; font-weight: 800; font-size: .9em; }
.ssnt-chip input:active + span { transform: scale(.96); }
.ssnt-chip input:focus-visible + span { outline: 3px solid var(--ssnt-ring); outline-offset: 2px; }
.ssnt-fieldset.is-invalid .ssnt-chip span { border-color: #D9534F; }

/* ---------- Checkbox / consent ---------- */
.ssnt-check { position: relative; display: flex; align-items: flex-start; gap: 12px; margin: 0; cursor: pointer; }
.ssnt-check input { position: absolute; left: 0; top: 0; width: 20px; height: 20px; margin: 0; opacity: 0; cursor: pointer; }
.ssnt-box {
	position: relative; flex: none; display: block;
	width: 20px; height: 20px; margin-top: 1px;
	background: #fff; border: 2px solid #C5D3BC; border-radius: 6px;
	transition: background .2s, border-color .2s;
}
.ssnt-box::after {
	content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px;
	border: solid #fff; border-width: 0 2.5px 2.5px 0;
	transform: rotate(45deg) scale(0); transition: transform .18s ease;
}
.ssnt-check input:checked + .ssnt-box { background: var(--ssnt-accent); border-color: var(--ssnt-accent); }
.ssnt-check input:checked + .ssnt-box::after { transform: rotate(45deg) scale(1); }
.ssnt-check input:focus-visible + .ssnt-box { outline: 3px solid var(--ssnt-ring); outline-offset: 2px; }
.ssnt-check.is-invalid .ssnt-box { border-color: #D9534F; }
.ssnt-check-text { font-size: 13px; line-height: 1.5; color: #5C6F63; }
.ssnt-check-text a { color: #4A7A31; text-decoration: underline; }
.ssnt-check-text p { margin: 0; }
.ssnt-consent { margin-top: 18px; }

.ssnt-hp { position: absolute !important; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Messages ---------- */
.ssnt-message { margin-top: 14px; padding: 12px 14px; border-radius: 12px; font-size: 14px; font-weight: 600; line-height: 1.4; }
.ssnt-message[hidden] { display: none; }
.ssnt-message.is-error { color: #A52A1F; background: #FDECEA; }
.ssnt-message.is-info { color: #2F5A47; background: #E8F4EE; }

/* ---------- Button ---------- */
.ssnt-submit-row { display: flex; margin-top: 20px; }
.ssnt-root .ssnt-btn {
	position: relative; overflow: hidden;
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	width: 100%; height: auto; margin: 0; padding: 17px 28px;
	font: inherit; font-size: 17px; font-weight: 800; line-height: 1.2; letter-spacing: 0; text-transform: none; text-decoration: none;
	color: #fff;
	background: linear-gradient(100deg, var(--ssnt-b1), var(--ssnt-b2));
	border: 0; border-radius: 16px;
	box-shadow: 0 14px 30px -10px rgba(63, 130, 90, .65);
	cursor: pointer;
	transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}
.ssnt-root .ssnt-btn::after {
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .38) 50%, transparent 70%);
	transform: translateX(-120%); transition: transform .7s ease;
}
.ssnt-root .ssnt-btn:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -10px rgba(63, 130, 90, .75); color: #fff; }
.ssnt-root .ssnt-btn:hover::after { transform: translateX(120%); }
.ssnt-root .ssnt-btn:hover .ssnt-btn-ico { transform: translateX(3px); }
.ssnt-root .ssnt-btn:focus-visible { outline: 4px solid var(--ssnt-ring); outline-offset: 3px; }
.ssnt-btn-ico { display: inline-flex; transition: transform .25s ease; }
.ssnt-spinner {
	display: none; width: 1.1em; height: 1.1em; flex: none;
	border: 2.5px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%;
	animation: ssnt-spin .7s linear infinite;
}
.ssnt-btn.is-loading { pointer-events: none; opacity: .92; }
.ssnt-btn.is-loading .ssnt-spinner { display: inline-block; }
.ssnt-btn.is-loading .ssnt-btn-ico { display: none; }

.ssnt-footnote {
	display: flex; align-items: center; justify-content: center; gap: 7px;
	margin: 14px 0 0; padding: 0; font-size: 13px; font-weight: 500; line-height: 1.4; color: #7A8B81;
}
.ssnt-footnote svg { flex: none; color: var(--ssnt-accent); }

/* ---------- Thank-you panel ---------- */
.ssnt-success { text-align: center; padding: 10px 0 4px; animation: ssnt-pop .5s cubic-bezier(.2, .9, .3, 1.2); }
.ssnt-success[hidden] { display: none; }
.ssnt-check-anim { width: 88px; height: 88px; margin: 0 auto 16px; }
.ssnt-check-anim svg { display: block; width: 100%; height: 100%; }
.ssnt-check-c { fill: rgba(110, 162, 77, .1); stroke: var(--ssnt-accent); stroke-width: 2.5; stroke-dasharray: 152; stroke-dashoffset: 152; }
.ssnt-check-t { stroke: var(--ssnt-accent); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; }
.ssnt-card.is-done .ssnt-check-c { animation: ssnt-draw .7s ease forwards; }
.ssnt-card.is-done .ssnt-check-t { animation: ssnt-draw .45s .55s ease forwards; }
.ssnt-success-title { margin: 0 0 10px; padding: 0; font-size: 26px; font-weight: 800; line-height: 1.2; color: var(--ssnt-ink); }
.ssnt-success-text { margin: 0 auto 6px; max-width: 36ch; font-size: 16px; line-height: 1.6; color: #4A5D50; }
.ssnt-root .ssnt-success-btn { width: auto; margin-top: 18px; }

/* ---------- Keyframes ---------- */
@keyframes ssnt-spin { to { transform: rotate(360deg); } }
@keyframes ssnt-draw { to { stroke-dashoffset: 0; } }
@keyframes ssnt-pop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
	.ssnt-root *, .ssnt-root *::before, .ssnt-root *::after { animation: none !important; transition-duration: .01ms !important; }
	.ssnt-check-c, .ssnt-check-t { stroke-dashoffset: 0 !important; }
}
