/**
 * Product Notice — common widget CSS.
 *
 * Per-type color tokens are defined here; each style file consumes them so the
 * info / success / warning / error palettes stay consistent across every style.
 *
 * @package captain-widgets-kit
 * @since   1.4.0
 */

.captwiki-pnotice {
	--captwiki-pnotice-accent: #2563eb;
	--captwiki-pnotice-soft: #eff6ff;
	--captwiki-pnotice-ink: #1e3a8a;
	position: relative;
	box-sizing: border-box;
}

.captwiki-pnotice.captwiki-pnotice--info {
	--captwiki-pnotice-accent: #2563eb;
	--captwiki-pnotice-soft: #eff6ff;
	--captwiki-pnotice-ink: #1e3a8a;
}

.captwiki-pnotice.captwiki-pnotice--success {
	--captwiki-pnotice-accent: #16a34a;
	--captwiki-pnotice-soft: #ecfdf5;
	--captwiki-pnotice-ink: #14532d;
}

.captwiki-pnotice.captwiki-pnotice--warning {
	--captwiki-pnotice-accent: #d97706;
	--captwiki-pnotice-soft: #fffbeb;
	--captwiki-pnotice-ink: #78350f;
}

.captwiki-pnotice.captwiki-pnotice--error {
	--captwiki-pnotice-accent: #dc2626;
	--captwiki-pnotice-soft: #fef2f2;
	--captwiki-pnotice-ink: #7f1d1d;
}

.captwiki-pnotice__inner {
	display: flex;
	align-items: flex-start;
	gap: 14px;
}

.captwiki-pnotice__icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	margin-top: 1px;
	color: var( --captwiki-pnotice-accent );
}

.captwiki-pnotice__icon svg {
	width: 100%;
	height: 100%;
	display: block;
}

.captwiki-pnotice__body {
	flex: 1 1 auto;
	min-width: 0;
}

.captwiki-pnotice__title {
	font-weight: 700;
	line-height: 1.3;
	margin-bottom: 3px;
}

.captwiki-pnotice__message {
	line-height: 1.6;
}

.captwiki-pnotice__message > :first-child {
	margin-top: 0;
}

.captwiki-pnotice__message > :last-child {
	margin-bottom: 0;
}

.captwiki-pnotice__message a {
	color: inherit;
	text-decoration: underline;
}

/* Dismiss button. */
.captwiki-pnotice__close {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	margin: -2px -4px 0 4px;
	padding: 0;
	border: none;
	border-radius: 6px;
	background: transparent;
	color: currentColor;
	opacity: 0.6;
	cursor: pointer;
	transition: opacity 0.2s ease, background 0.2s ease;
}

.captwiki-pnotice__close svg {
	width: 16px;
	height: 16px;
}

.captwiki-pnotice__close:hover {
	opacity: 1;
	background: rgba( 0, 0, 0, 0.06 );
}

/* Dismiss animation + hidden state. */
.captwiki-pnotice--dismissible {
	transition: opacity 0.25s ease, transform 0.25s ease;
}

.captwiki-pnotice.is-dismissing {
	opacity: 0;
	transform: translateY( -6px );
}

.captwiki-pnotice.is-dismissed {
	display: none !important;
}

/* WooCommerce notices passthrough. */
.captwiki-pnotice--wc .woocommerce-message,
.captwiki-pnotice--wc .woocommerce-info,
.captwiki-pnotice--wc .woocommerce-error {
	margin: 0 0 12px;
}

/* Editor placeholder. */
.captwiki-pnotice--placeholder {
	display: block;
	padding: 14px 16px;
	border: 1px dashed #c3c4c7;
	border-radius: 6px;
	background: #f6f7f7;
	color: #50575e;
	text-align: center;
	font-size: 13px;
}

.captwiki-pnotice--placeholder p {
	margin: 0;
}
