/**
 * Events Frontend Styles
 *
 * @package    Karate_Club_Manager
 * @subpackage Karate_Club_Manager/assets/css
 * @since      1.0.73
 */

/* Container */
.kcm-events-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
}

/* Message Alerts */
.kcm-message {
	padding: 15px 20px;
	margin-bottom: 20px;
	border-radius: 4px;
	font-size: 16px;
	line-height: 1.5;
	position: relative;
	z-index: 10000; /* Higher than modal (9999) */
}

.kcm-message.success {
	background-color: #d4edda;
	border: 1px solid #c3e6cb;
	color: #155724;
}

.kcm-message.error {
	background-color: #f8d7da;
	border: 1px solid #f5c6cb;
	color: #721c24;
}

/* No Events Message */
.kcm-no-events {
	text-align: center;
	padding: 60px 20px;
	background: #f8f9fa;
	border-radius: 8px;
	margin: 20px 0;
}

.kcm-no-events p {
	font-size: 18px;
	color: #666;
	margin: 0;
}

/* Events Grid */
.kcm-events-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
	gap: 30px;
	margin-top: 20px;
}

/* Event Card */
.kcm-event-card {
	background: #ffffff;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	overflow: hidden;
	transition: transform 0.2s, box-shadow 0.2s;
	display: flex;
	flex-direction: column;
}

.kcm-event-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Event Image */
.kcm-event-image {
	width: 100%;
	height: 220px;
	overflow: hidden;
	background: #f0f0f0;
}

.kcm-event-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Event Content */
.kcm-event-content {
	padding: 24px;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.kcm-event-title {
	margin: 0 0 16px 0;
	font-size: 24px;
	font-weight: 600;
	color: #333;
	line-height: 1.3;
}

/* Event Meta */
.kcm-event-meta {
	margin-bottom: 16px;
}

.kcm-event-meta-item {
	display: flex;
	align-items: flex-start;
	margin-bottom: 10px;
	font-size: 15px;
	color: #555;
	line-height: 1.5;
}

.kcm-event-meta-item .dashicons {
	width: 20px;
	height: 20px;
	font-size: 20px;
	margin-right: 8px;
	flex-shrink: 0;
	color: #667eea;
}

.kcm-event-meta-item strong {
	margin-right: 6px;
	color: #333;
}

.kcm-event-meta-item.kcm-event-closing {
	background: #fff3cd;
	padding: 8px 12px;
	border-radius: 4px;
	border-left: 3px solid #ffc107;
}

.kcm-event-meta-item.kcm-event-closing .dashicons {
	color: #ff9800;
}

/* Event Description */
.kcm-event-description {
	margin-bottom: 20px;
	font-size: 15px;
	line-height: 1.6;
	color: #666;
	flex: 1;
}

/* Event Actions */
.kcm-event-actions {
	margin-top: auto;
	padding-top: 16px;
	border-top: 1px solid #e0e0e0;
}

/* Buttons */
.kcm-btn-primary,
.kcm-event-attend-btn {
	display: inline-block;
	padding: 12px 28px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #ffffff !important;
	text-decoration: none;
	border: none;
	border-radius: 4px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.2s, transform 0.1s;
	text-align: center;
	width: 100%;
	box-sizing: border-box;
}

.kcm-btn-primary:hover,
.kcm-event-attend-btn:hover {
	opacity: 0.9;
	transform: translateY(-1px);
}

.kcm-btn-primary:active,
.kcm-event-attend-btn:active {
	transform: translateY(0);
}

.kcm-btn-secondary {
	display: inline-block;
	padding: 12px 28px;
	background: #6c757d;
	color: #ffffff !important;
	text-decoration: none;
	border: none;
	border-radius: 4px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
	text-align: center;
	width: 100%;
	box-sizing: border-box;
}

.kcm-btn-secondary:hover {
	background: #5a6268;
}

/* Event Notice */
.kcm-event-notice {
	background: #e7f3ff;
	padding: 16px;
	border-radius: 4px;
	border-left: 3px solid #2196f3;
}

.kcm-event-notice p {
	margin: 0 0 12px 0;
	font-size: 14px;
	color: #333;
}

.kcm-event-notice .kcm-btn-secondary {
	width: auto;
	background: #2196f3;
}

.kcm-event-notice .kcm-btn-secondary:hover {
	background: #1976d2;
}

/* Closed Registration Notice */
.kcm-event-notice-closed {
	background: #fff3cd;
	border-left: 3px solid #ffc107;
}

.kcm-event-notice-closed p {
	margin: 0;
	font-size: 15px;
	color: #856404;
	font-weight: 500;
}

/* Registered Members */
.kcm-registered-members {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid #e0e0e0;
}

.kcm-registered-members p {
	margin: 0 0 8px 0;
	font-size: 14px;
	color: #333;
}

.kcm-registered-members ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.kcm-registered-members li {
	display: flex;
	align-items: center;
	padding: 6px 0;
	font-size: 14px;
	color: #155724;
}

.kcm-registered-members li .dashicons {
	width: 18px;
	height: 18px;
	font-size: 18px;
	margin-right: 6px;
	color: #28a745;
}

/* Modal */
.kcm-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 9999;
}

.kcm-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
}

.kcm-modal-content {
	position: relative;
	max-width: 500px;
	margin: 100px auto;
	background: #ffffff;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
	animation: kcmModalSlideIn 0.3s ease-out;
}

@keyframes kcmModalSlideIn {
	from {
		transform: translateY(-50px);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

.kcm-modal-header {
	padding: 20px 24px;
	border-bottom: 1px solid #e0e0e0;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.kcm-modal-header h3 {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
	color: #333;
}

.kcm-modal-close {
	background: none;
	border: none;
	font-size: 32px;
	line-height: 1;
	color: #999;
	cursor: pointer;
	padding: 0;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	transition: background 0.2s, color 0.2s;
}

.kcm-modal-close:hover {
	background: #f0f0f0;
	color: #333;
}

.kcm-modal-body {
	padding: 24px;
}

.kcm-modal-body > p {
	margin: 0 0 16px 0;
	font-size: 15px;
	color: #666;
}

/* Member Selection */
.kcm-member-selection {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.kcm-member-option {
	position: relative;
}

.kcm-member-option label {
	display: flex;
	align-items: center;
	padding: 12px 16px;
	background: #f8f9fa;
	border: 2px solid #e0e0e0;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.2s;
}

.kcm-member-option label:hover {
	background: #e9ecef;
	border-color: #667eea;
}

.kcm-member-option input[type="radio"],
.kcm-member-option input[type="checkbox"] {
	margin: 0 12px 0 0;
	width: 18px;
	height: 18px;
	cursor: pointer;
}

.kcm-member-option input[type="radio"]:checked + .kcm-member-name,
.kcm-member-option input[type="checkbox"]:checked + .kcm-member-name {
	font-weight: 600;
	color: #667eea;
}

.kcm-member-option label:has(input:checked) {
	background: #e7f3ff;
	border-color: #667eea;
}

.kcm-member-name {
	font-size: 16px;
	color: #333;
}

.kcm-modal-footer {
	padding: 16px 24px;
	border-top: 1px solid #e0e0e0;
	display: flex;
	justify-content: flex-end;
	gap: 12px;
}

.kcm-modal-footer .kcm-btn-primary,
.kcm-modal-footer .kcm-btn-secondary {
	width: auto;
	min-width: 100px;
}

.kcm-modal-footer .kcm-btn-primary:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
	.kcm-events-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.kcm-event-title {
		font-size: 20px;
	}

	.kcm-modal-content {
		margin: 50px 20px;
		max-width: none;
	}
}

@media (max-width: 480px) {
	.kcm-events-container {
		padding: 15px;
	}

	.kcm-event-content {
		padding: 16px;
	}

	.kcm-event-title {
		font-size: 18px;
	}

	.kcm-event-meta-item {
		font-size: 14px;
	}

	.kcm-btn-primary,
	.kcm-btn-secondary,
	.kcm-event-attend-btn {
		padding: 10px 20px;
		font-size: 15px;
	}
}
