/*
Theme Name: Strava Activities
Description: Theme to display Strava activities from custom post type. Configure Strava and sync in Admin → Strava Activities.
Version: 1.0
*/

/* Main layout */
body {
	background-color: #f8f2dc;
}

.main-content {
	min-height: 100vh;
}

/* Wrapper and heading styles */
.strava-activities-wrap {
	font-family: system-ui, sans-serif;
	margin: 0;
	padding: 0;
}

.strava-activities-wrap h1 {
	font-size: 2rem;
	font-weight: 900;
	color: #212529;
	margin-bottom: 1.5rem;
	padding-bottom: 1rem;
	border-bottom: 3px solid #6E675F;
}

/* Map styles */
.strava-activities-map {
	height: 400px;
	margin: 2rem 0;
	border: 1px solid #dee2e6;
	border-radius: 0.375rem;
	border: 2px solid #6E675F;
}

/* Popup styles */
.strava-activities-wrap .popup-activity {
	min-width: 200px;
}

.strava-activities-wrap .popup-activity h3 {
	margin: 0 0 0.5rem;
	font-size: 1rem;
	font-weight: 600;
	color: #6E675F;
}

.strava-activities-wrap .popup-activity p {
	margin: 0.25rem 0;
	font-size: 0.9rem;
	color: #6c757d;
}

/* Photo gallery styles */
.strava-activities-wrap .popup-photos {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 0.5rem;
}

.strava-activities-wrap .popup-photos a {
	display: block;
	transition: transform 0.2s ease;
}

.strava-activities-wrap .popup-photos img {
	width: 64px;
	height: 64px;
	object-fit: cover;
	display: block;
	border-radius: 0.25rem;
	border: 1px solid #dee2e6;
}

.strava-activities-wrap .popup-photos a:hover img {
	opacity: 0.85;
	transform: scale(1.05);
	box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.strava-activities-wrap table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 2rem;
	background-color: white;
	border-radius: 0.375rem;
	overflow: hidden;
	outline: 2px solid #6E675F;
    outline-offset: -2px;
}

.strava-activities-wrap th,
.strava-activities-wrap td {
	text-align: left;
	padding: 1rem 0.75rem;
	border-bottom: 1px solid #dee2e6;
}

.strava-activities-wrap th {
	font-weight: 600;
	background-color: #f8f9fa;
	color: #495057;
	border-top: 1px solid #dee2e6;
}

.strava-activities-wrap tr:last-child td {
	border-bottom: none;
}

.strava-activities-wrap tbody tr:hover {
	background-color: #f8f9fa;
	transition: background-color 0.2s ease;
}

.strava-activities-wrap .distance {
	white-space: nowrap;
	font-weight: 500;
	color: #6E675F;
}

/* Responsive adjustments */
@media (max-width: 768px) {
	.strava-activities-wrap h1 {
		font-size: 1.5rem;
	}

	.strava-activities-wrap th,
	.strava-activities-wrap td {
		padding: 0.75rem 0.5rem;
		font-size: 0.9rem;
	}

	.strava-activities-map {
		height: auto;
		aspect-ratio: 4 / 3;
	}

	.strava-activity-detail {
		padding-inline: 0rem !important;
	}
}

/* Table row hover effect and cursor */
.strava-activities-wrap tbody tr:hover {
	background-color: #e7f1ff;
	transition: background-color 0.2s ease;
}

/* Detail popup styles */
.strava-activity-detail {
	padding: 1.5rem;
	background: white;
	border-radius: 0.5rem;
}

.strava-activity-detail h2 {
	margin: 0 0 1rem 0;
	font-size: 1.5rem;
	color: #212529;
	padding-bottom: 0.75rem;
	border-bottom: 2px solid #6E675F;
}

.activity-date {
	font-size: 0.95rem;
	color: #6c757d;
	margin: 0.5rem 0;
}

.activity-type {
	font-size: 1rem;
	color: #6E675F;
	margin: 0.75rem 0;
}

.activity-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 1rem;
	margin: 1.5rem 0;
	padding: 1rem;
	background-color: #f8f9fa;
	border-radius: 0.375rem;
}

.stat {
	display: flex;
	flex-direction: column;
}

.stat .label {
	font-weight: 600;
	color: #495057;
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.stat .value {
	font-size: 1.25rem;
	color: #6E675F;
	font-weight: 700;
	margin-top: 0.3rem;
}

.activity-photos {
	margin: 1.5rem 0;
}

.activity-photos h3 {
	font-size: 1.1rem;
	color: #212529;
	margin: 0 0 0.75rem 0;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid #dee2e6;
}

.photos-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	gap: 0.75rem;
}

.photos-grid a {
	display: block;
	overflow: hidden;
	border-radius: 0.375rem;
	border: 1px solid #dee2e6;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.detail-photo {
	width: 100%;
	height: 120px;
	object-fit: cover;
	display: block;
}

.photos-grid a:hover {
	transform: scale(1.05);
	box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.activity-actions {
	margin-top: 1.5rem;
	padding-top: 1rem;
	border-top: 1px solid #dee2e6;
	display: flex;
	gap: 0.5rem;
}

.activity-actions a {
	display: inline-block;
	padding: 0.5rem 1rem;
	background-color: #6E675F;
	color: white;
	text-decoration: none;
	border-radius: 0.375rem;
	border: none;
	cursor: pointer;
	font-weight: 500;
	transition: background-color 0.2s ease;
}

.activity-actions a:hover {
	background-color: #0b5ed7;
	text-decoration: none;
}

/* Detail button in map popup */
.detail-btn:hover {
	background-color: #0b5ed7 !important;
	transform: translateY(-1px);
	box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

/* Fancybox modal width */
.fancybox-detail-modal {
	width: 600px;
	max-width: 95vw;
}

.fancybox__container .fancybox-detail-modal {
	width: 600px;
	max-width: 95vw;
}
