
.elfsight-instafeed {
    font-family: "Helvetica Neue", Arial, sans-serif;
	margin: 0;
    padding: 10px 5px;
}

.elfsight-header {
	display:flex; 
	justify-content:center;
	align-items:center;
	margin:0 0 12px 0; 
}

.elfsight-title { font-size:28px; font-weight:700; color:#5a4a37;font-family: "Unna", serif !important; }
.elfsight-follow { font-size:13px; color:#fff; background:#0095f6; padding:8px 12px; border-radius:6px; text-decoration:none; box-shadow:0 2px 6px rgba(0,0,0,.12); }
.elfsight-follow:hover { opacity:.95; }

/* Carousel wrapper */
.elfsight-carousel { display:flex; align-items:center; gap:8px; position:relative; }
.elfsight-prev, .elfsight-next {
	/* border:1px solid #e6e6e6; */
	border:none;
	border-radius:6px;
	padding:8px 10px; cursor:pointer; font-size:16px;
	box-shadow:0 1px 4px rgba(0,0,0,0.06);
	z-index: 100;
	position:absolute;
	background: rgba(17, 17, 17, 0.5);
	border-radius: 50%;
	color: white;
	width: 60px;
    height: 60px;
}

.elfsight-prev .eapps-icon{
	right: 12px;	
}

.eapps-icon {
    width: 12px;
    height: 16px;
    fill: #fff;
    display: block;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.elfsight-prev{
	left: 0;
    transform: translate3d(-50%, 0, 0);
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
}

.elfsight-next{
	right: 0; 
	transform: translate3d(50%, 0, 0);
    box-shadow: -2px 0 5px rgba(0,0,0,0.3);
}

.elfsight-next .eapps-icon{
	left: 12px;	
}

.elfsight-prev:disabled, .elfsight-next:disabled { opacity:0.4; cursor:default; }

/* Track wrap overflow */
.elfsight-track-wrap { overflow:visible; width:100%; }
/* .elfsight-track { display:flex; gap:12px; transition:transform .35s cubic-bezier(.2,.9,.2,1); } */

.elfsight-track {
  display: flex;
  gap: 12px;
  transition: transform .35s cubic-bezier(.2,.9,.2,1);
  /* добавить */
  width: max-content; /* чтобы flex не сжимал слайды */
}

.elfsight-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
  /* убрать min-width */
  width: auto; 
  flex: 0 0 auto; /* важно для Swiper */
}


/* Items */
.elfsight-item { position:relative; display:block; overflow:hidden; border-radius:10px; text-decoration:none; color:inherit; background:#f6f6f6; }
.elfsight-item {
  flex: 0 0 auto; /* чтобы Swiper правильно считал ширину слайда */
}

.elfsight-media-wrap { display:block; width:100%; height:0; padding-bottom:100%; position:relative; }
.elfsight-media-wrap img, .elfsight-media-wrap video { position:absolute; top:0; left:0; width:100%; height:100%; object-fit:cover; }

/* Overlay */
.elfsight-overlay { position:absolute; inset:0; display:flex; flex-direction:column; justify-content:flex-end; padding:8px; background:linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.45) 100%); opacity:0; transition:opacity .18s ease; }
.elfsight-item:hover .elfsight-overlay, .elfsight-item:focus .elfsight-overlay { opacity:1; }

/* Caption and play */
.elfsight-caption { color:#fff; font-size:13px; line-height:1.2; max-height:4.2em; overflow:hidden; text-overflow:ellipsis; }
.elfsight-play { color:#fff; font-size:22px; position:absolute; left:8px; top:8px; }


.elfsight-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%; /* убираем min-width */
  box-sizing: border-box;
}


.insta-modal.hidden { display: none; }

.insta-modal-content {
  background: #ffffff00;
  /* padding: 20px; */
  max-width: 90%;
  max-height: 90%;
  overflow: auto;
  border-radius: 10px;
  position: relative;
}

.insta-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  cursor: pointer;
}

/* Modal caption/comments */
.insta-modal .insta-caption { font-size:15px; color:#222; margin:10px 0; white-space:pre-wrap; }
.insta-modal .insta-comments {
	border-top:1px solid #eee; 
	padding-top:10px; 
	/* max-height:200px;  */
	overflow:auto; 
}
.insta-modal .insta-comment { padding:8px 0; border-bottom:1px dashed #f0f0f0; }
.insta-modal .insta-comment .cuser { font-weight:700; margin-right:8px; color:#111; }
.insta-modal .insta-comment .ctext { color:#333; font-size:14px; }


.mySwiper { overflow: hidden; width: 100%; }
.swiper-slide { display: flex; flex-direction: column; gap: 12px; }


.mySwiper {
  overflow: visible; /* должно быть скрытым только у wrapper, не у контейнера слайдов */
}
.swiper-wrapper {
  display: flex;
  transition: transform 0.3s;
  /* width: auto;  */
}
.swiper-slide {
  flex-shrink: 0;
}


.insta-modal.hidden { display: none; }

.insta-modal-dialog {
  background: #fff;
  max-width: 900px;
  width: 90%;
  max-height: 90%;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.insta-close {
  position: absolute;
  top: 10px; right: 15px;
  font-size: 28px;
  color: #333;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10;
}

.insta-modal-content {
  display: flex;
  flex-direction: row;
  height: 100%;
}

.insta-modal-media {
  flex: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.insta-modal-media img,
.insta-modal-media video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.insta-modal-side {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
}

.insta-caption {
  margin-bottom: 15px;
  font-size: 14px;
  line-height: 1.4;
}

.insta-comments {
  font-size: 13px;
  border-top: 1px solid #eee;
  padding-top: 10px;
}

.insta-comment {
  margin-bottom: 8px;
}

.insta-meta {
  display: flex;
  justify-content: space-between;
  margin: 10px 0;
  font-size: 13px;
  color: #888;
}

.insta-likes {
  color: #e74c3c;
  font-weight: bold;
}

.insta-date {
  font-style: italic;
}



/* скрыто по умолчанию */
.insta-modal.hidden {
  display: none;
}

/* основное окно */
.insta-modal-content {
	background: #ffffff00;
	max-width: 90%;
	max-height: 90%;
	width: 1000px;
	border-radius: 10px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	position: relative;
}

/* крестик */
.insta-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  color: #282d33;
  cursor: pointer;
  z-index: 10000;
}

/* внутренняя структура */
.insta-modal-inner {
  display: flex;
  height: 100%;
}

/* левая часть — фото/видео */
.insta-media {
  flex: 2;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.insta-media img,
.insta-media video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* правая часть — текст */
.insta-side {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.insta-caption {
  margin-bottom: 15px;
  font-size: 14px;
  color: #333;
}

.insta-comments {
  font-size: 13px;
  color: #555;
}

.insta-comment {
  margin-bottom: 8px;
}

.insta-comment b {
  color: #000;
}






.insta-comments {
  margin-top: 10px;
  font-size: 13px;
}

.insta-comment {
  display: flex;
  align-items: flex-start;
  margin-bottom: 8px;
}

.comment-avatar {
  width: 28px !important;
  height: 28px !important;
  border-radius: 50% !important;
  margin-right: 8px !important;
  flex-shrink: 0 !important;
}

.comment-body {
  /* display: flex; */
  /* flex-direction: column; */
}

.comment-username {
  font-weight: bold;
  margin-right: 4px;
}

.comment-text {
  margin-top: 2px;
}

.comment-time {
  font-size: 11px;
  color: #888;
  margin-top: 2px;
}


/* Блок поста: фото слева, комменты справа */
.post {
    display: flex;
    flex-direction: row;
    gap: 20px;
    padding: 20px;
}

/* Фото */
.post img {
    max-width: 450px;
    width: 100%;
    height: auto;
    border-radius: 6px;
    border: 1px solid #eee;
    object-fit: cover;
}

/* Правая колонка с комментариями */
.comments {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 450px;
    overflow-y: auto;
    padding-right: 10px;
}

/* Один комментарий */
.comment {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    padding: 8px;
    border-bottom: 1px solid #eee;
}

.comment:last-child {
    border-bottom: none;
}

/* Аватар */
.comment img.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #ddd;
    object-fit: cover;
}

/* Текст комментария */
.comment-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.comment-username {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 3px;
    color: #262626;
}

.comment-text {
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
}

.comment-time {
    font-size: 12px;
    color: #999;
}


/* Контейнер модалки */
#insta-modal-body {
  display: flex;
  flex-direction: row;
  max-width: 90vw;
  max-height: 90vh;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}

/* Левая часть (медиа) */
.insta-modal-media {
     flex: 1 1 40%;
    display: contents;
    align-items: center;
    background: #000;
}
.insta-modal-media img,
.insta-modal-media video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Правая часть (caption + лайки + комменты) */
.insta-modal-side {
  flex: 1 1 40%;
  display: flex;
  flex-direction: column;
  padding: 15px;
  overflow-y: auto;
  background: #fafafa;
}

/* caption */
.insta-caption {
  margin-bottom: 10px;
  font-size: 14px;
}

/* блок лайков и даты */
.insta-meta {
  font-size: 12px;
  color: #777;
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
}

/* комментарии */
.insta-comments {
  /* margin-top: auto; */
}
.insta-comment {
  display: flex;
  align-items: flex-start;
  margin-bottom: 12px;
}
.insta-comment img.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin-right: 10px;
}
.comment-content {
  font-size: 13px;
}
.comment-username {
  font-weight: bold;
}
.comment-time {
  font-size: 11px;
  color: #888;
}





/* Оверлей поверх фото */
.elfsight-item {
  position: relative;
  display: block;
  overflow: hidden;
}

.elfsight-item img {
  display: block;
  width: 100%;
  height: auto;
}

/* Затемнение */
.elfsight-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 10px;
  transition: opacity 0.3s ease;
}

.elfsight-item:hover .elfsight-overlay {
  opacity: 1;
}

/* Лайки и комменты */
.elfsight-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: bold;
}

.elfsight-stats span {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Подпись */
.elfsight-caption {
  font-size: 14px;
  line-height: 1.4;
  max-height: 4.5em; /* 3 строки */
  overflow: hidden;
  text-overflow: ellipsis;
}




/* Общая модалка */
#insta-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#insta-modal.hidden {
  display: none;
}

.insta-modal-content {
  background: #000;
  display: flex;
  flex-direction: column;
  width: 90%;
  max-width: 900px;
  border-radius: 10px;
  overflow: hidden;
}

/* Шапка */
.insta-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #111;
  color: #fff;
  padding: 10px 15px;
  font-size: 14px;
}

.insta-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.insta-header-left img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.insta-header-left a {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.insta-header-right a {
  color: #999;
  font-size: 13px;
  text-decoration: none;
}

.insta-header-right a:hover {
  text-decoration: underline;
}

/* Медиа */
.insta-modal-media {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #000;
  max-height: 80vh;
}

.insta-modal-media img,
.insta-modal-media video {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

/* Кнопка закрытия */
.insta-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 24px;
  color: #fff;
  cursor: pointer;
}



/* Содержимое */
.insta-modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  max-width: 900px;
  /* width: 90%; */
  max-height: 99%;
  color: #fff;
}

/* Шапка */
.insta-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #f8f5f0;
  border-bottom: 1px solid #222;
}

.insta-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.insta-header-left img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.insta-header-left a {
  color: #5a4a37;
  font-weight: 400;
  text-decoration: none;
  font-size: larger;
}

.insta-header-left a:hover {
  text-decoration: underline;
}

.insta-header-right a {
  color: #aaa;
  font-size: 14px;
  text-decoration: none;
	right: 40px;
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.insta-header-right a:hover {
  color: #fff;
}

/* Блок с медиа */
.insta-modal-media {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #000;
  max-height: calc(99vh - 50px); /* уменьшаем на высоту шапки */
}

.insta-modal-media img,
.insta-modal-media video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Слайдер внутри модалки */
.insta-album-swiper {
  width: 100%;
  height: 100%;
}

.insta-album-swiper img,
.insta-album-swiper video {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
}

.insta-album-swiper .swiper-button-next,
.insta-album-swiper .swiper-button-prev {
  color: #fff;
}

/* Кнопка закрытия */
.insta-close {
  position: absolute;
  top: 4px;
  right: 8px;
  font-size: 26px;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10;
}

/* --- Мобильная версия --- */
@media (max-width: 768px) {
  .insta-modal-content {
    width: 100%;
    height: 100%;
    border-radius: 0;
    max-width: none;
    max-height: none;
  }

  .insta-modal-media {
    max-height: calc(100vh - 50px);
  }
}



.insta-avatar {
  display: inline-block;
  padding: 2px; /* толщина градиентной обводки */
  border-radius: 50%;
  background: linear-gradient(40deg, #f99b4a 15%, #dd3071 50%, #c72e8d 85%);
}

.insta-avatar img {
  display: block;
  border-radius: 50%;
  background: #fff; /* фон под фото, чтобы градиент не налез */
}



.insta-profile {
  display: flex;
  align-items: center; /* центровка по вертикали */
  gap: 8px; /* расстояние между аватаром и текстом */
  text-decoration: none; /* убрать подчёркивание */
  color: inherit; /* оставить цвет как у родителя */
}

.insta-avatar img {
  display: block;
  width: 40px;  /* или нужный размер */
  height: 40px;
  border-radius: 50%; /* кружок */
}


.insta-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #000; /* ← чёрный цвет */
  padding: 5px;
  display: flex;
  align-items: center;
}

.insta-header-right {
  display: flex;
  align-items: center;
  gap: 10px; /* расстояние между ссылкой и крестиком */
  /* min-width: 60px; */
    /* height: 44px; */
}

.insta-post-btn {
  text-decoration: none;
  color: #000;
  font-weight: 500;
}


.insta-post-link,
.insta-post-link svg,
.insta-post-link svg path {
  pointer-events: auto;
}


.insta-album-swiper {
  display: flex;
  align-items: center;   /* выравнивание по вертикали */
  justify-content: center;
  height: 100%;          /* контейнер на всю высоту модалки */
}

.insta-album-swiper .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
}

.insta-album-swiper img,
.insta-album-swiper video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;   /* сохраняем пропорции */
}

