/* Image Viewer Popup Styles */

.image_viewer_container {
  display: flex;
  height: 100vh;
  width: 100vw;
  background: rgba(0, 0, 0, 0.95);
  position: relative;
}

/* Close button */
.iv_close_btn {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 1000;
  background: rgb(0, 0, 0, 1);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: background 0.2s;
}


.iv_close_btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.iv_close_btn i {
  font-size: 24px;
  color: white;
}

/* Main section with image */
.iv_main_section {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 60px 20px 80px;
}

.iv_image_container {
  max-width: 90%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
    overflow:hidden;
}

.iv_image_container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

/* Navigation buttons */
.iv_nav_btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 100;
}

.iv_nav_btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.iv_nav_btn i {
  font-size: 24px;
  color: white;
}

.iv_prev_btn {
  left: 20px;
}

.iv_next_btn {
  right: 20px;
}

/* Image actions at bottom */
.iv_image_actions {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 20px;
  background: rgba(0, 0, 0, 0.5);
  padding: 12px 24px;
  border-radius: 24px;
  backdrop-filter: blur(10px);
}

.iv_action_btn {
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  transition: opacity 0.2s;
}

.iv_action_btn:hover {
  opacity: 0.8;
}

.iv_action_btn i {
  font-size: 20px;
}

/* Expand button */
.iv_expand_btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  width: 32px;
  height: 64px;
  border-radius: 8px 0 0 8px;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 100;
}

.iv_expand_btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.iv_expand_btn i {
  color: white;
  font-size: 20px;
}

/* Sidebar */
.iv_sidebar {
  width: 400px;
  background: var(--background-secondary, #1a1a1a);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.3s, transform 0.3s;
}

.iv_sidebar.iv_sidebar_collapsed {
  width: 0;
  transform: translateX(400px);
}

.iv_sidebar_content {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  padding: 20px;
}

/* Post header in sidebar */
.iv_post_header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.iv_more_btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.iv_more_btn i {
  font-size: 20px;
  color: var(--text-secondary, #888);
}

/* Post content */
.iv_post_content {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.iv_post_content p {
  margin: 0;
  line-height: 1.5;
  color: var(--text-primary, #fff);
}

/* Image counter */
.iv_image_counter {
  text-align: center;
  color: var(--text-secondary, #888);
  font-size: 14px;
  margin-bottom: 20px;
}

/* Comments section */
.iv_comments_section {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.iv_comments_header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.iv_comments_header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.iv_comments_count {
  color: var(--text-secondary, #888);
  font-size: 14px;
}

.iv_comments_list {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 16px;
}

/* Individual comment */
.iv_comment {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.iv_comment .prof_img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.iv_comment .prof_img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.iv_comment_content {
  flex: 1;
}

.iv_comment_header {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 4px;
}

.iv_comment_author {
  font-weight: 600;
  font-size: 14px;
}

.iv_comment_time {
  color: var(--text-secondary, #888);
  font-size: 12px;
}

.iv_comment_text {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

/* Add comment */
.iv_add_comment {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: auto;
}

.iv_add_comment .prof_img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.iv_add_comment .prof_img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.iv_comment_input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 8px 16px;
  color: var(--text-primary, #fff);
  font-size: 14px;
}

.iv_comment_input::placeholder {
  color: var(--text-secondary, #888);
}

.iv_comment_submit {
  background: transparent;
  border: none;
  color: var(--primary-color, #007bff);
  cursor: pointer;
  padding: 4px;
}

.iv_comment_submit i {
  font-size: 20px;
}



.post_image_clickable {
  cursor: pointer;
  transition: opacity 0.2s;
}

.post_image_clickable:hover {
  opacity: 0.9;
}

/* Responsive */
@media (max-width: 768px) {
  .iv_sidebar {
    width: 100%;
    position: absolute;
    bottom: 0;
    height: 50%;
    border-radius: 16px 16px 0 0;
  }
  
  .iv_main_section {
    padding: 60px 10px 50%;
  }
  
  .iv_expand_btn {
    display: none;
  }
}
