/**
 * WCIWS Smart Subscribe — Product page subscribe selector styles.
 *
 * Covers the .wciws-subscribe-selector widget rendered by
 * templates/product/subscribe-selector.php (classic WC) and
 * assets/src/blocks/subscribe-selector.js (WC Blocks fallback).
 */

/* -------------------------------------------------------------------------
   Wrapper
   ---------------------------------------------------------------------- */

.wciws-subscribe-selector {
	margin: 16px 0 20px;
	padding: 16px;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	background: #fafafa;
}

.wciws-selector-label {
	margin: 0 0 12px;
	font-weight: 600;
	font-size: 14px;
	color: #1d2327;
}

/* -------------------------------------------------------------------------
   Option cards row
   ---------------------------------------------------------------------- */

.wciws-option-cards {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.wciws-option-card {
	flex: 1;
	min-width: 140px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 12px 14px;
	border: 2px solid #dcdcde;
	border-radius: 6px;
	cursor: pointer;
	background: #fff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	position: relative;
}

.wciws-option-card:hover {
	border-color: #72aee6;
}

.wciws-option-card--selected {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	background: #f0f6fc;
}

/* Hide the native radio — card itself acts as the visual control */
.wciws-option-card .wciws-radio {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.wciws-option-title {
	font-size: 14px;
	font-weight: 600;
	color: #1d2327;
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}

.wciws-option-price {
	font-size: 13px;
	color: #50575e;
}

/* -------------------------------------------------------------------------
   Discount badge
   ---------------------------------------------------------------------- */

.wciws-discount-badge {
	display: inline-block;
	padding: 1px 6px;
	border-radius: 3px;
	background: #00a32a;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.02em;
	white-space: nowrap;
}

/* -------------------------------------------------------------------------
   Frequency selector
   ---------------------------------------------------------------------- */

.wciws-frequency-wrap {
	margin-top: 12px;
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.wciws-frequency-wrap label {
	font-size: 13px;
	font-weight: 600;
	color: #1d2327;
	white-space: nowrap;
}

.wciws-frequency-select {
	min-width: 160px;
	max-width: 240px;
	padding: 6px 10px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	font-size: 13px;
	background: #fff;
	cursor: pointer;
}

.wciws-frequency-select:focus {
	border-color: #2271b1;
	outline: 2px solid transparent;
	box-shadow: 0 0 0 2px #2271b1;
}

/* -------------------------------------------------------------------------
   Trial notice
   ---------------------------------------------------------------------- */

.wciws-trial-notice {
	margin: 10px 0 0;
	padding: 8px 12px;
	background: #e8f0fb;
	border-left: 3px solid #2271b1;
	border-radius: 0 4px 4px 0;
	font-size: 13px;
	color: #1d2327;
}

/* -------------------------------------------------------------------------
   Responsive — narrow screens (mobile)
   ---------------------------------------------------------------------- */

@media ( max-width: 480px ) {
	.wciws-option-cards {
		flex-direction: column;
	}

	.wciws-option-card {
		min-width: unset;
	}
}
