/**
 * Styles for JCA Events shortcode
 *
 * @package    JCA
 * @subpackage JCA/public/css
 */

/* Alpine.js x-cloak - Hide elements until Alpine is ready */
[x-cloak] {
	display: none !important;
}

/* Container */
.jca-events-container {
	margin: 20px 0;
}

/* Filters */
.jca-events-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 30px;
	padding-bottom: 20px;
	align-items: center;
	justify-content: center;
}

.jca-filter-btn {
	padding: 10px 20px;
	background-color: #ffffff;
	border: 2px solid #ffffff;
	border-radius: 10px;
	color: #333;
	cursor: pointer;
	transition: all 0.3s ease;
	font-size: 0.85em;
	font-weight: 600;
}

.jca-filter-btn:hover {
	background-color: #e8e8e8;
	border-color: #0073aa;
}

.jca-filter-btn.active {
	background-color: #0e234e;
	border-color: #0e234e;
	color: #fff;
}

.jca-filter-btn:focus {
	outline: 2px solid #0073aa;
	outline-offset: 2px;
}

.jca-events-no-category {
    display: flex;
    background: #00000008;
    padding: 5px 20px;
    border-radius: 20px;
    margin-top: 20px;
    align-items: baseline;
}

.jca-events-no-category select {
	border: none;
    border-bottom: 1px #0e234e dashed;
    font-size: 17px;
    background: none;
    padding: 0;
}

/* Results */
.jca-events-results {
	min-height: 200px;
}

.jca-events-no-results {
	padding: 40px 20px;
	text-align: center;
	color: #666;
	font-size: 1.1em;
}

/* Grid Format */
.jca-events-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 20px;
	margin: 20px 0;
}

.jca-event-card {
	border: none;
	border-radius: 10px;
	overflow: hidden;
	transition: box-shadow 0.3s ease;
	padding: 20px;
	text-decoration: none;
	background-color: #fff;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.jca-event-main-information {
	display: flex;
	flex-direction: row;
	gap: 10px;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 5px;
}

.jca-event-categories {
	display: flex;
	flex-direction: row;
	gap: 8px;
	flex-wrap: wrap;
}

.jca-event-category {
    background-color: #55555588;
    color: #555555;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 600;
}

.jca-event-category.absoluto {
	background-color: #eb131310;
	color: #eb1313;
}
.jca-event-category.alevin {
	background-color: #17eb1310;
	color: #17eb13;
}
.jca-event-category.benjamin {
	background-color: #1317eb10;
	color: #1317eb;
}
.jca-event-category.cadete {
	background-color: #eb951310;
	color: #eb9513;
}
.jca-event-category.infantil {
	background-color: #eb13b910;
	color: #eb13b9;
}
.jca-event-category.junior {
	background-color: #eee71120;
	color: #eee711;
}
.jca-event-category.mini-benjamin {
	background-color: #13ebd210;
	color: #11eedd;
}	
.jca-event-category.mini-benjamin-plus {
	background-color: #eb571310;
	color: #eb5713;
}
.jca-event-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.jca-event-date-container {
	display: flex;
	align-items: flex-end;
}

.jca-event-date {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	gap: 0px;
	font-size: 0.9em;
	font-weight: 500;
	color: #333;
}

.jca-event-date strong {
	font-size: 28px;
	font-weight: 700;
	color: rgb(31, 31, 31);
	line-height: 1;
}

.jca-event-date span {
	font-size: 14px;
	font-weight: 400;
	color: #666;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.jca-event-image {
	width: 100%;
	overflow: hidden;
}

.jca-event-image img {
	width: 100%;
	height: auto;
	display: block;
	transition: transform 0.3s ease;
}

.jca-event-card:hover .jca-event-image img {
	transform: scale(1.05);
}

.jca-event-card-content {
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.jca-event-card-content .jca-event-date {
	min-width: auto;
	margin-bottom: 10px;
}

.jca-event-title {
	font-size: 1.4em;
	font-weight: 700;
	margin: 0;
	color: rgb(31, 31, 31);
	line-height: 1.3;
}

.jca-event-information {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 0.95em;
	color: #626d84;
	line-height: 1.4;
}

.jca-event-information .icon {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	background-color: #af272f;
	-webkit-mask-size: contain;
	mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
}

.jca-event-information:first-of-type .icon {
	-webkit-mask-image: url("data:image/svg+xml,%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%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%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%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
}

.jca-event-information:nth-of-type(2) .icon {
	-webkit-mask-image: url("data:image/svg+xml,%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%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpolyline points='12 6 12 12 16 14'%3E%3C/polyline%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%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%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpolyline points='12 6 12 12 16 14'%3E%3C/polyline%3E%3C/svg%3E");
}

.jca-event-information:nth-of-type(3) .icon {
	-webkit-mask-image: url("data:image/svg+xml,%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%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'%3E%3C/path%3E%3Ccircle cx='12' cy='10' r='3'%3E%3C/circle%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%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%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'%3E%3C/path%3E%3Ccircle cx='12' cy='10' r='3'%3E%3C/circle%3E%3C/svg%3E");
}

.jca-event-card-content .jca-event-venue {
	margin: 5px 0 0 0;
	font-size: 0.9em;
}

/* Compact Format */
.jca-events-compact {
	list-style: none;
	padding: 0;
	margin: 10px 0;
}

.jca-event-compact-item {
	padding: 8px 0;
	border-bottom: 1px solid #f0f0f0;
	display: flex;
	gap: 15px;
	align-items: center;
}

.jca-event-compact-item:last-child {
	border-bottom: none;
}

.jca-event-date-compact {
	min-width: 50px;
	font-weight: 600;
	color: #666;
	font-size: 0.9em;
}

.jca-event-compact-item a {
	text-decoration: none;
	color: #333;
	transition: color 0.3s ease;
}

.jca-event-compact-item a:hover {
	color: #0073aa;
}

/* Pagination */
.jca-events-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	margin-top: 40px;
	padding-top: 30px;
	border-top: 2px solid #e0e0e0;
}

.jca-pagination-btn {
	padding: 10px 20px;
	background-color: #0073aa;
	color: #fff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 0.95em;
	font-weight: 500;
	transition: all 0.3s ease;
}

.jca-pagination-btn:hover:not(.disabled) {
	background-color: #005a87;
	transform: translateY(-1px);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.jca-pagination-btn.disabled {
	background-color: #ccc;
	cursor: not-allowed;
	opacity: 0.6;
}

.jca-pagination-btn:focus {
	outline: 2px solid #0073aa;
	outline-offset: 2px;
}

.jca-pagination-info {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 5px;
	color: #666;
	font-size: 0.95em;
}

.jca-pagination-info span:first-child {
	font-weight: 600;
	color: #333;
}

/* Responsive */
@media (max-width: 768px) {
	.jca-event-item {
		flex-direction: column;
		gap: 10px;
	}

	.jca-event-date {
		min-width: auto;
	}

	.jca-events-grid {
		grid-template-columns: 1fr;
	}

	.jca-events-filters {
		flex-direction: column;
	}

	.jca-filter-btn {
		width: 100%;
		text-align: center;
	}

	.jca-events-pagination {
		flex-direction: column;
		gap: 15px;
	}

	.jca-pagination-btn {
		width: 100%;
		max-width: 200px;
	}
}

