/* GeoFotos Feed - Instagram Style */

:root {
	--primary-color: #0073aa;
	--secondary-color: #23282d;
	--text-color: #333333;
	--border-color: #e1e1e1;
	--background-color: #f8f9fa;
	--shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
	--shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
	--shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Reset for feed page */
.geofotos-feed-page {
	margin: 0;
	padding: 14px 2px !important;
	background-color: #0f1e2f;
}

/* Header */
.feed-header {
	margin-bottom: 10px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 1rem;
	color: #fff;
	position: sticky;
	top: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.feed-branding {
	display: flex;
	align-items: center;
	gap: 12px;
}

.feed-logo {
	width: 32px;
	height: 32px;
	color: var(--primary-color);
}

.feed-title {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
	color: var(--secondary-color);
}

.feed-filters {
	display: flex;
	gap: 8px;
}

.filter-btn {
	padding: 8px 16px;
	border: 1px solid var(--border-color);
	border-radius: 20px;
	background: #fff;
	color: var(--text-color);
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	transition: all 0.2s ease;
}

.filter-btn:hover {
	background: var(--primary-color);
	color: #fff;
	border-color: var(--primary-color);
}

.filter-btn.active {
	background: var(--primary-color);
	color: #fff;
	border-color: var(--primary-color);
}

/* Container */
.geofotos-feed-container {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.feed-main {
	flex: 1;
	padding: 15px;
	max-width: 1400px;
	margin: 0 auto;
	width: 100%;
	box-sizing: border-box;
}

/* Feed Grid - Responsive */
.geofotos-feed-grid {
	column-gap: 1rem;
}

/* Mobile - 1 column */
@media (max-width: 767px) {
	.geofotos-feed-grid {
		column-count: 1;
		/*max-width: 400px;*/
		margin: 0 auto;
	}

	.feed-header {
		/*padding: 12px 15px;*/
	}

	.feed-title {
		font-size: 18px;
	}

	.feed-filters {
		gap: 6px;
	}

	.filter-btn {
		padding: 6px 12px;
		font-size: 13px;
	}
}

/* Tablet - 2 columns */
@media (min-width: 540px) and (max-width: 767px) {
	.geofotos-feed-grid {
		column-count: 2;
	}
}

/* Tablet - 3 columns */
@media (min-width: 768px) and (max-width: 1023px) {
	.geofotos-feed-grid {
		column-count: 3;
	}
}

/* Desktop - 4 columns */
@media (min-width: 1024px) and (max-width: 1399px) {
	.geofotos-feed-grid {
		column-count: 4;
	}
}

/* Large Desktop - 5 columns */
@media (min-width: 1400px) {
	.geofotos-feed-grid {
		column-count: 5;
	}
}

/* Feed Item */
.geofotos-feed-item {
	background: black;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: var(--shadow-sm);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	display: flex;
	flex-direction: column;
	height: fit-content;
	page-break-inside: avoid;
	margin-bottom: 1rem;
}

.geofotos-feed-item:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-lg);
}

/* Mobile - remove max-width constraint for vertical photos */
@media (max-width: 540px) {
	.geofotos-feed-item {
		max-width: 100%;
		margin: 0 0 15px 0;
	}

	.feed-header {
		/*padding: 12px 15px;*/
	}

	.feed-title {
		font-size: 18px;
	}

	.feed-filters {
		gap: 6px;
	}

	.filter-btn {
		padding: 6px 12px;
		font-size: 13px;
	}
}

/* Photo */
.feed-photo-wrapper {
	position: relative;
}

.feed-photo {
	min-height: 0;
	position: relative;
	overflow: hidden;
}

.feed-photo-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	cursor: pointer;
	transition: all 0.3s ease;
}

.feed-photo-img:hover {
	transform: scale(1.05);
}

.feed-photo-img[data-src] {
	/*opacity: 1;*/
	/*transition: all 0.3s ease;*/
}

.feed-photo-img.loaded {
	opacity: 1;
}

/* Map button outside photo-wrapper */
.btn-view-map {
	width: 36px;
	height: 36px;
	border: none;
	background: #2264ad;
	padding: 0px;
	color: #fff;
	cursor: pointer;
	transition: all 0.2s ease;
	z-index: 10;
}

.btn-view-map:hover {
	background: #599be3;
	transform: scale(1.1);
}

.btn-view-map .dashicons {
	font-size: 18px;
}

/* Rating Overlay */
.feed-overlay-rating {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	border-radius: 12px;
	color: #fff;
	z-index: 20;
	backdrop-filter: blur(2px);
}

.feed-overlay-rating .geofotos-feed-rating-text {
	font-size: .7rem;
	font-weight: bold;
	color: #fff;
}

.feed-overlay-rating .geofotos-feed-stars {
	display: flex;
	gap: 4px;
	color: #fbbf24;
}

.feed-overlay-rating .geofotos-feed-stars i {
	font-size: 12px;
	cursor: pointer;
	color: #ccc;
}

.feed-overlay-rating .geofotos-feed-stars[data-user-rating="0"] i {
	cursor: pointer;
}

.feed-overlay-rating .geofotos-feed-stars[data-user-rating="0"] i {
	cursor: pointer;
}

.feed-overlay-rating .geofotos-feed-stars.has-voted {
	opacity: .5;
}

.feed-overlay-rating .geofotos-feed-stars.has-voted i {
	cursor: not-allowed;
}

.feed-overlay-rating .geofotos-feed-stars.has-voted i {
	cursor: not-allowed;
}

.feed-overlay-rating .geofotos-feed-stars.disabled i {
	cursor: default;
}

.feed-overlay-rating .geofotos-feed-stars i:hover,
.feed-overlay-rating .geofotos-feed-stars i.active {
	color: #ffc107;
}

/* Info Section */
.feed-info {
	padding: 1rem;
	display: flex;
	flex-direction: column;
	gap: 10px;
	flex-shrink: 0;
}

/* Head */
.feed-head {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 1rem;
}

.author-location {
	flex: 1;
}

.author-avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	/*border: 2px solid var(--primary-color);*/
	object-fit: cover;
}

.author-name {
	font-size: 16px;
	font-weight: 600;
	color: var(--secondary-color);
	text-decoration: none;
	transition: color 0.2s ease;
	flex: 1;
}

.author-name:hover {
	color: #bbb;
}

.post-date {
	font-size: .7rem;
	color: #999;
	margin-left: auto;
}

/* Meta Section (category + description) */
.feed-meta {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.feed-bottom-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.feed-rating-stars {
	display: flex;
	align-items: center;
	gap: 10px;
}

/* Category */
.feed-category {
	display: flex;
	align-items: center;
	padding: 1px 4px;
	border-radius: 1rem;
	gap: 8px;
}

.category-link {
	display: flex;
	align-items: center;
	gap: 6px;
	text-decoration: none;
	font-size: 10px;
	font-weight: 500;
	color: white;
	transition: color 0.2s ease;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: clip;
	text-shadow: 1px 1px #00000099;
}

.category-link:hover {
	color: #bbb;
}

.category-color {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	display: inline-block;
	flex-shrink: 0;
}

/* Location icon in feed-meta */
.feed-location {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	line-height: 1rem;
	color: #666;
}

.feed-location .dashicons {
	font-size: 14px;
}

/* Description */
.feed-description {
	margin: 0;
	padding: 0;
}

.description-text {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	color: #aaa;
}

.description-text.collapsed {
	display: -webkit-box;
	-webkit-line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
	max-height: 3em;
}

.description-text.expanded {
	display: block;
	max-height: none;
	-webkit-line-clamp: unset;
}

.btn-expand {
	background: none;
	border: none;
	color: var(--primary-color);
	font-size: 12px;
	font-weight: 500;
	cursor: pointer;
	padding: 0;
	margin-top: 4px;
	transition: opacity 0.2s ease;
	text-transform: inherit;
}

.btn-expand:hover {
	opacity: 0.8;
}

/* Location icon in feed-info */
.feed-location {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: .9rem;
	color: #777;
}

.feed-location .dashicons {
	font-size: 14px;
}

/* Load More Button */
.feed-load-more {
	display: flex;
	justify-content: center;
	padding: 20px 0;
}

.btn-load-more {
	padding: 12px 32px;
	border: none;
	background: var(--primary-color);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	border-radius: 25px;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 10px;
	transition: all 0.2s ease;
}

.btn-load-more:hover {
	background: #005a87;
	transform: translateY(-2px);
	box-shadow: var(--shadow-md);
}

.btn-load-more:disabled {
	background: #ccc;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

.btn-spinner {
	display: none;
	font-size: 18px;
	animation: spin 1s linear infinite;
}

.btn-load-more.loading .btn-text {
	visibility: hidden;
}

.btn-load-more.loading .btn-spinner {
	display: inline-block;
}

.page-numbers {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	list-style: none;
	padding: 20px 0;
}

.page-numbers li a {
	color: white;
}

.page-numbers li {
	display: flex;
	background: #00000070;
	height: 36px;
	min-width: 36px;
	margin: 0;
	padding: 1rem;
	border-radius: 2rem;
	align-items: center;
	justify-content: center;
}

.page-numbers li span,
.page-numbers li a {
	margin: 0;
	padding: 0;
	color: white;
}

.page-numbers li span[aria-current="page"] {
	font-weight: bold;
	color: #2264ad;
}


@keyframes spin {
	from {
		transform: rotate(0deg);
	}

	to {
		transform: rotate(360deg);
	}
}

/* Empty State */
.feed-empty {
	text-align: center;
	padding: 60px 20px;
	color: #666;
}

.feed-empty p {
	font-size: 16px;
	margin: 0;
}

/* Loading Skeleton */
.skeleton {
	background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
	background-size: 200% 100%;
	animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
	0% {
		background-position: 200% 0;
	}

	100% {
		background-position: -200% 0;
	}
}

/* Accessibility */
.geofotos-feed-item:focus-within {
	box-shadow: var(--shadow-md);
	outline: 2px solid var(--primary-color);
	outline-offset: 2px;
}

button[aria-label] {
	position: relative;
}

button[aria-label]::after {
	content: attr(aria-label);
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Print Styles */
@media print {
	.feed-header {
		display: none;
	}

	.geofotos-feed-grid {
		grid-template-columns: 2;
	}

	.geofotos-feed-item {
		break-inside: avoid;
		page-break-inside: avoid;
	}
}

/* Map Details Lightbox */
#geofotos-map-details-lightbox {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.85);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2000;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	backdrop-filter: blur(5px);
	-webkit-backdrop-filter: blur(5px);
	flex-wrap: wrap;
	padding-top: 70px;
}

#geofotos-map-details-lightbox.is-visible {
	opacity: 1;
	visibility: visible;
}

#geofotos-map-details-lightbox .geofotos-lightbox-content {
	background: #2a2a2a;
	color: #fff;
	padding: 20px;
	border-radius: 12px;
	width: 90%;
	position: relative;
	display: flex;
	gap: 3rem;
	box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
	height: 75%;
	overflow-y: auto;
	flex-wrap: wrap;
}

#geofotos-map-details-lightbox .lightbox-close {
	position: absolute;
	top: 10px;
	right: 15px;
	background: none;
	border: none;
	color: #aaa;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
}

#geofotos-map-details-lightbox .lightbox-close:hover {
	color: #fff;
}

.geofotos-lightbox-map-container {
	min-width: 260px;
	min-height: 50%;
	border-radius: 8px;
	background-color: #555;
	flex: 1;
}

.geofotos-lightbox-info {
	display: flex;
	flex-direction: column;
	justify-content: center;
	position: relative;
	z-index: 10;
	gap: 1rem;
	width: 100%;
	min-width: 200px;
	flex: 1;
}

.geofotos-lightbox-info .geofotos-info-row {
	display: flex;
	justify-content: space-between;
	padding-bottom: 10px;
	border-bottom: 1px solid #444;
	/* Subtle line */
	font-size: 14px;
	color: #fff !important;
}

.geofotos-lightbox-info .geofotos-info-row:last-child {
	border-bottom: none;
}

.geofotos-lightbox-info .geofotos-info-row strong {
	color: #ccc !important;
	margin-right: 15px;
}

.geofotos-info-row span {
	text-align: right;
}

#geofotos-map-details-lightbox .geofotora-btn {
	width: 100%;
	text-align: center;
	padding: 12px;
	font-size: 15px;
	/*background-color: var(--primary-color);*/
	border: none;
	text-decoration: none;
	color: white;
	border-radius: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.geofotos-lightbox-actions {
	display: flex;
	gap: 10px;
	width: 100%;
	flex-direction: column;
}

#geofotos-map-details-lightbox .geofotora-btn {
	flex: 1;
}

.geofotora-btn-secondary {
	background-color: initial;
	text-transform: initial;
}

.geofotora-btn-secondary:hover {
	background-color: #616161;
}