/* ============================================================
   Cuckold — post.css (feed, post-card, crear post) · depende de main.css
   ============================================================ */

.feed-wrap, .post-single-wrap { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; padding: 24px 16px 48px; }

/* Layout de 3 columnas (feed) */
.layout-3col { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 24px 16px 48px; display: grid; grid-template-columns: 240px minmax(0, 1fr) 290px; gap: 24px; align-items: start; }
.feed-col { min-width: 0; }
.sidebar-left, .sidebar-right { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 78px; }
.side-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--card-r); padding: 16px; }
.side-title { font-size: 13px; font-weight: 600; color: var(--text3); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 12px; }
.side-conducta { display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; color: var(--text3); font-size: 14px; font-weight: 600; text-decoration: none; transition: all .15s; margin-top: 12px; }
.side-conducta:hover { color: var(--amber); border-color: var(--amber); }

/* CTA de visitante (sidebar del feed) */
.visitor-cta { text-align: center; }
.vc-title { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.vc-text { font-size: 14px; color: var(--text3); line-height: 1.5; margin-bottom: 16px; }
.vc-btn { width: 100%; justify-content: center; }
.vc-login { display: block; margin-top: 10px; font-size: 14px; color: var(--accent2); }
.side-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.side-empty { font-size: 15px; color: var(--text3); line-height: 1.5; }

.mini-profile { display: flex; flex-direction: column; align-items: center; text-align: center; }
.mini-avatar { position: relative; width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), #ec4899); display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 600; color: #fff; text-decoration: none; margin-bottom: 10px; }
.mini-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.mini-name { font-size: 17px; font-weight: 700; color: var(--text); text-decoration: none; }
.mini-name:hover { color: var(--accent2); }
.mini-sub { font-size: 14px; color: var(--text3); margin-top: 3px; }
.mini-stats { display: flex; gap: 8px; margin-top: 14px; width: 100%; }
.mini-stats > div { flex: 1; text-align: center; }
.mini-stats .n { font-size: 16px; font-weight: 700; color: var(--text); }
.mini-stats .l { font-size: 12px; color: var(--text3); }

.side-menu { padding: 8px; }
.side-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--text2); text-decoration: none; font-size: 15px; font-weight: 500; transition: all .15s; }
.side-item:hover { background: var(--bg3); color: var(--text); text-decoration: none; }
.side-item.active { background: rgba(139,92,246,.15); color: var(--accent2); }

.suggest-row, .nb-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; }
.suggest-row + .suggest-row, .nb-row + .nb-row { border-top: 1px solid var(--border); }
.su-avatar, .nb-avatar { position: relative; width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; background: linear-gradient(135deg, var(--accent), #ec4899); display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; color: #fff; text-decoration: none; }
.su-avatar img, .nb-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.su-info, .nb-info { flex: 1; min-width: 0; }
.su-nameline, .nb-nameline { display: flex; align-items: center; gap: 6px; min-width: 0; }
.su-nameline .su-name, .nb-nameline .nb-name { min-width: 0; }
.su-nameline .badge, .nb-nameline .badge { flex-shrink: 0; }
.su-name, .nb-name { font-size: 15px; font-weight: 600; color: var(--text); text-decoration: none; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.su-name:hover, .nb-name:hover { color: var(--accent2); }
.su-sub, .nb-sub { font-size: 13px; color: var(--text3); }
.su-follow { background: rgba(139,92,246,.15); border: 1px solid rgba(139,92,246,.3); color: var(--accent2); font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 8px; cursor: pointer; font-family: var(--font); white-space: nowrap; }
.su-follow:hover { background: var(--accent); color: #fff; }
.su-follow.following { background: var(--bg3); color: var(--text2); border-color: var(--border); }

@media (max-width: 1080px) { .layout-3col { grid-template-columns: 240px minmax(0, 1fr); } .sidebar-right { display: none; } }
@media (max-width: 800px)  { .layout-3col { grid-template-columns: 1fr; } .sidebar-left { display: none; } }
.crear-wrap { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; padding: 24px 16px 48px; }

.feed-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.feed-title, .crear-title { font-size: 28px; font-weight: 700; color: var(--text); }
.feed-list { display: flex; flex-direction: column; gap: 20px; }

/* Post card */
.post-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--card-r); padding: 16px; transition: border-color .2s; }
.post-card:hover { border-color: rgba(139,92,246,.3); }

.post-head { display: flex; align-items: center; gap: 12px; margin-bottom: 0; }
.post-location { display: flex; align-items: center; gap: 5px; font-size: 15px; color: var(--text3); margin-top: 7px; }
.post-avatar {
  position: relative;
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), #ec4899);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 600; color: #fff; text-decoration: none;
}

/* (.online-dot vive en main.css para que también ande en el modal de mensajería) */
.post-user { flex: 1; min-width: 0; }
.post-nameline { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.post-username { font-size: 16px; font-weight: 600; color: var(--text); text-decoration: none; }
.post-username:hover { color: var(--accent2); }
.post-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14px; color: var(--text3); margin-top: 4px; margin-left: -10px; }
.dotsep { color: var(--text3); }
.post-vis { font-size: 13px; color: var(--text3); white-space: nowrap; }

/* Menú de opciones del autor */
.post-opts { position: relative; margin-left: 4px; }
.post-opts-btn { background: none; border: none; color: var(--text3); cursor: pointer; padding: 4px 6px; border-radius: 8px; display: inline-flex; align-items: center; }
.post-opts-btn:hover { background: var(--bg3); color: var(--text); }
.post-opts-menu { position: absolute; right: 0; top: 34px; min-width: 152px; background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 6px; display: none; z-index: 40; box-shadow: 0 12px 32px rgba(0,0,0,.45); }
.post-opts-menu.open { display: block; }
.post-opts-menu form { margin: 0; }
.post-opts-menu a, .post-opts-menu button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: none; border: none; color: var(--text2); font-family: var(--font); font-size: 15px; padding: 9px 10px; border-radius: 7px; cursor: pointer; text-decoration: none; }
.post-opts-menu a:hover, .post-opts-menu button:hover { background: var(--bg3); color: var(--text); }
.post-opts-menu .danger { color: var(--red); }
.post-opts-menu .danger:hover { background: rgba(244,63,94,.1); color: var(--red); }

.post-title-link { display: block; text-decoration: none; margin-top: 12px; }
.post-title { font-size: 20px; font-weight: 700; color: var(--text); line-height: 1.35; margin-bottom: 8px; }
.post-title-link:hover .post-title { color: var(--accent2); }
.post-text { font-size: 16px; color: var(--text2); line-height: 1.65; margin-bottom: 12px; }

/* Media grid */
.post-media { display: grid; gap: 3px; border-radius: 12px; overflow: hidden; margin-bottom: 12px; }
.post-media.count-1 { grid-template-columns: 1fr; }
.post-media.count-2, .post-media.count-4 { grid-template-columns: 1fr 1fr; }
.post-media.count-3 { grid-template-columns: 1fr 1fr; }
.post-media.count-3 .post-photo:first-child { grid-column: 1 / -1; }
.post-photo { position: relative; aspect-ratio: 4 / 3; background: var(--bg3); overflow: hidden; }
.post-media.count-1 .post-photo { aspect-ratio: 16 / 10; }
.post-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-photo:not(.locked) img { cursor: zoom-in; }
.post-photo.locked img { filter: brightness(.8); }
.post-lock {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(13,13,18,.45); color: #fff; font-size: 14px; font-weight: 600; text-align: center; padding: 8px;
}
.post-more {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.55); color: #fff; font-size: 26px; font-weight: 700;
}

.post-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }

.post-actions { display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--border); padding-top: 10px; }
.post-act {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; color: var(--text2);
  font-family: var(--font); font-size: 15px; padding: 6px 12px; border-radius: 8px;
  cursor: pointer; text-decoration: none; transition: all .15s;
}
.post-act:hover:not([disabled]) { background: var(--bg3); color: var(--text); }
.post-act[disabled] { opacity: .55; cursor: default; }

/* Estado vacío genérico */
.empty-state { background: var(--bg2); border: 1px solid var(--border); border-radius: 16px; padding: 48px 24px; text-align: center; color: var(--text3); font-size: 16px; }
.empty-icon { font-size: 42px; margin-bottom: 12px; }

/* File input */
.crear-wrap input[type="file"] { color: var(--text2); font-size: 15px; }
.crear-wrap input[type="file"]::file-selector-button {
  background: var(--bg4); border: 1px solid var(--border); color: var(--text2);
  font-family: var(--font); font-size: 14px; padding: 8px 14px; border-radius: 8px; cursor: pointer; margin-right: 12px;
}

/* Estados de like / guardado */
.post-act.liked { color: var(--red); }
.post-act.saved { color: var(--accent2); }

/* Comentarios */
.comments { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--card-r); margin-top: 20px; }
.comments-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.comments-title { font-size: 16px; font-weight: 600; color: var(--text); }
.comments-count { font-size: 15px; color: var(--text3); }
.comment-write { display: flex; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); align-items: flex-start; }
.comment-write textarea, .reply-form textarea {
  flex: 1; background: var(--bg3); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 14px; color: var(--text); font-family: var(--font); font-size: 15px; resize: vertical; outline: none; min-height: 42px;
}
.comment-write textarea:focus, .reply-form textarea:focus { border-color: var(--accent); }
.btn-comment { background: var(--accent); border: none; color: #fff; font-family: var(--font); font-size: 15px; font-weight: 600; padding: 11px 18px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.btn-comment:hover { background: #7c3aed; }
.btn-comment.sm { padding: 8px 14px; font-size: 14px; }
.comment-login { padding: 16px 20px; color: var(--text3); font-size: 15px; border-bottom: 1px solid var(--border); }
.comment-login a { font-weight: 600; }
.comment-list { padding: 6px 20px 14px; }
.comment-empty { padding: 22px 0; color: var(--text3); font-size: 15px; text-align: center; }
.comment { display: flex; gap: 10px; padding: 12px 0; }
.c-avatar { position: relative; width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; background: linear-gradient(135deg, var(--accent), #ec4899); display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 600; color: #fff; text-decoration: none; }
.c-avatar.sm { width: 30px; height: 30px; font-size: 13px; }
.post-avatar img, .c-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.c-body { flex: 1; min-width: 0; }
.c-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 3px; }
.c-name { font-size: 15px; font-weight: 600; color: var(--text); text-decoration: none; }
.c-name:hover { color: var(--accent2); }
.c-time { font-size: 13px; color: var(--text3); }
.c-text { font-size: 15px; color: var(--text2); line-height: 1.55; word-wrap: break-word; }
.c-actions { margin-top: 5px; }
.c-reply { background: none; border: none; color: var(--text3); font-family: var(--font); font-size: 13px; font-weight: 500; cursor: pointer; padding: 0; }
.c-reply:hover { color: var(--accent2); }
.reply-form { gap: 8px; margin-top: 8px; align-items: flex-start; }
.comment.reply { margin-top: 10px; padding: 10px 0 0; border-top: 1px solid var(--border); }
