/* ================================================
   Club Signup Modal - Extends .oncloudwine-modal
   ================================================ */

.club-signup-modal .modal-content {
	max-width: 700px;
	padding: 2.5rem;
}

.club-signup-modal .modal-title {
	font-family: 'Lora', Georgia, serif;
	font-size: 1.6rem;
	font-weight: 500;
	color: #2c2c2c;
	margin: 0 0 0.5rem;
	padding-right: 2rem;
	text-transform: capitalize;
}

.club-signup-modal .club-signup-description {
	font-family: 'Lora', Georgia, serif;
	color: #5c5c5c;
	margin: 0 0 1.5rem;
	font-size: 0.95rem;
}

/* Step navigation */
.club-signup-back {
	background: none;
	border: none;
	color: #8b7765;
	font-family: 'Lora', Georgia, serif;
	font-size: 0.9rem;
	cursor: pointer;
	padding: 0;
	margin-bottom: 1rem;
	display: inline-block;
	transition: color 0.2s;
}

.club-signup-back:hover {
	color: #5c4a3d;
}

/* Sub-type radio cards */
.club-signup-subtypes {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin-bottom: 1.5rem;
}

.club-subtype-card {
	display: block;
	cursor: pointer;
}

.club-subtype-card input[type="radio"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.club-subtype-card-inner {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	padding: 1rem 1.25rem;
	border: 1px solid rgba(139, 119, 101, 0.25);
	border-radius: 4px;
	transition: all 0.2s ease;
	background: #fff;
}

.club-subtype-card:hover .club-subtype-card-inner {
	border-color: #8b7765;
}

.club-subtype-card input:checked + .club-subtype-card-inner {
	border-color: #8b7765;
	background: rgba(139, 119, 101, 0.06);
	box-shadow: 0 0 0 1px #8b7765;
}

.club-subtype-card-name {
	font-family: 'Lora', Georgia, serif;
	font-size: 1.1rem;
	font-weight: 500;
	color: #2c2c2c;
}

.club-subtype-card-desc {
	font-family: 'Lora', Georgia, serif;
	font-size: 0.85rem;
	color: #5c5c5c;
}

.club-subtype-card-discount {
	font-family: 'Lora', Georgia, serif;
	font-size: 0.8rem;
	color: #3d7a3a;
	font-weight: 500;
}

/* Actions */
.club-signup-actions {
	display: flex;
	justify-content: flex-end;
	padding-top: 1rem;
	border-top: 1px solid rgba(139, 119, 101, 0.15);
}

/* Buttons */
.club-signup-modal .button-primary {
	background: #8b7765;
	color: #fff;
	border: 1px solid #8b7765;
	padding: 0.75rem 1.75rem;
	font-family: 'Lora', Georgia, serif;
	font-size: 0.9rem;
	border-radius: 2px;
	cursor: pointer;
	transition: all 0.2s ease;
	letter-spacing: 0.03em;
}

.club-signup-modal .button-primary:hover {
	background: #5c4a3d;
	border-color: #5c4a3d;
}

.club-signup-modal .button-primary:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.club-signup-modal .button-secondary {
	background: transparent;
	color: #8b7765;
	border: 1px solid #8b7765;
	padding: 0.75rem 1.75rem;
	font-family: 'Lora', Georgia, serif;
	font-size: 0.9rem;
	border-radius: 2px;
	cursor: pointer;
	transition: all 0.2s ease;
	letter-spacing: 0.03em;
}

.club-signup-modal .button-secondary:hover {
	background: rgba(139, 119, 101, 0.1);
	color: #5c4a3d;
}

/* Join method options - Step 2 */
.club-signup-options {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.25rem;
	margin-top: 1.5rem;
}

.club-signup-option {
	border: 1px solid rgba(139, 119, 101, 0.2);
	border-radius: 4px;
	padding: 1.25rem;
	background: #fff;
	display: flex;
	flex-direction: column;
}

.club-signup-option-header h3 {
	font-family: 'Lora', Georgia, serif;
	font-size: 1.1rem;
	font-weight: 500;
	color: #2c2c2c;
	margin: 0 0 0.5rem;
}

.club-signup-option-header p {
	font-family: 'Lora', Georgia, serif;
	font-size: 0.85rem;
	color: #5c5c5c;
	margin: 0 0 1rem;
	line-height: 1.5;
}

/* Package products list */
.club-signup-package-products {
	flex: 1;
	margin-bottom: 1rem;
}

.club-package-item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.5rem 0;
	border-bottom: 1px solid rgba(139, 119, 101, 0.1);
}

.club-package-item:last-child {
	border-bottom: none;
}

.club-package-item img {
	width: 40px;
	height: 40px;
	object-fit: cover;
	border-radius: 2px;
}

.club-package-item-info {
	flex: 1;
	display: flex;
	flex-direction: column;
}

.club-package-item-name {
	font-family: 'Lora', Georgia, serif;
	font-size: 0.85rem;
	color: #2c2c2c;
}

.club-package-item-qty {
	font-family: 'Lora', Georgia, serif;
	font-size: 0.8rem;
	color: #5c5c5c;
}

.club-package-item-price {
	font-family: 'Lora', Georgia, serif;
	font-size: 0.85rem;
	color: #2c2c2c;
	font-weight: 500;
	white-space: nowrap;
}

.club-signup-package-total {
	font-family: 'Lora', Georgia, serif;
	font-size: 0.95rem;
	color: #2c2c2c;
	padding: 0.75rem 0;
	border-top: 1px solid rgba(139, 119, 101, 0.2);
	margin-bottom: 1rem;
	text-align: right;
}

.club-signup-option .button-primary,
.club-signup-option .button-secondary {
	width: 100%;
	text-align: center;
	margin-top: auto;
}

/* Loading spinner */
.club-signup-loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 3rem;
	gap: 1rem;
}

.club-signup-loading p {
	font-family: 'Lora', Georgia, serif;
	color: #5c5c5c;
	margin: 0;
}

.club-signup-spinner {
	width: 32px;
	height: 32px;
	border: 3px solid rgba(139, 119, 101, 0.2);
	border-top-color: #8b7765;
	border-radius: 50%;
	animation: ocw-spin 0.8s linear infinite;
}

/* Button loading state */
.club-signup-modal .btn-loading {
	position: relative;
	color: transparent !important;
}

.club-signup-modal .btn-loading::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 16px;
	height: 16px;
	border: 2px solid #fff;
	border-top-color: transparent;
	border-radius: 50%;
	animation: ocw-spin 0.8s linear infinite;
}

.club-signup-modal .button-secondary.btn-loading::after {
	border-color: #8b7765;
	border-top-color: transparent;
}

/* Sub-type description */
.club-signup-subtype-desc {
	font-family: 'Lora', Georgia, serif;
	font-size: 0.9rem;
	color: #5c5c5c;
	margin: 0 0 0.5rem;
	line-height: 1.5;
}

/* Responsive */
@media screen and (max-width: 600px) {
	.club-signup-modal .modal-content {
		padding: 1.5rem;
		max-width: 95%;
	}

	.club-signup-options {
		grid-template-columns: 1fr;
	}

	.club-signup-modal .modal-title {
		font-size: 1.3rem;
	}
}


/* ================================================
   Floating Requirements Tracker
   ================================================ */

.club-tracker {
	position: fixed;
	bottom: 20px;
	right: 20px;
	width: 340px;
	max-width: calc(100vw - 40px);
	background: linear-gradient(180deg, #faf8f5 0%, #f5f2ed 100%);
	border-radius: 4px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
	z-index: 99999;
	font-family: 'Lora', Georgia, serif;
	overflow: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

/* Hide the tracker while the WooCommerce mini-cart drawer is open so it
   doesn't overlap the drawer's View Cart / Checkout CTAs. The drawer overlay
   gets the `--is-hidden` modifier when closed; absent = open. */
body:has(.wc-block-components-drawer__screen-overlay:not(.wc-block-components-drawer__screen-overlay--is-hidden)) .club-tracker {
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px);
	pointer-events: none;
}

.club-tracker__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.75rem 1rem;
	background: #8b7765;
	color: #fff;
	cursor: pointer;
	user-select: none;
}

.club-tracker__header-info {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex: 1;
	min-width: 0;
}

.club-tracker__icon {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	line-height: 1;
}

.club-tracker__icon svg {
	width: 16px;
	height: 16px;
}

.club-tracker__title {
	font-size: 0.85rem;
	font-weight: 500;
	letter-spacing: 0.02em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.club-tracker__badge {
	background: rgba(255, 255, 255, 0.25);
	color: #fff;
	font-size: 0.7rem;
	padding: 0.15rem 0.5rem;
	border-radius: 10px;
	font-weight: 500;
	flex-shrink: 0;
	margin-left: 0.5rem;
}

.club-tracker__badge--complete {
	background: #3d7a3a;
}

.club-tracker__toggle {
	background: none;
	border: none;
	color: #fff;
	cursor: pointer;
	padding: 0;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.club-tracker__toggle-icon {
	display: block;
	width: 0;
	height: 0;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 6px solid #fff;
	transition: transform 0.2s ease;
}

.club-tracker--collapsed .club-tracker__toggle-icon {
	transform: rotate(180deg);
}

/* Body (collapsible) */
.club-tracker__body {
	padding: 1rem;
	max-height: 400px;
	overflow-y: auto;
	transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.2s ease;
}

.club-tracker--collapsed .club-tracker__body {
	max-height: 0;
	padding: 0 1rem;
	opacity: 0;
	overflow: hidden;
}

/* Requirements list */
.club-tracker__requirements {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.club-tracker__requirement {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 0.5rem;
}

.club-tracker__requirement-icon {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.85rem;
	margin-top: 1px;
}

.club-tracker__requirement--met .club-tracker__requirement-icon {
	color: #3d7a3a;
}

.club-tracker__requirement--unmet .club-tracker__requirement-icon {
	color: #999;
}

.club-tracker__requirement-label {
	flex: 1;
	font-size: 0.85rem;
	color: #2c2c2c;
	line-height: 1.4;
}

.club-tracker__requirement--met .club-tracker__requirement-label {
	color: #5c5c5c;
}

/* Progress bar */
.club-tracker__progress {
	width: 100%;
	margin-top: 0.25rem;
	margin-left: 26px;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.club-tracker__progress-bar {
	flex: 1;
	height: 4px;
	background: #e0d8d0;
	border-radius: 2px;
	position: relative;
	overflow: hidden;
}

.club-tracker__progress-bar::before {
	content: '';
	display: none;
}

/* We use the element itself as the fill via width style */
.club-tracker__progress {
	position: relative;
}

/* Rework: use a wrapper for the track and fill */
.club-tracker__progress {
	width: calc(100% - 26px);
	margin-left: 26px;
}

.club-tracker__progress-bar {
	height: 4px;
	background: #3d7a3a;
	border-radius: 2px;
	transition: width 0.3s ease;
	max-width: 100%;
}

.club-tracker__requirement--unmet .club-tracker__progress-bar {
	background: #8b7765;
}

.club-tracker__progress-text {
	font-size: 0.75rem;
	color: #5c5c5c;
	white-space: nowrap;
}

/* Sub-items */
.club-tracker__sub-items {
	width: calc(100% - 26px);
	margin-left: 26px;
	margin-top: 0.25rem;
}

.club-tracker__sub-item {
	font-size: 0.8rem;
	padding: 0.15rem 0;
	color: #5c5c5c;
}

.club-tracker__sub-item--met {
	color: #3d7a3a;
}

.club-tracker__sub-item--unmet {
	color: #999;
}

/* Empty state */
.club-tracker__empty {
	font-size: 0.85rem;
	color: #5c5c5c;
	text-align: center;
	padding: 0.5rem 0;
	margin: 0;
}

/* Loading */
.club-tracker__loading {
	font-size: 0.85rem;
	color: #5c5c5c;
	text-align: center;
	padding: 0.5rem 0;
}

/* Success state */
.club-tracker__success {
	text-align: center;
	padding: 1rem 0;
	border-top: 1px solid rgba(139, 119, 101, 0.15);
	margin-top: 0.75rem;
}

.club-tracker__success-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #3d7a3a;
	color: #fff;
	font-size: 1.2rem;
	margin-bottom: 0.5rem;
}

.club-tracker__success p {
	font-size: 0.9rem;
	color: #2c2c2c;
	margin: 0 0 0.75rem;
	line-height: 1.4;
}

.club-tracker__checkout {
	display: inline-block;
	background: #8b7765;
	color: #fff;
	padding: 0.6rem 1.5rem;
	border-radius: 2px;
	text-decoration: none;
	font-size: 0.85rem;
	font-weight: 500;
	letter-spacing: 0.03em;
	transition: background 0.2s;
}

.club-tracker__checkout:hover {
	background: #5c4a3d;
	color: #fff;
}

/* Qualified state */
.club-tracker--qualified .club-tracker__header {
	background: #3d7a3a;
}

/* Footer */
.club-tracker__footer {
	text-align: center;
	margin-top: 0.75rem;
	padding-top: 0.5rem;
	border-top: 1px solid rgba(139, 119, 101, 0.1);
}

.club-tracker__cancel {
	font-size: 0.8rem;
	color: #999;
	text-decoration: none;
	transition: color 0.2s;
}

.club-tracker__cancel:hover {
	color: #5c5c5c;
}

/* Mobile responsive */
@media screen and (max-width: 480px) {
	.club-tracker {
		bottom: 0;
		right: 0;
		left: 0;
		width: 100%;
		max-width: 100%;
		border-radius: 12px 12px 0 0;
	}
}
