/**
 * Premium Instagram Feed Shortcode Styles
 */

.ig-feed-container {
	max-width: 1200px;
	margin: 40px auto;
	padding: 0 15px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: #111;
}

/* Instagram Profile Header */
.ig-profile-header {
	display: flex;
	align-items: flex-start;
	gap: 24px;
	padding: 20px 0;
	margin-bottom: 24px;
	border-bottom: 1px solid #dbdbdb;
}

.ig-profile-pic-link {
	flex-shrink: 0;
}

.ig-profile-pic {
	width: 90px;
	height: 90px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid #dbdbdb;
}

.ig-profile-info {
	flex: 1;
	min-width: 0;
}

.ig-profile-username-row {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 8px;
}

.ig-profile-username-link {
	text-decoration: none;
	color: #262626;
}

.ig-profile-username-link:hover {
	color: #00376b;
}

.ig-profile-username {
	font-size: 20px;
	font-weight: 400;
	margin: 0;
	padding: 0;
	line-height: 1.2;
	color: inherit;
}

.ig-verified-badge {
	flex-shrink: 0;
}

.ig-visit-profile-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: #0095f6;
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 6px 16px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s;
}

.ig-visit-profile-btn:hover {
	background: #1877f2;
	color: #fff;
}

.ig-refresh-profile-btn {
	background: none;
	border: 1px solid #dbdbdb;
	border-radius: 8px;
	padding: 5px 8px;
	cursor: pointer;
	color: #262626;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s;
}

.ig-refresh-profile-btn:hover {
	background: #f5f5f5;
	color: #0095f6;
}

.ig-refresh-profile-btn.refreshing svg {
	animation: ig-spin 1s linear infinite;
}

@keyframes ig-spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

.ig-profile-full-name {
	font-size: 14px;
	font-weight: 600;
	color: #262626;
	margin-bottom: 4px;
}

.ig-profile-stats {
	display: flex;
	gap: 24px;
	margin-bottom: 6px;
	font-size: 14px;
	color: #262626;
}

.ig-profile-stats strong {
	font-weight: 600;
}

.ig-profile-category {
	font-size: 13px;
	color: #8e8e8e;
	margin-bottom: 4px;
}

.ig-profile-bio {
	font-size: 14px;
	line-height: 1.5;
	color: #262626;
	word-wrap: break-word;
}

.ig-profile-pic--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
	color: #fff;
	font-size: 24px;
	font-weight: 700;
}

.ig-profile-bio--hint {
	color: #8e8e8e;
	font-style: italic;
}

@media (max-width: 640px) {
	.ig-profile-header {
		gap: 16px;
	}
	.ig-profile-pic {
		width: 64px;
		height: 64px;
	}
	.ig-profile-username {
		font-size: 16px;
	}
	.ig-profile-stats {
		gap: 16px;
		font-size: 13px;
	}
}

/* Cards Grid Layout */
.ig-feed-grid-frontend {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 30px;
	transition: opacity 0.3s ease;
}

@media (max-width: 991px) {
	.ig-feed-grid-frontend {
		grid-template-columns: repeat(2, 1fr);
		gap: 20px;
	}
}

@media (max-width: 640px) {
	.ig-feed-grid-frontend {
		grid-template-columns: 1fr;
		gap: 20px;
	}
}

/* Card design */
.ig-card {
	background: #ffffff;
	border: 1px solid #e1e1e1;
	border-radius: 4px;
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
	overflow: hidden;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	display: flex;
	flex-direction: column;
}

.ig-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.ig-card-inner {
	display: flex;
	flex-direction: column;
	height: 100%;
}

/* Card Header */
.ig-card-header {
	display: flex;
	align-items: center;
	padding: 14px 16px;
	border-bottom: 1px solid #f0f0f0;
	position: relative;
}

.ig-author-avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	margin-right: 12px;
	box-shadow: inset 0 0 0 2px #fff;
	flex-shrink: 0;
}

.ig-avatar-img {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
}

.ig-avatar-initials {
	font-size: 11px;
	font-weight: 700;
	color: #ffffff;
	letter-spacing: -0.5px;
}

.ig-author-meta {
	flex-grow: 1;
	line-height: 1.2;
}

.ig-author-username {
	margin: 0 0 3px 0;
	font-size: 13px;
	font-weight: 700;
	padding: 0;
}

.ig-author-username a {
	color: #111;
	text-decoration: none;
	transition: color 0.2s;
}

.ig-author-username a:hover {
	color: #e50914;
}

.ig-post-date {
	font-size: 10px;
	color: #999;
	font-weight: 600;
	letter-spacing: 0.3px;
	text-transform: uppercase;
}

.ig-media-indicator {
	width: 20px;
	height: 20px;
	color: #222;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.media-indicator-svg {
	width: 18px;
	height: 18px;
}

/* Card Media (3:4 Aspect Ratio) */
.ig-card-media {
	width: 100%;
	position: relative;
	padding-top: 133.33%; /* 3:4 Aspect Ratio */
	background-color: #f7f7f7;
	overflow: hidden;
}

.ig-card-media img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.ig-card:hover .ig-card-media img {
	transform: scale(1.03);
}

.ig-image-placeholder {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #bbb;
}

.ig-image-placeholder .dashicons {
	font-size: 48px;
	width: 48px;
	height: 48px;
}

/* Card Footer */
.ig-card-footer {
	padding: 16px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.ig-meta-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
	border-bottom: 1px solid #f0f0f0;
	padding-bottom: 12px;
}

/* Likes/Comments Stats */
.ig-stats {
	display: flex;
	align-items: center;
	gap: 14px;
}

.ig-stat-likes, .ig-stat-comments {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 700;
	color: #333;
}

.ig-stat-likes svg, .ig-stat-comments svg {
	width: 16px;
	height: 16px;
	color: #333;
}

.ig-stat-likes:hover svg {
	color: #e50914;
}

/* Sharing row */
.ig-share {
	display: flex;
	align-items: center;
	gap: 12px;
}

.share-icon {
	color: #888;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: color 0.2s, transform 0.2s;
	text-decoration: none;
}

.share-icon svg {
	width: 14px;
	height: 14px;
}

.share-icon:hover {
	transform: scale(1.15);
}

.share-facebook:hover { color: #1877f2; }
.share-twitter:hover { color: #000000; }
.share-pinterest:hover { color: #bd081c; }

/* Caption block with line clamp */
.ig-card-caption {
	font-size: 12px;
	line-height: 1.5;
	color: #444;
}

.caption-text {
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: normal;
}

.caption-text a {
	color: #00376b;
	text-decoration: none;
	font-weight: 600;
}

.caption-text a:hover {
	text-decoration: underline;
}

/* Load More Pagination */
.ig-feed-pagination {
	display: flex;
	justify-content: center;
	margin-top: 40px;
}

.ig-load-more-btn {
	background: #ffffff;
	border: 1px solid #d1d1d1;
	border-radius: 4px;
	color: #333;
	padding: 12px 36px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	outline: none;
	transition: all 0.2s ease;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.ig-load-more-btn:hover:not(:disabled) {
	background: #f7f7f7;
	border-color: #bbb;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.ig-load-more-btn:active:not(:disabled) {
	transform: scale(0.98);
}

.ig-load-more-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.spinner-dot {
	width: 6px;
	height: 6px;
	background-color: #333;
	border-radius: 50%;
	display: none;
}

.ig-load-more-btn.loading .spinner-dot {
	display: inline-block;
	animation: bounce 1s infinite alternate;
}

@keyframes bounce {
	0% { transform: translateY(0); opacity: 0.3; }
	100% { transform: translateY(-4px); opacity: 1; }
}

.ig-feed-no-posts, .ig-feed-error {
	grid-column: 1 / -1;
	text-align: center;
	padding: 40px 20px;
	border: 1px dashed #ccc;
	border-radius: 4px;
	color: #666;
	font-size: 14px;
}

.ig-feed-error {
	border-color: #ef4444;
	color: #ef4444;
	background: rgba(239, 68, 68, 0.03);
}
