/* Instagram Widget Modal – CSS (identyczny jak w wersji WordPress) */
/* Download   "Figtree", "Figtree Fallback" dont */
@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700&display=swap');
.custom-modal-overlay {
	display: none;
	position: fixed;
	z-index: 1049;
	left: 0;
	top: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(0, 0, 0, 0.7);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
	animation: none;
}
.custom-modal-overlay.active {
	opacity: 1;
	pointer-events: auto;
	animation: fadeInOverlay 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes fadeInOverlay {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}
.custom-modal-dialog {
	font-family: "Figtree", "Figtree Fallback", sans-serif;
	width: 100%;
	max-width: 900px;
	margin: auto;
	border: none;
	border-radius: 1.5rem;
	background: #fff;
	box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.2);
	padding: 0;
	z-index: 1050;
	max-height: 95vh;
	overflow: visible;
	opacity: 0;
	transform: translateY(40px) scale(0.98);
	transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
		transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
	pointer-events: none;
}
.custom-modal-dialog.active {
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
	animation: fadeInModal 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes fadeInModal {
	from {
		opacity: 0;
		transform: translateY(40px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}
.custom-modal-dialog.closing {
	opacity: 0;
	transform: translateY(40px) scale(0.98);
	transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
		transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	pointer-events: none;
}
.custom-modal-inner {
	min-height: 200px;
	min-width: 200px;
}
.custom-modal-close-row {
	position: sticky;
	top: 0;
	z-index: 10;
	display: flex;
	justify-content: flex-end;
	height: 0;
}
.custom-modal-close-btn {
	margin: 1rem;
	background: #e7e5e4;
	border: none;
	border-radius: 9999px;
	padding: 1.3rem 0.5rem;
	font-weight: bold;
	color: #444;
	cursor: pointer;
	transition: background 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
}
.custom-modal-close-btn:hover {
	background: #d6d3d1;
}
.custom-modal-close-icon {
	width: 1.5rem;
	height: 1.5rem;
}
.custom-modal-content-wrap {
	display: flex;
	background: #fff;
	border-radius: 1.5rem;
	overflow: hidden;
	max-width: 100%;
}
@media (max-width: 800px) {
	.custom-modal-content-wrap {
		flex-direction: column;
	}
}
.custom-modal-media {
	aspect-ratio: 9/16;
	min-width: 220px;
	max-width: 400px;
	background: #000;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}
.custom-modal-media img,
.custom-modal-media video {
	width: 100%;
	height: auto;
	max-height: 70vh;
	object-fit: cover;
	border-radius: 0;
	display: block;
	position: relative !important;
	transform: none !important;
}
.custom-modal-info {
	flex: 1;
	padding: 2rem 1.5rem;
	overflow-y: auto;
	overflow-x: hidden;
	background: #fff;
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	max-height: 80vh;
	min-height: 0;
}
.custom-modal-profile-row {
	display: flex;
	align-items: center;
	gap: 1em;
	margin-bottom: 0.5em;
}
.custom-modal-profile-row img {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid #e5e7eb;
}
.custom-modal-profile-row a {
	display: block;
	border-radius: 50%;
	background: linear-gradient(45deg, #e5ff00, #ff2a46, #ff14ef);
	padding: 2px;
}
.custom-modal-profile-row .custom-modal-profile-inner {
	background: #fff;
	border-radius: 50%;
	padding: 3px;
}
.custom-modal-profile-row .custom-modal-username {
	font-weight: bold;
	font-size: 1.1em;
}
.custom-modal-date {
	color: #71717a;
	font-size: 0.95em;
}
.custom-modal-description {
	color: #18181b;
	font-size: 0.9em;
	white-space: pre-line;
}
.custom-modal-hashtags {
	color: #2563eb;
	font-size: 1em;
	margin-top: 1em;
	word-break: break-all;
}
.custom-modal-products-wrap {
	margin-top: 2em;
	display: none;
	padding-bottom: 0.5em;
}
.custom-modal-products-slider {
    /* Figtree, Figtree Fallback; */
    font-family: "Figtree", "Figtree Fallback" !important;
	display: flex;
	gap: 1rem;
	transition: transform 0.3s ease;
	overflow-x: auto;
	overflow-y: visible;
	scrollbar-width: thin;
	scrollbar-color: #d1d5db #fff;
	padding-bottom: 0.5em;
}
.custom-modal-products-slider::-webkit-scrollbar {
	height: 8px;
}
.custom-modal-products-slider::-webkit-scrollbar-thumb {
	background: #d1d5db;
	border-radius: 4px;
}
.custom-modal-products-slider::-webkit-scrollbar-track {
	background: #fff;
}
.custom-modal-products-slider a {
	flex: 0 0 150px;
	max-width: 150px;
	min-width: 120px;
	display: flex;
	flex-direction: column;
	text-decoration: none;
	border-radius: 1rem;
	overflow: hidden;
	background: #fff;
	border: 1px solid #e5e7eb;
	/* box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.07); */
	transition: box-shadow 0.2s, border 0.2s;
}
.custom-modal-products-slider a:hover {
	box-shadow: 0 4px 16px 0 rgba(37, 99, 235, 0.1);
	border-color: #2563eb;
	text-decoration: none;
}
.custom-modal-products-slider img {
	width: 100%;
	height: auto;
	object-fit: cover;
	background: #f8f8f8;
	border-radius: 0;
	display: block;
}
.custom-modal-products-slider h3 {
	font-size: .9rem;
	font-weight: 400;
    color: #18181b;
	line-height: 1.3;
	margin: 0 0 0.5em 0;
	text-decoration: underline;
	text-decoration-color: transparent;
	transition: text-decoration-color 0.2s;
	display: -webkit-box;
	-webkit-line-clamp: 3;
    line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 3.6em;
	word-break: break-word;
	font-family: "Figtree", "Figtree Fallback", sans-serif;
}
.custom-modal-products-slider a:hover h3 {
	text-decoration-color: #18181b;
}
.custom-modal-products-slider .custom-modal-product-price {
	color: #181818;
	font-size: 1rem;
	margin: 0;
	margin-top: 0.5em;
	display: block;
}
.custom-modal-products-slider .custom-modal-product-info {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-start;
	padding: 0.75em 1em 1.2em 1em;
	flex: 1 1 auto;
}
.custom-modal-products-dots {
	display: flex;
	justify-content: center;
	gap: 0.2rem;
	margin-top: 0.5em;
}
.custom-modal-products-dots div {
	width: .5rem;
	height: .5rem;
	border-radius: 9990px;
	border: none;
	background: #dfdfdf;
	cursor: pointer;
	transition: background 0.3s, transform 0.2s;
	margin: 0 0.15em;
	outline: none;
}
.custom-modal-products-dots div.active {
	background: #5e5e5e;
}
