/**
 * Enhanced Form Confirmation UI - Ella Jaymes Photography
 * 
 * Professional form submission confirmation with smooth animations,
 * animated checkmark, and seamless UI transitions that maintain
 * exact form dimensions for zero layout shift.
 * 
 * @version 1.0
 * @package EllaJaymesForms
 */

/* ===== SUCCESS CONFIRMATION CONTAINER ===== */
.form-success-container {
	display: none;
	position: relative;
	min-height: 580px; /* Match approximate form height */
	padding: 40px 30px;
	background-color: var(--primary-color);
	text-align: center;
	opacity: 0;
	transform: translateY(20px);
	transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
	border-radius: 8px;
	box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.form-success-container.show {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	opacity: 1;
	transform: translateY(0);
}

/* ===== SUCCESS IMAGE ICON ===== */
.success-checkmark {
	width: 152px;
	height: 152px;
	margin: 0 auto 30px;
	position: relative;
}

.success-image {
	width: 152px;
	height: 152px;
	animation: checkmark-scale 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.2s both;
}

/* ===== SUCCESS MESSAGE CONTENT ===== */
.success-content {
	max-width: 450px;
	margin: 0 auto;
}

/* CENTER-ALIGNED ELEMENTS */
.success-title {
	font-family: var(--heading-font);
	font-size: 2rem;
	font-weight: 500;
	color: var(--text-color);
	margin-bottom: 15px;
	opacity: 0;
	transform: translateY(20px);
	animation: fade-slide-up 0.6s ease-out 1.0s both;
	text-align: center; /* CENTER: Main title */
}

/* LEFT-ALIGNED ELEMENTS */
.success-message {
	font-family: var(--body-font);
	font-size: 1.1rem;
	line-height: 1.6;
	color: var(--text-color);
	margin-bottom: 30px;
	opacity: 0;
	transform: translateY(20px);
	animation: fade-slide-up 0.6s ease-out 1.2s both;
	text-align: left; /* LEFT: Main message for better readability */
}

.success-details {
	background-color: rgba(40, 167, 69, 0.08); /* Generic success green with low opacity */
	border: 1px solid #28a745; /* Generic success green - configurable via branding.success_border_color */
	border-radius: 6px;
	padding: 20px;
	margin-bottom: 25px;
	font-size: 0.95rem;
	color: var(--text-color, #333);
	opacity: 0;
	transform: translateY(20px);
	animation: fade-slide-up 0.6s ease-out 1.4s both;
	text-align: left; /* LEFT: Details section for scanning */
}

.success-details strong {
	display: block;
	margin-bottom: 12px;
	font-weight: 600;
	color: var(--text-color);
}

.success-steps {
	list-style: none;
	padding: 0;
	margin: 0;
}

.success-steps li {
	position: relative;
	padding-left: 20px;
	margin-bottom: 8px;
	line-height: 1.5;
}

.success-steps li:before {
	content: "•";
	color: var(--accent-color-1);
	font-weight: bold;
	position: absolute;
	left: 0;
	top: 0;
}

.success-actions {
	display: flex;
	flex-direction: column;
	gap: 15px;
	align-items: center;
	opacity: 0;
	transform: translateY(20px);
	animation: fade-slide-up 0.6s ease-out 1.6s both;
}

.success-cta-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 30px;
	background-color: var(--accent-color-1);
	color: var(--light-text);
	text-decoration: none;
	border-radius: 25px;
	font-weight: 600;
	font-size: 0.95rem;
	transition: all 0.3s ease;
	border: none;
	cursor: pointer;
	min-width: 200px;
}

.success-cta-button:hover {
	background-color: #d17c9c;
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(208, 78, 125, 0.3);
	color: var(--light-text);
}

.success-contact-info {
	font-size: 0.9rem;
	color: var(--link-color);
	text-align: center; /* CENTER: Contact information */
}

.success-contact-info a {
	color: var(--accent-color-1);
	text-decoration: none;
	font-weight: 600;
}

.success-contact-info a:hover {
	color: #d17c9c;
}

/* ===== FORM TRANSITION EFFECTS ===== */
.form-content {
	transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-content.fade-out {
	opacity: 0;
	transform: translateY(-20px);
	pointer-events: none;
}

/* Ensure form container maintains dimensions during transition */
.form-wrapper {
	position: relative;
	overflow: hidden;
	transition: min-height 0.6s ease;
}

/* ===== KEYFRAME ANIMATIONS ===== */
@keyframes checkmark-scale {
	0% {
		transform: scale(0);
		opacity: 0;
	}
	50% {
		transform: scale(1.1);
		opacity: 1;
	}
	100% {
		transform: scale(1);
		opacity: 1;
	}
}


@keyframes fade-slide-up {
	0% {
		opacity: 0;
		transform: translateY(20px);
	}
	100% {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
	.form-success-container {
		min-height: 500px;
		padding: 30px 20px;
	}

	.success-checkmark {
		width: 120px;
		height: 120px;
		margin-bottom: 25px;
	}

	.success-image {
		width: 120px;
		height: 120px;
	}

	.success-title {
		font-size: 1.8rem;
		margin-bottom: 12px;
	}

	.success-message {
		font-size: 1rem;
		margin-bottom: 25px;
	}

	.success-details {
		padding: 15px;
		font-size: 0.9rem;
		margin-bottom: 20px;
	}

	.success-cta-button {
		padding: 10px 25px;
		font-size: 0.9rem;
		min-width: 180px;
	}
}

@media (max-width: 480px) {
	.form-success-container {
		min-height: 450px;
		padding: 25px 15px;
	}

	.success-checkmark {
		width: 100px;
		height: 100px;
		margin-bottom: 20px;
	}

	.success-image {
		width: 100px;
		height: 100px;
	}

	.success-title {
		font-size: 1.6rem;
	}

	.success-message {
		font-size: 0.95rem;
	}

	.success-actions {
		gap: 12px;
	}

	.success-cta-button {
		padding: 10px 20px;
		font-size: 0.85rem;
		min-width: 160px;
	}
}

/* === OKC: Confirmation visual refinements (lightened) === */
.form-success-container {
	/* light translucent panel */
	background: linear-gradient(180deg, rgba(255,255,255,0.86) 0%, rgba(255,255,255,0.82) 100%);
	border: 2px solid #9ad0ef;
	border-radius: 12px;
	backdrop-filter: blur(2px);
	/* min-height will be set inline by JS, but keep a sensible floor */
	min-height: 460px;
}

/* Icon: ensure visibility and scale */
.success-checkmark {
	display: flex; align-items: center; justify-content: center;
	margin: 10px 0 8px;
}
.success-image {
	width: 72px; height: 72px; display: block;
	filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
	opacity: 0.95;
}

/* Headline + copy colors tuned to site palette */
.success-title   { color: #0e86d4; font-size: 28px; margin: 6px 0 8px; }
.success-message { color: #264653; font-size: 18px; max-width: 640px; margin: 0 auto; }

/* "What happens next" card */
.success-details {
	margin-top: 16px;
	background: rgba(255,255,255,0.92);
	border: 1px solid #cfe9f6;
	border-radius: 10px;
	padding: 12px 16px;
}
.success-details strong { color: #0e86d4; font-weight: 600; }
.success-steps { margin: 8px 0 0; padding-left: 20px; color: #334; }
.success-steps li { margin: 6px 0; }

/* CTA */
.success-actions { margin-top: 18px; }
.success-cta-button {
	display: inline-block; padding: 10px 18px; border-radius: 8px;
	text-decoration: none; color: #fff; background: #0e86d4;
	transition: filter .2s ease;
}
.success-cta-button:hover { filter: brightness(0.95); }

/* === OKC refinements: lighter panel, crisper icon, balanced spacing === */

/* Light, airy panel to match site blues */
.form-success-container {
	background: linear-gradient(180deg, rgba(255,255,255,.92) 0%, rgba(255,255,255,.88) 100%);
	border: 2px solid #b7def3; /* lighter border */
	border-radius: 12px;
	box-shadow: 0 6px 20px rgba(14,134,212,.10); /* soft brand shadow */
	padding: 28px 22px;
}

/* Icon with subtle badge behind it so it reads on any background */
.success-checkmark {
	position: relative;
	display: flex; align-items: center; justify-content: center;
	margin: 6px 0 10px;
	min-height: 96px; /* reserves space so layout is stable */
}
.success-checkmark::before {
	content: "";
	position: absolute; inset: 0;
	margin: auto; width: 92px; height: 92px; border-radius: 9999px;
	background: #fff;
	box-shadow: 0 3px 10px rgba(0,0,0,.12), inset 0 0 0 2px #cfe9f6;
}
.success-image {
	position: relative; z-index: 1;
	width: 64px; height: 64px; display: block;
	filter: drop-shadow(0 2px 4px rgba(0,0,0,.12));
	opacity: 1; /* ensure visibility */
}

/* Typography tuned for clarity */
.success-title   { color: #0e86d4; font-size: 26px; line-height: 1.25; margin: 4px 0 8px; }
.success-message { color: #244b5a; font-size: 17px; line-height: 1.55; max-width: 640px; margin: 0 auto; }

/* "What happens next" card, softer border + room to breathe */
.success-details {
	margin-top: 14px;
	background: rgba(255,255,255,.95);
	border: 1px solid #dceff8;
	border-radius: 10px;
	padding: 14px 16px;
}
.success-details strong { color: #0e86d4; font-weight: 600; }
.success-steps { margin: 8px 0 0; padding-left: 20px; color: #334; }
.success-steps li { margin: 6px 0; }

/* CTA styles to match site buttons */
.success-actions { margin-top: 18px; }
.success-cta-button {
	display: inline-block;
	padding: 10px 18px;
	border-radius: 8px;
	color: #fff; text-decoration: none;
	background: linear-gradient(180deg, #0e86d4 0%, #0b6dad 100%);
	box-shadow: 0 3px 8px rgba(14,134,212,.25);
	transition: transform .06s ease, filter .2s ease;
}
.success-cta-button:hover { filter: brightness(0.96); }
.success-cta-button:active { transform: translateY(1px); }

/* Responsiveness + reduced motion */
@media (max-width: 768px) {
	.form-success-container { padding: 22px 16px; }
	.success-title { font-size: 24px; }
	.success-message { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
	.success-cta-button { transition: none; }
	.success-image { filter: none; }
}

/* === OKC: refinements for success panel === */

/* Softer/lighter container */
.form-success-container{
	background: linear-gradient(180deg, rgba(255,255,255,.95) 0%, rgba(255,255,255,.9) 100%);
	border: 2px solid #bfe3f6;
	box-shadow: 0 6px 16px rgba(14,134,212,.08);
}

/* Remove icon drop shadow and make the badge minimal */
.success-checkmark::before{
	background:#fff;
	border-radius:9999px;
	box-shadow:none;                /* remove heavy glow */
	border:2px solid #d7edf8;       /* subtle ring */
}
.success-image{
	filter:none !important;         /* no shadow */
	opacity:1;
}

/* Typography: heading same size as list */
.success-title{ font-size:18px; line-height:1.45; color:#0e86d4; }
.success-steps li{ font-size:18px; line-height:1.55; }

/* CTA: higher contrast, no fuzzy shadow */
.success-cta-button{
	background:#0e86d4;
	border:1px solid #0b6dad;
	box-shadow:none;
	color:#fff;
	font-weight:600;
}
.success-cta-button:hover{ background:#0b6dad; }
.success-cta-button:focus{ outline:2px solid #93c7ea; outline-offset:2px; }

/* === OKC: Final refinements === */

/* Make the main heading MUCH larger */
.success-title{
	font-size: 26px;          /* larger than body */
	line-height: 1.3;
	color: #0e86d4;
	margin: 6px 0 10px;
}

/* Match text to left container sizing */
.success-message{ font-size: 18px; line-height: 1.55; color:#264653; }
.success-details strong{ font-size: 18px; }
.success-steps li{ font-size: 18px; line-height: 1.55; }

/* Icon polish: no shadow; minimal ring */
.success-checkmark::before{
	box-shadow: none;
	border: 2px solid #d7edf8;
}
.success-image{
	filter: none !important;
	opacity: 1;
}

/* Remove the button entirely */
.success-actions{ display:none !important; }

/* Auto fade-out (JS adds .fade-out) */
.form-success-container.fade-out{
	opacity: 0;
	transition: opacity .8s ease;
	pointer-events: none;
}

/* === OKC: final visual refinements === */
.form-success-container{
  background: linear-gradient(180deg, rgba(255,255,255,.95) 0%, rgba(255,255,255,.9) 100%);
  border: 2px solid #bfe3f6;
  box-shadow: 0 6px 16px rgba(14,134,212,.08);
  padding: 28px 22px;
}

.success-checkmark{ position: relative; display:flex; align-items:center; justify-content:center; margin: 6px 0 10px; min-height:96px; }
.success-checkmark::before{ content:""; position:absolute; inset:0; margin:auto; width:92px; height:92px; border-radius:9999px; background:#fff; border:2px solid #d7edf8; box-shadow:none; }
.success-image{ position:relative; z-index:1; filter:none !important; opacity:1; width:96px; height:96px; } /* JS resizes further */

.success-title{ font-size:26px; line-height:1.3; color:#0e86d4; margin:6px 0 10px; }
.success-message{ font-size:18px; line-height:1.55; color:#264653; }
.success-details strong{ font-size:18px; }
.success-steps li{ font-size:18px; line-height:1.55; }

/* remove CTA button area entirely */
.success-actions{ display:none !important; }

/* fade-out effect (panel) */
.form-success-container.fade-out{ opacity:0; transition: opacity .8s ease; pointer-events:none; }