/*
 * IMPORTANT: replace the values below with your actual theme variables.
 * Open devtools on juplee.in > Elements > :root, and copy the real
 * brand color / font values so this form matches exactly instead of
 * approximating it. These are placeholders only.
 */
.juplee-story-wrap {
	--jp-accent: #642017;      /* replace: brand primary (rose/maroon) */
	--jp-accent-2: #B8895D;    /* replace: brand secondary / gold accent */
	--jp-ink: #2B2420;         /* replace: body text color */
	--jp-bg: #F7F3EC;          /* replace: ivory/cream background */
	--jp-surface: #FFFFFF;     /* card surface color */
	--jp-border: #E7DFD3;      /* replace: subtle border color */
	--jp-font-display: 'Playfair Display', Georgia, serif; /* replace with theme heading font */
	--jp-font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;    /* replace with theme body font */

	--jp-radius: 18px;
	--jp-shadow: 0 1px 2px rgba(43,36,32,0.04), 0 16px 40px -20px rgba(43,36,32,0.22);

	box-sizing: border-box;
	width: 100%;
	max-width: 620px;
	margin: 0 auto;
	padding: 0;
	font-family: var(--jp-font-body);
	color: var(--jp-ink);
}

.juplee-story-wrap *,
.juplee-story-wrap *::before,
.juplee-story-wrap *::after {
	box-sizing: border-box;
}

.juplee-story-invalid {
	text-align: center;
	padding-block: clamp(3rem, 10vw, 6rem);
	font-size: clamp(0.95rem, 1vw + 0.7rem, 1.1rem);
}

/* ---------- Card shell ---------- */
.juplee-story-card {
	position: relative;
	background: var(--jp-surface);
	border: 1px solid var(--jp-border);
	border-radius: var(--jp-radius);
	box-shadow: var(--jp-shadow);
	padding: clamp(1.5rem, 5vw, 2.75rem);
	overflow: hidden;
}

.juplee-story-card::before {
	content: '';
	position: absolute;
	inset: 0 0 auto 0;
	height: 4px;
	background: linear-gradient(90deg, var(--jp-accent), var(--jp-accent-2));
}

.juplee-story-card__head {
	margin-bottom: 1.75rem;
}

.juplee-story-kicker {
	display: inline-block;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--jp-accent);
	margin-bottom: 0.6rem;
}

.juplee-story-title {
	font-family: var(--jp-font-display);
	font-size: clamp(1.4rem, 2vw + 1rem, 1.9rem);
	line-height: 1.2;
	margin: 0 0 0.5rem;
	color: var(--jp-ink);
}

.juplee-story-sub {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.5;
	color: var(--jp-ink);
	opacity: 0.65;
}

/* ---------- Form layout ---------- */
#juplee-story-form {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.juplee-field {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.juplee-field-label {
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--jp-ink);
}

.juplee-field-label em {
	font-style: normal;
	font-weight: 400;
	opacity: 0.55;
	font-size: 0.78rem;
}

.juplee-optional {
	font-weight: 400;
	opacity: 0.55;
	font-size: 0.8em;
}

/* ---------- Floating label inputs ---------- */
.juplee-field--floating {
	position: relative;
}

.juplee-field--floating input[type="text"],
.juplee-field--floating textarea {
	width: 100%;
	font-family: var(--jp-font-body);
	font-size: 1rem;
	line-height: 1.5;
padding: 2.25rem 1rem 1.6rem;
	border: 1.5px solid var(--jp-border);
	border-radius: 12px;
	background: var(--jp-bg);
	color: var(--jp-ink);
	resize: vertical;
	transition: border-color 0.18s ease, background 0.18s ease;
}

.juplee-field--floating textarea {
	min-height: 130px;
	padding-top: 1.5rem;
}

.juplee-field--floating input[type="text"]:focus,
.juplee-field--floating textarea:focus {
	outline: none;
	border-color: var(--jp-accent);
	background: var(--jp-surface);
}

.juplee-field--floating label {
	position: absolute;
	left: 1rem;
	top: 1rem;
	font-size: 1rem;
	color: var(--jp-ink);
	opacity: 0.5;
	pointer-events: none;
	transform-origin: left top;
	transition: transform 0.16s ease, opacity 0.16s ease, top 0.16s ease;
}

.juplee-field--floating input[type="text"]:focus + label,
.juplee-field--floating input[type="text"]:not(:placeholder-shown) + label,
.juplee-field--floating textarea:focus + label,
.juplee-field--floating textarea:not(:placeholder-shown) + label {
	top: 0.45rem;
	transform: scale(0.76);
	opacity: 0.65;
}

.juplee-char-count {
	align-self: flex-end;
	font-size: 0.75rem;
	color: var(--jp-ink);
	opacity: 0.4;
}

.juplee-char-count.is-near-limit {
	color: var(--jp-accent);
	opacity: 0.85;
}

/* ---------- Dropzone ---------- */
.juplee-dropzone {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	text-align: center;
	padding: 1.75rem 1rem;
	border: 1.5px dashed var(--jp-border);
	border-radius: 14px;
	background: var(--jp-bg);
	color: var(--jp-ink);
	cursor: pointer;
	transition: border-color 0.18s ease, background 0.18s ease, transform 0.12s ease;
}

.juplee-dropzone:hover {
	border-color: var(--jp-accent-2);
}

.juplee-dropzone.is-dragover {
	border-color: var(--jp-accent);
	background: var(--jp-surface);
	transform: scale(1.01);
}

.juplee-dropzone-icon {
	width: 26px;
	height: 26px;
	color: var(--jp-accent);
	opacity: 0.85;
}

.juplee-dropzone-text {
	font-size: 0.88rem;
	opacity: 0.7;
}

.juplee-dropzone-text strong {
	color: var(--jp-accent);
	font-weight: 600;
}

/* ---------- Image preview chips ---------- */
.juplee-image-preview {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}

.juplee-image-chip {
	position: relative;
	width: 68px;
	height: 68px;
	border-radius: 10px;
	overflow: hidden;
	border: 1px solid var(--jp-border);
	flex: 0 0 auto;
}

.juplee-image-chip img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.juplee-image-chip button {
	position: absolute;
	top: 2px;
	right: 2px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: none;
	background: rgba(20,16,14,0.65);
	color: #fff;
	font-size: 11px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.juplee-image-chip button:hover {
	background: var(--jp-accent);
}

/* Honeypot: visually hidden from real visitors, but still present in the
   DOM for bots to fill in — do not use display:none, some bots skip those. */
.juplee-hp-field {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ---------- Submit button ---------- */
.juplee-submit-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	font-family: var(--jp-font-body);
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	color: #fff;
	background: var(--jp-accent);
	border: none;
	border-radius: 12px;
	padding: 0.95rem 1.5rem;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
	box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--jp-accent) 70%, transparent);
}

.juplee-submit-btn__icon {
	width: 18px;
	height: 18px;
	transition: transform 0.18s ease;
}

.juplee-submit-btn:hover:not(:disabled) {
	transform: translateY(-1px);
	box-shadow: 0 14px 28px -12px color-mix(in srgb, var(--jp-accent) 80%, transparent);
}

.juplee-submit-btn:hover:not(:disabled) .juplee-submit-btn__icon {
	transform: translateX(3px);
}

.juplee-submit-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

/* ---------- Messages ---------- */
.juplee-form-message {
	font-size: 0.9rem;
	padding: 0.85rem 1rem;
	border-radius: 10px;
	background: var(--jp-bg);
}

.juplee-form-message.is-error {
	background: #FBEAEA;
	color: #9B2C2C;
}

.juplee-form-message.is-success {
	background: #EAF3EA;
	color: #276749;
}

/* ---------- Success state ---------- */
.juplee-story-success {
	text-align: center;
	padding: clamp(1.5rem, 5vw, 2.5rem) 1rem;
	animation: juplee-pop 0.4s ease;
}

.juplee-success-icon {
	width: 52px;
	height: 52px;
	color: var(--jp-accent);
	margin-bottom: 0.75rem;
}

.juplee-success-title {
	font-family: var(--jp-font-display);
	font-size: 1.5rem;
	margin: 0 0 0.4rem;
	color: var(--jp-ink);
}

.juplee-success-sub {
	margin: 0;
	font-size: 0.95rem;
	color: var(--jp-ink);
	opacity: 0.65;
	max-width: 380px;
	margin-inline: auto;
}

@keyframes juplee-pop {
	from { opacity: 0; transform: scale(0.94) translateY(6px); }
	to   { opacity: 1; transform: scale(1) translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
	.juplee-story-success { animation: none; }
	.juplee-submit-btn, .juplee-submit-btn__icon, .juplee-dropzone { transition: none; }
}

/* ---------- Mobile ---------- */
@media (max-width: 480px) {
	.juplee-story-card {
		padding: 1.25rem;
		border-radius: 14px;
	}
	.juplee-submit-btn {
		padding: 0.8rem 1.2rem;
		font-size: 0.95rem;
	}
}