/**
 * Festgeld Comparison Page Styles
 */

:root {
	--festgeld-primary: #e30613;
	--festgeld-primary-hover: #c70511;
	--festgeld-text: #333333;
	--festgeld-text-light: #666666;
	--festgeld-bg: #f5f5f5;
	--festgeld-bg-light: #ffffff;
	--festgeld-border: #e0e0e0;
	--festgeld-shadow: rgba(0, 0, 0, 0.1);
}

/* Main Container */
.festgeld-comparison {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
	color: var(--festgeld-text);
}

/* Tabs */
.festgeld-comp-tabs {
	display: flex;
	gap: 5px;
	margin-bottom: 30px;
	overflow-x: visible;
	flex-wrap: wrap;
}

.festgeld-comp-tab {
	background: transparent;
	border: none;
	padding: 12px 24px;
	font-size: 15px;
	font-weight: 500;
	color: var(--festgeld-text-light);
	cursor: pointer;
	border-bottom: 3px solid transparent;
	transition: all 0.3s ease;
	position: relative;
	bottom: -2px;
	white-space: nowrap;
}

.festgeld-comp-tab:hover {
	color: var(--festgeld-primary);
}

.festgeld-comp-tab-active {
	color: var(--festgeld-primary);
	border-bottom-color: var(--festgeld-primary);
	font-weight: 600;
}

/* Filters */
.festgeld-comp-filters {
	display: flex;
	gap: 20px;
	margin-bottom: 30px;
	flex-wrap: wrap;
}

.festgeld-comp-filter-group {
	flex: 1;
	min-width: 200px;
}

.festgeld-comp-filter-group label {
	display: block;
	font-size: 14px;
	font-weight: 500;
	margin-bottom: 8px;
	color: var(--festgeld-text);
}

.festgeld-comp-amount-input {
	position: relative;
	display: flex;
	align-items: center;
}

.festgeld-comp-currency {
	position: absolute;
	left: 15px;
	font-weight: 600;
	color: var(--festgeld-text);
}

.festgeld-comp-amount-input input {
	width: 100%;
	padding: 12px 16px 12px 35px;
	font-size: 15px;
	border: 1px solid var(--festgeld-border);
	border-radius: 4px;
	background: var(--festgeld-bg-light);
	color: var(--festgeld-text);
	cursor: default;
}

.festgeld-comp-select {
	width: 100%;
	padding: 12px 16px;
	font-size: 15px;
	border: 1px solid var(--festgeld-border);
	border-radius: 4px;
	background: var(--festgeld-bg-light);
	color: var(--festgeld-text);
	cursor: pointer;
	transition: border-color 0.3s ease;
	appearance: none;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 20px;
	padding-right: 40px;
}

.festgeld-comp-select:hover,
.festgeld-comp-select:focus {
	border-color: var(--festgeld-primary);
	outline: none;
}

/* Products Listing */
.festgeld-comp-products {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.festgeld-comp-product-card {
	background: var(--festgeld-bg-light);
	border: 1px solid var(--festgeld-border);
	border-radius: 8px;
	padding: 20px;
	position: relative;
	transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.festgeld-comp-product-card:hover {
	box-shadow: 0 4px 12px var(--festgeld-shadow);
	transform: translateY(-2px);
}

/* Badge */
.festgeld-comp-badge {
	position: absolute;
	top: -10px;
	left: 20px;
	background: #0066cc;
	color: white;
	padding: 4px 12px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 600;
	z-index: 1;
}

/* Product Content Layout */
.festgeld-comp-product-content {
	display: grid;
	grid-template-columns: 180px 1fr auto auto auto;
	gap: 20px;
	align-items: center;
}

/* Institution */
.festgeld-comp-institution {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.festgeld-comp-logo {
	max-width: 60px;
	max-height: 40px;
	object-fit: contain;
	margin-bottom: 5px;
}

.festgeld-comp-institution-name {
	font-weight: 600;
	font-size: 15px;
	color: var(--festgeld-text);
}

.festgeld-comp-small-note {
	font-size: 12px;
	color: var(--festgeld-text-light);
	display: flex;
	align-items: center;
	gap: 4px;
}

.festgeld-comp-small-note::before {
	content: "●";
	color: #46b450;
	font-size: 10px;
}

/* Product Info */
.festgeld-comp-product-info {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.festgeld-comp-product-name {
	font-weight: 600;
	font-size: 16px;
	color: var(--festgeld-text);
}

.festgeld-comp-product-terms {
	font-size: 13px;
	color: #0066cc;
	text-decoration: underline;
}

.festgeld-comp-product-terms:hover {
	opacity: 0.8;
}

/* Rate */
.festgeld-comp-rate {
	text-align: center;
	min-width: 80px;
}

.festgeld-comp-rate-value {
	font-size: 24px;
	font-weight: 700;
	color: var(--festgeld-text);
}

.festgeld-comp-rate-label {
	font-size: 12px;
	color: var(--festgeld-text-light);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* Earnings */
.festgeld-comp-earnings {
	text-align: right;
	min-width: 120px;
}

.festgeld-comp-earnings-label {
	font-size: 12px;
	color: var(--festgeld-text-light);
	margin-bottom: 4px;
}

.festgeld-comp-earnings-value {
	font-size: 16px;
	font-weight: 600;
	color: var(--festgeld-text);
}

/* CTA Button */
.festgeld-comp-cta {
	min-width: 120px;
}

.festgeld-comp-button {
	display: inline-block;
	background: #0066cc;
	color: white;
	padding: 12px 24px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	border-radius: 50px;
	transition: all 0.3s ease;
	border: none;
	cursor: pointer;
	text-align: center;
	white-space: nowrap;
}

.festgeld-comp-button:hover {
	background: #0052a3;
	transform: translateY(-1px);
	box-shadow: 0 4px 8px rgba(0, 102, 204, 0.3);
	color: white;
}

/* Load More */
.festgeld-comp-load-more-wrap {
	text-align: center;
	margin-top: 30px;
}

.festgeld-comp-load-more {
	background: transparent;
	border: 2px solid var(--festgeld-primary);
	color: var(--festgeld-primary);
	padding: 12px 40px;
	font-size: 15px;
	font-weight: 600;
	border-radius: 50px;
	cursor: pointer;
	transition: all 0.3s ease;
}

.festgeld-comp-load-more:hover {
	background: var(--festgeld-primary);
	color: white;
}

/* Empty State */
.festgeld-comp-empty {
	text-align: center;
	padding: 60px 20px;
	color: var(--festgeld-text-light);
	font-size: 16px;
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
	.festgeld-comp-product-content {
		grid-template-columns: 150px 1fr auto auto;
		gap: 15px;
	}

	.festgeld-comp-earnings {
		grid-column: 1 / -1;
		text-align: left;
		margin-top: 10px;
		padding-top: 10px;
		border-top: 1px solid var(--festgeld-border);
	}
}

@media screen and (max-width: 768px) {
	.festgeld-comparison {
		padding: 15px;
	}

	.festgeld-comp-tabs {
		margin-bottom: 20px;
		overflow-x: visible;
		flex-wrap: wrap;
	}

	.festgeld-comp-tab {
		padding: 10px 16px;
		font-size: 14px;
		white-space: normal;
	}

	.festgeld-comp-filters {
		flex-direction: column;
		gap: 15px;
	}

	.festgeld-comp-filter-group {
		width: 100%;
	}

	.festgeld-comp-product-card {
		padding: 15px;
	}

	.festgeld-comp-product-content {
		grid-template-columns: 1fr;
		gap: 15px;
	}

	.festgeld-comp-institution {
		flex-direction: row;
		align-items: center;
		gap: 10px;
	}

	.festgeld-comp-logo {
		margin-bottom: 0;
	}

	.festgeld-comp-rate {
		display: flex;
		align-items: center;
		gap: 10px;
		text-align: left;
	}

	.festgeld-comp-rate-value {
		font-size: 20px;
	}

	.festgeld-comp-earnings {
		display: flex;
		justify-content: space-between;
		align-items: center;
		border-top: 1px solid var(--festgeld-border);
		padding-top: 10px;
		margin-top: 5px;
	}

	.festgeld-comp-cta {
		width: 100%;
	}

	.festgeld-comp-button {
		display: block;
		width: 100%;
	}
}

/* Accessibility */
.festgeld-comp-tab:focus,
.festgeld-comp-select:focus,
.festgeld-comp-button:focus,
.festgeld-comp-load-more:focus {
	outline: 2px solid var(--festgeld-primary);
	outline-offset: 2px;
}

/* Hidden state */
[data-filtered="hidden"] {
	display: none !important;
}
