/**
 * BOE Registration Cards - Frontend Styles
 * Styles for registration cards, accordions, and modal popups
 */

/**
 * BOE Pricing Cards.
 */
 .boe-pricing-card {
	/* Private variables with public fallbacks */
	--_card-heading-color: var(--card-heading-color, #01a9b6);
	--_card-border-color: var(--card-border-color, #01a9b6);
	--_card-text-color: var(--card-text-color, #333);
	--_card-gradient: var(--card-gradient, linear-gradient(90deg,rgba(255,93,36,1) 0%,rgba(1,169,182,1) 100%));

	container-type: inline-size;

	max-width: 100%;
	border-radius: 6px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
	border: 1px solid var(--_card-border-color);
	display: flex;
	flex-direction: column;

	& .card-header {
		background-color: var(--_card-heading-color);
		color: white;
		padding: 16px 24px;
		font-size: 24px;
		font-weight: bold;
	}

	& .card-body {
		padding: 24px;
		background-color: white;
		display: flex;
		flex-direction: column;
	}

	& .card-title {
		font-size: 32px;
		font-weight: bold;
		margin: 0 0 20px 0;
	}

	& .card-description {
		font-size: 16px;
		line-height: 1.5;
		color: var(--_card-text-color);
		margin-bottom: 24px;
		flex: 1 0 70px;
	}

	& .price-container {
		display: flex;
		gap: 8px;
		margin-bottom: 24px;
		align-items: center;

		& .card-price {
			font-size: 36px;
			font-weight: bold;
		}

		& .price-addendum {
			font-size: 20px;
			color: var(--_card-text-color);
			margin-top: 0;
			&.vip, &.gold {
				color: #F0B13D;
			}
			&.strike {
				text-decoration: line-through;
				opacity: 0.7;
			}
			font-weight: bold;
		}
	}

	& .action-container {
		display: flex;
		align-items: center;
		gap: 16px;

		& .button-addendum {
			font-size: 14px;
			color: var(--_card-text-color);
			line-height: 1.2;
		}
	}

	& .card-button {
		position: relative;
		display: inline-flex;
		align-items: center;
		padding: 12px 24px;
		color: var(--_card-text-color);
		text-decoration: none;
		border-radius: 6px;
		font-weight: 500;
		background: white;
		white-space: nowrap;
		transition: all 0.3s;
		transform-origin: center;
		border: 2px solid transparent;
		background-image: var(--_card-gradient);
		background-origin: border-box;
		box-shadow: inset 0 0 0 50px white;

		&:hover {
			color: white;
			transform: scale(1.05);
			box-shadow: none;
		}

		&::after {
			content: "→";
			margin-left: 8px;
		}
	}
}
@container (max-width: 300px) {
	.action-container, .price-container {
		flex-direction: column;
		.card-button, .button-addendum {
			align-self: flex-start;
		}
	}
}

/**
 * BOE Pricing lists.
 */
.boe-pricing-list {
	--_pricing-list-color: var(--pricing-list-color, #40B7B9);
	list-style: none;
	padding: 0;
	margin: 0;

	& li {
		position: relative;
		padding-left: 2.5rem;
		margin-bottom: 1rem;
		line-height: 1.5;
		display: flex;
		align-items: center;

		&::before {
			content: "\f00c";
			font-family: "Font Awesome 5 Free";
			font-weight: 900;
			position: absolute;
			left: 0;
			width: 1.8rem;
			height: 1.8rem;
			background-color: var(--_pricing-list-color);
			border-radius: 50%;
			display: flex;
			align-items: center;
			justify-content: center;
			color: white;
			font-size: 0.9rem;
		}
	}

	.tooltip-wrapper {
		position: relative;
		width: 100%;
	}

	.tooltip-content {
		visibility: hidden;
		position: absolute;
		z-index: 1;
		background: #333;
		color: white;
		padding: 1rem;
		border-radius: 0.5rem;
		font-size: 0.875rem;
		line-height: 1.4;
		width: max-content;
		max-width: 300px;
		top: 100%;
		left: 0;
		margin-top: 0.5rem;
		box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
		opacity: 0;
		transition: opacity 0.2s;
	}

	.tooltip-wrapper:hover .tooltip-content,
	.tooltip-wrapper:focus-within .tooltip-content {
		visibility: visible;
		opacity: 1;
	}

	.tooltip-trigger {
		display: inline-flex;
		align-items: center;
		gap: 0.5rem;
		color: inherit;
		text-decoration: none;
		cursor: default;
	}

	.tooltip-trigger:hover,
	.tooltip-trigger:focus {
		color: var(--_pricing-list-color);
	}

	.tooltip-trigger::after {
		content: "\f059";
		font-family: "Font Awesome 5 Free";
		font-weight: 400;
		font-size: 0.875rem;
		color: #666;
		opacity: 0.5;
	}

	@media (max-width: 768px) {
		.tooltip-content {
			position: fixed;
			left: 0;
			right: 0;
			width: 100%;
			max-width: none;
			margin: 0;
			border-radius: 0;
			box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
			bottom: 0;
			top: auto;
		}
	}
}

/* Accordion checkmark styling */
.w-tabs.accordion {

	.w-tabs-section-header {
		position: relative;
		padding-left: 3rem !important;
		padding-block: 0.5rem !important;

		&::before {
			content: "\f00c";
			font-family: "Font Awesome 5 Free";
			font-weight: 900;
			position: absolute;
			left: 0.5rem;
			top: 50%;
			transform: translateY(-50%);
			width: 1.8rem;
			height: 1.8rem;
			background-color: var(--_pricing-card-list-color);
			border-radius: 50%;
			display: flex;
			align-items: center;
			justify-content: center;
			color: white;
			font-size: 0.9rem;
		}

		&[aria-expanded="true"] .w-tabs-section-control {
			transform: rotate(180deg);
		}
	}

	.w-tabs-section-title {
		font-size: 18px;
		line-height: 1.5;
		font-weight: 400;
		margin: 0;
	}

	/* Chevron icon styling */
	.w-tabs-section-control {
		flex-shrink: 0;
		margin-left: auto;
		width: 1em;
		height: 1em;
		line-height: 1;
		transition: transform 0.3s ease;
		transform: rotate(0deg);

		&::after {
			content: "\f078";
			font-family: "Font Awesome 5 Free";
			font-weight: 900;
			font-size: 0.875rem;
		}
	}
}

/* Pricing card enhancements */
.price-addendum {
	font-size: 16px;
	margin-top: 8px;
	color: #999;

	&.strike {
		text-decoration: line-through;
	}
}

.card-button {
	&.disabled {
		pointer-events: none;
		opacity: 0.6;
		background: #999 !important;
		cursor: not-allowed;
	}
}

.button-addendum {
	font-size: 12px;
	font-weight: 700;
	color: #e91e63;
	margin-top: 8px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* Card info icon styling */
.card-info-icon {
	float: right;
	background: rgba(255, 255, 255, 0.3);
	border: none;
	border-radius: 50%;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.2s ease;

	i {
		color: white;
		font-size: 18px;
	}

	&:hover {
		background: rgba(255, 255, 255, 0.5);
	}
}

/* Modal popup styling */
.accordion-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.7);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 10000;

	&.active {
		display: flex;
	}
}

.accordion-modal {
	background: white;
	border-radius: 8px;
	max-width: 800px;
	width: 90%;
	max-height: 80vh;
	overflow-y: auto;
	position: relative;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);

	.modal-header {
		position: sticky;
		top: 0;
		background: white;
		padding: 20px 60px 20px 30px;
		border-bottom: 1px solid #e0e0e0;
		z-index: 1;

		h3 {
			margin: 0;
			font-size: 24px;
		}
	}

	.modal-close {
		position: absolute;
		top: 20px;
		right: 20px;
		background: none;
		border: none;
		font-size: 28px;
		cursor: pointer;
		color: #999;
		width: 32px;
		height: 32px;
		display: flex;
		align-items: center;
		justify-content: center;
		transition: color 0.2s ease;

		&:hover {
			color: #333;
		}
	}

	.modal-body {
		padding: 30px;
	}
}
