/* =====================================================
   POST DETAIL - Vista de detalle de posts (estilo Android)
   ===================================================== */

#view-post {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

#view-post .feed-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  flex-shrink: 0;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  width: 100%;
  max-width: none;
}

@media (min-width: 768px) {
  #view-post .feed-header {
    width: 600px;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
  }
}

.post-detail-header-inner {
  width: 100%;
  max-width: 600px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto;
}

.post-detail-header-inner .feed-username {
  flex: 1;
  text-align: center;
}

.post-detail-feed {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  padding-top: 62px; /* Aumentado para dejar espacio al header fijo */
  -ms-overflow-style: none;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  will-change: transform;
  contain: layout style paint;
}

.post-detail-feed::-webkit-scrollbar {
  display: none;
}

.post-detail-feed-item {
  background: #fff;
  border-bottom: 8px solid #f5f5f5;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 600px;
  will-change: auto;
}

.post-detail-feed-item .post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  flex-shrink: 0;
}

.post-detail-menu-btn {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 6px 8px;
  line-height: 1;
}

.post-detail-options-menu {
  position: absolute;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 110;
  min-width: 160px;
  overflow: hidden;
}

.post-detail-menu-item {
  width: 100%;
  padding: 12px 14px;
  text-align: left;
  background: #fff;
  border: none;
  cursor: pointer;
  font-size: 14px;
}

.post-detail-menu-item:hover {
  background: #f6f6f6;
}

.post-detail-menu-item.danger {
  color: #d32f2f;
}

.post-detail-feed-item .post-media {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: #f0f0f0;
  position: relative;
  flex-shrink: 0;
}

.post-detail-feed-item .post-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-detail-feed-item .post-caption {
  padding: 12px 16px;
  font-size: 14px;
  color: #000;
  line-height: 1.4;
  flex-shrink: 0;
}

.post-detail-feed-item .post-actions {
  padding: 8px 16px 12px 16px;
  font-size: 14px;
  color: #666;
  flex-shrink: 0;
}

/* Desktop: scroll normal sin snap */
@media (min-width: 768px) {
  .post-detail-feed {
    scroll-snap-type: none;
  }
  
  .post-detail-feed-item {
    scroll-snap-align: none;
    scroll-snap-stop: normal;
    min-height: auto;
  }
}
