/*
Theme Name:   Astra Child
Theme URI:    https://pinballunion.fi
Description:  Child theme for Astra - Pinball Union customizations
Author:       Pinball Union
Author URI:   https://pinballunion.fi
Template:     astra
Version:      1.0.0
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  astra-child
*/

/* ==========================================================================
   Custom Styles
   ========================================================================== */

/* ==========================================================================
   Filter Everything Pro - Horizontal Layout
   ========================================================================== */

/* Desktop: Display filters horizontally */
@media (min-width: 769px) {
	.wpc-filters-widget-wrapper {
		display: flex;
		flex-wrap: wrap;
		gap: 20px;
		align-items: flex-start;
	}
	
	.wpc-filters-section {
		flex: 0 1 auto;
		min-width: 200px;
		max-width: 250px;
	}
	
	/* Submit/Reset buttons section should take full width */
	.wpc-filters-section.wpc-filter-layout-submit-button {
		flex: 1 0 100%;
		display: flex;
		gap: 12px;
		justify-content: flex-start;
		margin-top: 10px;
	}
	
	/* Make dropdowns fit content */
	.wpc-filter-layout-dropdown .wpc-filters-widget-select {
		width: 100%;
	}
}

/* Fix dropdown text color - ensure black text on white background */
.wpc-filters-widget-select,
.wpc-filters-widget-select option {
	color: #000 !important;
	background-color: #fff !important;
}

/* Select2 dropdown styling (if enabled in Filter Everything Pro) */
.select2-container--default .select2-results__option,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--single .select2-selection__rendered {
	color: #000 !important;
	background-color: #fff !important;
}

.select2-container--default .select2-results__option--highlighted {
	background-color: #0274be !important;
	color: #fff !important;
}

/* Fix search input text color in Select2 dropdown */
.select2-search--dropdown .select2-search__field {
	color: #000 !important;
	background-color: #fff !important;
}

/* Fix placeholder text color */
.select2-container--default .select2-selection--single .select2-selection__placeholder {
	color: #666 !important;
}

/* Style checkboxes - make them more visible with green accent */
.wpc-filters-checkboxes input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin-right: 8px;
	cursor: pointer;
	accent-color: #28a745;
	border: 2px solid #ccc;
}

.wpc-filters-checkboxes input[type="checkbox"]:checked {
	background-color: #28a745;
	border-color: #28a745;
}

.wpc-filters-checkboxes input[type="checkbox"]:hover {
	border-color: #28a745;
}

/* Make checkbox labels easier to click */
.wpc-filters-checkboxes label {
	cursor: pointer;
	display: inline-flex;
	align-items: center;
}

.wpc-term-item-content-wrapper {
	display: flex;
	align-items: center;
}

/* Style radio buttons - make them more visible with green accent */
.wpc-filters-radio input[type="radio"] {
	width: 18px;
	height: 18px;
	margin-right: 8px;
	cursor: pointer;
	accent-color: #28a745;
	border: 2px solid #ccc;
}

.wpc-filters-radio input[type="radio"]:checked {
	background-color: #28a745;
	border-color: #28a745;
}

.wpc-filters-radio input[type="radio"]:hover {
	border-color: #28a745;
}

/* Make radio button labels easier to click */
.wpc-filters-radio label {
	cursor: pointer;
	display: inline-flex;
	align-items: center;
}

/* Mobile filter button - white text and border */
.wpc-open-close-filters-button {
	color: #fff !important;
	border-color: #fff !important;
}

.wpc-open-close-filters-button .wpc-filters-button-text {
	color: #fff !important;
}

/* Mobile filter button icon lines - make them white */
.wpc-icon-html-wrapper span {
	background: #fff !important;
	border-color: #fff !important;
}

.wpc-icon-html-wrapper span:after {
	border-color: #fff !important;
	background-color: transparent !important;
}

/* Hover state for mobile filter button */
.wpc-open-close-filters-button:hover {
	background-color: rgba(255, 255, 255, 0.1);
}

/* Style radio buttons - make them more visible with green accent */
.wpc-filters-radio input[type="radio"] {
	width: 18px;
	height: 18px;
	margin-right: 8px;
	cursor: pointer;
	accent-color: #28a745;
	border: 2px solid #ccc;
}

.wpc-filters-radio input[type="radio"]:checked {
	background-color: #28a745;
	border-color: #28a745;
}

.wpc-filters-radio input[type="radio"]:hover {
	border-color: #28a745;
}

/* Make radio button labels easier to click */
.wpc-filters-radio label {
	cursor: pointer;
	display: inline-flex;
	align-items: center;
}

/* Tablet: 2 columns */
@media (min-width: 481px) and (max-width: 768px) {
	.wpc-filters-widget-wrapper {
		display: flex;
		flex-wrap: wrap;
		gap: 15px;
	}
	
	.wpc-filters-section {
		flex: 0 1 calc(50% - 7.5px);
		min-width: 0;
	}
	
	.wpc-filters-section.wpc-filter-layout-submit-button {
		flex: 1 0 100%;
		display: flex;
		gap: 12px;
		margin-top: 10px;
	}
}

/* Mobile: Stack vertically with better spacing */
@media (max-width: 480px) {
	.wpc-filters-section {
		margin-bottom: 20px;
	}
	
	.wpc-filter-header {
		margin-bottom: 10px;
	}
	
	.wpc-filters-section.wpc-filter-layout-submit-button {
		display: flex;
		flex-direction: column;
		gap: 10px;
		margin-top: 20px;
	}
	
	.wpc-filters-submit-button,
	.wpc-filters-reset-button {
		width: 100%;
		text-align: center;
	}
}

/* Professional Filter Styling */
.wpc-filter-title {
	font-weight: 600;
	margin-bottom: 12px;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	color: #ffffff;
}

/* Improve checkbox and radio list spacing */
.wpc-filters-checkboxes li,
.wpc-filters-radio li {
	margin-bottom: 10px;
}

.wpc-filters-checkboxes label,
.wpc-filters-radio label {
	cursor: pointer;
	display: flex;
	align-items: center;
	transition: color 0.2s ease;
}

.wpc-filters-checkboxes label:hover,
.wpc-filters-radio label:hover {
	color: #3498db;
}

/* Checkbox and radio button styling */
.wpc-filters-checkboxes input[type="checkbox"],
.wpc-filters-radio input[type="radio"] {
	margin-right: 8px;
	cursor: pointer;
	width: 18px;
	height: 18px;
}

/* Term count styling */
.wpc-term-count {
	color: #888;
	font-size: 12px;
	margin-left: 4px;
}

/* Dropdown styling */
.wpc-filters-widget-select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #444;
	border-radius: 4px;
	background-color: #1a1a1a;
	color: #ffffff;
	font-size: 14px;
	cursor: pointer;
	transition: border-color 0.2s ease;
}

.wpc-filters-widget-select:hover {
	border-color: #3498db;
}

.wpc-filters-widget-select:focus {
	outline: none;
	border-color: #3498db;
	box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Submit Button (Päivitä) - Professional Blue */
.wpc-filters-submit-button {
	display: inline-block;
	padding: 12px 28px;
	background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
	color: #ffffff !important;
	text-decoration: none !important;
	border: none;
	border-radius: 4px;
	font-weight: 600;
	font-size: 14px;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.wpc-filters-submit-button:hover {
	background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.wpc-filters-submit-button:active {
	transform: translateY(0);
}

/* Reset Button - High Contrast Light Gray */
.wpc-filters-reset-button {
	display: inline-block;
	padding: 12px 28px;
	background-color: #f8f9fa;
	color: #2c2d33 !important;
	text-decoration: none !important;
	border: 2px solid #dee2e6;
	border-radius: 4px;
	font-weight: 600;
	font-size: 14px;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	cursor: pointer;
	transition: all 0.3s ease;
}

.wpc-filters-reset-button:hover {
	background-color: #ffffff;
	border-color: #adb5bd;
	color: #000000 !important;
	transform: translateY(-2px);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.wpc-filters-reset-button:active {
	transform: translateY(0);
}

/* Filter section styling */
.wpc-filters-section {
	background-color: rgba(255, 255, 255, 0.03);
	padding: 16px;
	border-radius: 6px;
	border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Link styling in filters */
.wpc-filter-content a {
	color: #e0e0e0;
	text-decoration: none;
	transition: color 0.2s ease;
}

.wpc-filter-content a:hover {
	color: #3498db;
}

/* ==========================================================================
   Typography - Tablet Responsive
   ========================================================================== */

/* Tablet: Smaller H1 for better layout
@media (min-width: 481px) and (max-width: 1024px) {
	body .entry-content h1,
	.entry-content h1[style],
	h1,
	.uagb-heading-text,
	[class*="uagb-block-"] h1 {
		font-size: 64px !important;
		line-height: 1.2 !important;
	}
} */
/* ==========================================================================
   UAGB Loop Builder Padding Fix
   ========================================================================== */

/* Ensure loop builder content never touches screen edges */
.uagb-loop-container,
.wp-block-uagb-loop-builder {
	padding-left: 20px !important;
	padding-right: 20px !important;
	box-sizing: border-box !important;
}

/* ==========================================================================
   Filter Everything Pro - Compact & Consistent Layout
   ========================================================================== */

/* Main filter widget container */
.wpc-filters-widget-content {
	background: #1a1a1a;
	border-radius: 8px;
	padding: 20px;
}

/* Filter sections - proper spacing between boxes */
.wpc-filters-section {
	background: rgba(255, 255, 255, 0.03) !important;
	padding: 15px !important;
	margin-bottom: 15px !important;
	margin-right: 15px !important;
	border-radius: 6px !important;
	border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.wpc-filters-section:last-of-type {
	margin-right: 0 !important;
}

/* Filter titles - more compact */
.wpc-filter-title {
	font-weight: 600 !important;
	margin-bottom: 10px !important;
	font-size: 13px !important;
	text-transform: uppercase !important;
	letter-spacing: 0.8px !important;
	color: #ffffff !important;
}

/* Filter lists - reduce spacing */
.wpc-filters-ul-list {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.wpc-filters-ul-list li {
	margin-bottom: 8px !important;
	padding: 0 !important;
}

.wpc-filters-ul-list li:last-child {
	margin-bottom: 0 !important;
}

/* Checkboxes and radio buttons - consistent spacing */
.wpc-filters-checkboxes label,
.wpc-filters-radio label {
	display: flex !important;
	align-items: center !important;
	cursor: pointer !important;
	padding: 6px 0 !important;
	transition: color 0.2s ease !important;
	font-size: 14px !important;
	line-height: 1.4 !important;
}

.wpc-filters-checkboxes input[type="checkbox"],
.wpc-filters-radio input[type="radio"] {
	margin-right: 8px !important;
	cursor: pointer !important;
	width: 18px !important;
	height: 18px !important;
	flex-shrink: 0 !important;
}

/* Term counts - more subtle */
.wpc-term-count {
	color: #888 !important;
	font-size: 12px !important;
	margin-left: 4px !important;
}

/* Dropdown styling - more compact */
.wpc-filters-widget-select,
.select2-container {
	width: 100% !important;
	max-width: 100% !important;
}

.wpc-filters-widget-select {
	padding: 10px 12px !important;
	border: 1px solid #444 !important;
	border-radius: 4px !important;
	background-color: #1a1a1a !important;
	color: #ffffff !important;
	font-size: 14px !important;
}

/* Search field - consistent styling */
.wpc-search-field-wrapper {
	position: relative !important;
}

.wpc-search-field {
	width: 100% !important;
	padding: 10px 12px 10px 35px !important;
	border: 1px solid #444 !important;
	border-radius: 4px !important;
	background-color: #1a1a1a !important;
	color: #ffffff !important;
	font-size: 14px !important;
}

.wpc-search-icon {
	position: absolute !important;
	left: 12px !important;
	top: 50% !important;
	transform: translateY(-50%) !important;
}

/* Buttons - prevent text wrapping and ensure proper sizing */
.wpc-filters-submit-button,
.wpc-filters-reset-button,
.wpc-filters-apply-button,
.wpc-filters-close-button {
	padding: 10px 24px !important;
	font-size: 14px !important;
	border-radius: 4px !important;
	text-decoration: none !important;
	display: inline-block !important;
	cursor: pointer !important;
	transition: all 0.3s ease !important;
	font-weight: 600 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.5px !important;
	white-space: nowrap !important;
	min-width: fit-content !important;
}

/* Button section spacing */
.wpc-filter-layout-submit-button {
	display: flex !important;
	gap: 10px !important;
	margin-top: 15px !important;
	padding-top: 15px !important;
	border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Mobile filter controls */
.wpc-filters-widget-controls-container {
	background: #1a1a1a !important;
	padding: 15px !important;
	border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.wpc-filters-widget-controls-wrapper {
	display: flex !important;
	gap: 10px !important;
	margin-bottom: 15px !important;
}

.wpc-filters-widget-controls-item {
	flex: 1 !important;
}

/* Filter content spacing */
.wpc-filter-content {
	margin-top: 10px !important;
}

/* Remove excess padding from wrapper */
.wpc-filters-widget-wrapper {
	gap: 0 !important;
}

.wpc-filters-scroll-container {
	padding: 0 !important;
}

/* Compact header */
.wpc-widget-close-container {
	padding: 15px 20px !important;
	background: #2d2d2d !important;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
	border-radius: 8px 8px 0 0 !important;
	margin: -20px -20px 20px -20px !important;
}

.wpc-widget-popup-title {
	font-size: 16px !important;
	font-weight: 700 !important;
	color: #ffffff !important;
	text-transform: uppercase !important;
	letter-spacing: 1px !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
	.wpc-filters-section {
		padding: 12px !important;
		margin-bottom: 12px !important;
	}
	
	.wpc-filter-title {
		font-size: 12px !important;
		margin-bottom: 8px !important;
	}
	
	.wpc-filters-ul-list li {
		margin-bottom: 6px !important;
	}
}
