/**
 * Brand Mascot Styles
 *
 * Styling for the SkyyRose brand mascot across all placements:
 * - Kids Capsule collection page (primary)
 * - 404 error page (fun error state)
 * - Homepage (greeting element)
 * - Pre-order page (CTA)
 *
 * @package SkyyRose_Flagship
 * @since   3.2.0
 */

/* ===================================================================
   KIDS CAPSULE — Mascot Section
   =================================================================== */

.collection-mascot {
	padding: 5rem 2rem;
	background: linear-gradient(135deg, rgba(255, 182, 193, 0.05) 0%, rgba(230, 230, 250, 0.05) 100%);
	position: relative;
	overflow: hidden;
}

.collection-mascot::before {
	content: '';
	position: absolute;
	top: -50%;
	right: -20%;
	width: 60%;
	height: 200%;
	background: radial-gradient(circle, rgba(255, 182, 193, 0.08) 0%, transparent 70%);
	pointer-events: none;
}

.collection-mascot__inner {
	max-width: 1100px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	gap: 4rem;
}

.collection-mascot__image-wrap {
	flex-shrink: 0;
	position: relative;
}

.collection-mascot__image {
	width: 320px;
	height: auto;
	border-radius: 2rem;
	box-shadow:
		0 25px 50px -12px rgba(0, 0, 0, 0.3),
		0 0 60px rgba(255, 182, 193, 0.15);
	animation: mascot-float 4s ease-in-out infinite;
}

.collection-mascot__placeholder {
	width: 320px;
	height: 400px;
	border-radius: 2rem;
	background: linear-gradient(135deg, rgba(255, 182, 193, 0.1) 0%, rgba(230, 230, 250, 0.1) 100%);
	border: 2px dashed rgba(255, 182, 193, 0.3);
	display: flex;
	align-items: center;
	justify-content: center;
}

@keyframes mascot-float {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-12px); }
}

.collection-mascot__content {
	flex: 1;
}

.collection-mascot__heading {
	font-size: 2.5rem;
	font-weight: 800;
	background: linear-gradient(135deg, #FFB6C1, #E6E6FA, #FFB6C1);
	background-size: 200% 200%;
	animation: gradient-shift 4s ease infinite;
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	margin-bottom: 1rem;
	line-height: 1.2;
}

@keyframes gradient-shift {
	0%, 100% { background-position: 0% 50%; }
	50% { background-position: 100% 50%; }
}

.collection-mascot__text {
	font-size: 1.1rem;
	color: rgba(255, 255, 255, 0.7);
	line-height: 1.7;
	margin-bottom: 2rem;
	max-width: 500px;
}

.collection-mascot__cta {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.875rem 2rem;
	background: linear-gradient(135deg, #FFB6C1, #E6E6FA);
	color: #1a1a1a;
	font-weight: 700;
	font-size: 0.95rem;
	text-decoration: none;
	border-radius: 999px;
	transition: all 0.3s ease;
	box-shadow: 0 4px 20px rgba(255, 182, 193, 0.3);
}

.collection-mascot__cta:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 30px rgba(255, 182, 193, 0.5);
}

/* ===================================================================
   404 PAGE — Mascot Error State
   =================================================================== */

.error-404-mascot {
	text-align: center;
	padding: 2rem 0 3rem;
	animation: fadeInUp 0.8s ease 0.4s both;
}

.error-404-mascot__image {
	width: 180px;
	height: auto;
	border-radius: 1.5rem;
	margin: 0 auto 1.5rem;
	display: block;
	animation: mascot-wiggle 3s ease-in-out infinite;
	box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.error-404-mascot__placeholder {
	width: 120px;
	height: 120px;
	margin: 0 auto 1.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: rgba(183, 110, 121, 0.1);
	border: 2px dashed rgba(183, 110, 121, 0.3);
	animation: mascot-wiggle 3s ease-in-out infinite;
}

@keyframes mascot-wiggle {
	0%, 100% { transform: rotate(0deg); }
	25% { transform: rotate(-3deg) scale(1.02); }
	75% { transform: rotate(3deg) scale(1.02); }
}

.error-404-mascot__speech {
	font-size: 1.1rem;
	color: rgba(255, 255, 255, 0.8);
	font-style: italic;
	max-width: 400px;
	margin: 0 auto;
	padding: 1rem 1.5rem;
	background: rgba(183, 110, 121, 0.1);
	border-radius: 1rem;
	border: 1px solid rgba(183, 110, 121, 0.2);
	position: relative;
}

.error-404-mascot__speech::before {
	content: '';
	position: absolute;
	top: -8px;
	left: 50%;
	transform: translateX(-50%) rotate(45deg);
	width: 16px;
	height: 16px;
	background: rgba(183, 110, 121, 0.1);
	border-top: 1px solid rgba(183, 110, 121, 0.2);
	border-left: 1px solid rgba(183, 110, 121, 0.2);
}

/* ===================================================================
   Responsive
   =================================================================== */

@media (max-width: 768px) {
	.collection-mascot__inner {
		flex-direction: column;
		text-align: center;
		gap: 2rem;
	}

	.collection-mascot__image {
		width: 240px;
	}

	.collection-mascot__heading {
		font-size: 1.8rem;
	}

	.collection-mascot__text {
		font-size: 1rem;
		max-width: 100%;
	}

	.collection-mascot {
		padding: 3rem 1.5rem;
	}

	.error-404-mascot__image {
		width: 140px;
	}
}

/* ===================================================================
   Reduced Motion
   =================================================================== */

/* ===================================================================
   INTERACTIVE WALKING MASCOT WIDGET
   =================================================================== */

.skyyrose-mascot {
	position: fixed;
	bottom: 20px;
	right: -200px;
	z-index: 9990;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	transition: right 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
	pointer-events: none;
}

.skyyrose-mascot--entering,
.skyyrose-mascot--idle {
	right: 20px;
	pointer-events: auto;
}

.skyyrose-mascot--exiting {
	right: -200px;
	pointer-events: none;
}

.skyyrose-mascot--hidden {
	display: none;
}

/* Character button */
.skyyrose-mascot__character {
	background: none;
	border: none;
	cursor: pointer;
	position: relative;
	padding: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.skyyrose-mascot__image {
	width: 100px;
	height: auto;
	border-radius: 1rem;
	filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.4));
	transition: transform 0.3s ease;
}

/* Idle breathing animation */
.skyyrose-mascot--idle .skyyrose-mascot__image {
	animation: mascot-breathe 3s ease-in-out infinite;
}

@keyframes mascot-breathe {
	0%, 100% { transform: translateY(0) scale(1); }
	50% { transform: translateY(-4px) scale(1.02); }
}

/* Wave on hover */
.skyyrose-mascot--waving .skyyrose-mascot__image {
	animation: mascot-wave 0.5s ease-in-out;
}

@keyframes mascot-wave {
	0%, 100% { transform: rotate(0deg); }
	20% { transform: rotate(-8deg); }
	40% { transform: rotate(8deg); }
	60% { transform: rotate(-4deg); }
	80% { transform: rotate(4deg); }
}

/* Walk-on entrance animation */
.skyyrose-mascot--entering .skyyrose-mascot__image {
	animation: mascot-walk-in 0.8s ease-out;
}

@keyframes mascot-walk-in {
	0% { transform: translateX(100px) rotate(5deg); }
	50% { transform: translateX(-10px) rotate(-2deg); }
	100% { transform: translateX(0) rotate(0); }
}

/* Greeting speech bubble */
.skyyrose-mascot__greeting {
	position: absolute;
	bottom: 100%;
	right: 0;
	margin-bottom: 12px;
	padding: 0.625rem 1rem;
	background: rgba(20, 20, 20, 0.95);
	color: #fff;
	font-size: 0.8rem;
	font-weight: 500;
	border-radius: 0.75rem;
	white-space: nowrap;
	border: 1px solid rgba(183, 110, 121, 0.3);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.3s ease, transform 0.3s ease;
	pointer-events: none;
}

.skyyrose-mascot__greeting--visible {
	opacity: 1;
	transform: translateY(0);
}

.skyyrose-mascot__greeting::after {
	content: '';
	position: absolute;
	bottom: -6px;
	right: 20px;
	width: 12px;
	height: 12px;
	background: rgba(20, 20, 20, 0.95);
	border-right: 1px solid rgba(183, 110, 121, 0.3);
	border-bottom: 1px solid rgba(183, 110, 121, 0.3);
	transform: rotate(45deg);
}

/* Interaction Panel */
.skyyrose-mascot__panel {
	position: absolute;
	bottom: calc(100% + 16px);
	right: 0;
	width: 280px;
	background: rgba(18, 18, 18, 0.98);
	border: 1px solid rgba(183, 110, 121, 0.25);
	border-radius: 1rem;
	box-shadow:
		0 20px 50px rgba(0, 0, 0, 0.5),
		0 0 40px rgba(183, 110, 121, 0.1);
	overflow: hidden;
	opacity: 0;
	transform: translateY(16px) scale(0.95);
	transition: opacity 0.3s ease, transform 0.3s ease;
	pointer-events: none;
}

.skyyrose-mascot--panel-open .skyyrose-mascot__panel {
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}

.skyyrose-mascot__panel-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.875rem 1rem;
	background: linear-gradient(135deg, rgba(183, 110, 121, 0.15), rgba(183, 110, 121, 0.05));
	border-bottom: 1px solid rgba(183, 110, 121, 0.15);
}

.skyyrose-mascot__panel-title {
	font-size: 0.85rem;
	font-weight: 700;
	color: #B76E79;
	letter-spacing: 0.05em;
}

.skyyrose-mascot__panel-close {
	background: none;
	border: none;
	color: rgba(255, 255, 255, 0.5);
	font-size: 1.2rem;
	cursor: pointer;
	padding: 4px 8px;
	border-radius: 6px;
	transition: color 0.2s, background 0.2s;
}

.skyyrose-mascot__panel-close:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.1);
}

.skyyrose-mascot__panel-body {
	padding: 0.75rem;
}

/* Action Links */
.skyyrose-mascot__actions {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
}

.skyyrose-mascot__action {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem;
	color: rgba(255, 255, 255, 0.8);
	text-decoration: none;
	font-size: 0.85rem;
	font-weight: 500;
	border-radius: 0.5rem;
	transition: background 0.2s, color 0.2s;
}

.skyyrose-mascot__action:hover {
	background: rgba(255, 255, 255, 0.06);
	color: #fff;
}

.skyyrose-mascot__action--highlight {
	background: rgba(183, 110, 121, 0.1);
	color: #B76E79;
	font-weight: 600;
}

.skyyrose-mascot__action--highlight:hover {
	background: rgba(183, 110, 121, 0.2);
	color: #d4919c;
}

.skyyrose-mascot__action-icon {
	font-size: 1.1rem;
	width: 28px;
	text-align: center;
	flex-shrink: 0;
}

/* Minimize Button */
.skyyrose-mascot__minimize {
	position: absolute;
	top: -8px;
	right: -8px;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: rgba(40, 40, 40, 0.9);
	border: 1px solid rgba(255, 255, 255, 0.15);
	color: rgba(255, 255, 255, 0.6);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.2s;
	z-index: 2;
}

.skyyrose-mascot--idle .skyyrose-mascot__minimize,
.skyyrose-mascot--panel-open .skyyrose-mascot__minimize {
	opacity: 1;
}

.skyyrose-mascot__minimize:hover {
	background: rgba(220, 50, 50, 0.8);
	color: #fff;
}

/* Recall Button */
.skyyrose-mascot__recall {
	position: fixed;
	bottom: 20px;
	right: 20px;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: linear-gradient(135deg, #B76E79, #d4919c);
	border: none;
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 20px rgba(183, 110, 121, 0.4);
	z-index: 9990;
	transition: transform 0.2s, box-shadow 0.2s;
}

.skyyrose-mascot__recall:hover {
	transform: scale(1.1);
	box-shadow: 0 6px 30px rgba(183, 110, 121, 0.6);
}

/* ===================================================================
   Responsive — Interactive Widget
   =================================================================== */

@media (max-width: 768px) {
	.skyyrose-mascot__image {
		width: 70px;
	}

	.skyyrose-mascot__panel {
		width: 240px;
		right: -10px;
	}

	.skyyrose-mascot__greeting {
		font-size: 0.75rem;
	}

	.skyyrose-mascot__recall {
		width: 40px;
		height: 40px;
	}
}

/* ===================================================================
   Reduced Motion — All Sections
   =================================================================== */

@media (prefers-reduced-motion: reduce) {
	.collection-mascot__image,
	.error-404-mascot__image,
	.error-404-mascot__placeholder,
	.skyyrose-mascot__image {
		animation: none !important;
	}

	.collection-mascot__heading {
		animation: none;
		background-size: 100% 100%;
	}

	.collection-mascot__cta {
		transition: none;
	}

	.skyyrose-mascot {
		transition: none;
	}

	.skyyrose-mascot--entering {
		right: 20px;
	}

	.skyyrose-mascot__panel,
	.skyyrose-mascot__greeting {
		transition: none;
	}
}
