/* ===== Spoiler / Reveal Block ===== */
.wp-block-awgt-spoiler {
	margin: 1em 0;
	border-radius: var( --awgt-sp-radius, 8px );
	overflow: hidden;
	cursor: pointer;
	user-select: none;
}

.wp-block-awgt-spoiler:hover .awgt-sp-label-wrap {
	filter: brightness( 1.08 );
}

/* === Label (always visible) === */
.awgt-sp-label-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 16px;
	background: var( --awgt-sp-label-bg, #3858E9 );
	color: var( --awgt-sp-label-color, #ffffff );
	font-weight: 600;
	font-size: 14px;
	letter-spacing: 0.3px;
	transition: background 0.3s ease;
}

.awgt-sp-icon {
	display: inline-flex;
	align-items: center;
}

.awgt-sp-icon svg {
	width: 16px;
	height: 16px;
}

/* === Content === */
.awgt-sp-content {
	padding: 20px;
	background: var( --awgt-sp-content-bg, #f5f5f5 );
	color: var( --awgt-sp-content-color, #1e1e1e );
	font-size: var( --awgt-sp-font-size, 16px );
	line-height: 1.6;
	position: relative;
}

.awgt-sp-content p {
	margin: 0;
}

/* ============================================
   REVEAL STYLE 1: BLUR
   ============================================ */
.awgt-sp-style-blur .awgt-sp-content {
	filter: blur( 8px );
	user-select: none;
	transition: filter 0.4s ease;
}
.awgt-sp-style-blur.awgt-sp-revealed .awgt-sp-content {
	filter: blur( 0 );
	user-select: auto;
}

/* ============================================
   REVEAL STYLE 2: HIDDEN (invisible text)
   ============================================ */
.awgt-sp-style-hidden .awgt-sp-content {
	color: var( --awgt-sp-content-bg, #f5f5f5 );
	transition: color 0.4s ease;
}
.awgt-sp-style-hidden.awgt-sp-revealed .awgt-sp-content {
	color: var( --awgt-sp-content-color, #1e1e1e );
}

/* ============================================
   REVEAL STYLE 3: BLACK BAR
   ============================================ */
.awgt-sp-style-blackbar .awgt-sp-content {
	position: relative;
	color: transparent;
}
.awgt-sp-style-blackbar .awgt-sp-content::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 20px;
	right: 20px;
	height: 60%;
	transform: translateY( -50% );
	background: #1e1e1e;
	border-radius: 4px;
	transition: opacity 0.4s ease;
}
.awgt-sp-style-blackbar .awgt-sp-content {
	transition: color 0.4s ease 0.2s;
}
.awgt-sp-style-blackbar.awgt-sp-revealed .awgt-sp-content {
	color: var( --awgt-sp-content-color, #1e1e1e );
}
.awgt-sp-style-blackbar.awgt-sp-revealed .awgt-sp-content::before {
	opacity: 0;
}

/* ============================================
   REVEAL STYLE 4: COVER (full overlay)
   ============================================ */
.awgt-sp-style-cover {
	position: relative;
}
.awgt-sp-style-cover .awgt-sp-content {
	max-height: 0;
	opacity: 0;
	padding-top: 0;
	padding-bottom: 0;
	overflow: hidden;
	transition:
		max-height 0.5s cubic-bezier( 0.4, 0, 0.2, 1 ),
		padding-top 0.5s cubic-bezier( 0.4, 0, 0.2, 1 ),
		padding-bottom 0.5s cubic-bezier( 0.4, 0, 0.2, 1 ),
		opacity 0.3s ease-out 0.15s;
}
.awgt-sp-style-cover.awgt-sp-revealed .awgt-sp-content {
	max-height: 2000px;
	opacity: 1;
	padding-top: 20px;
	padding-bottom: 20px;
}

/* ============================================
   HOVER TRIGGER
   ============================================ */
.awgt-sp-trigger-hover .awgt-sp-content {
	transition: all 0.4s ease;
}

/* ============================================
   EDITOR PREVIEW
   ============================================ */
.editor-styles-wrapper .wp-block-awgt-spoiler {
	cursor: default;
}