/* =========================
   PROFILE
   ========================= */

.profile {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profile-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-header h2 {
    margin: 0;
    color: var(--accent);
}

.profile-header p {
    margin: 0;
    color: var(--muted);
}

/* =========================
   POSTS SECTION
   ========================= */

.profile-posts {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.profile-posts h3 {
    margin: 0;
}

/* =========================
   EMPTY STATE
   ========================= */

.empty-state {
    text-align: center;
}

.empty-state p {
    margin-bottom: 16px;
}

/* =========================
   POST CARD
   ========================= */
/* POST */

.post-card {
    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: var(--radius-lg);

    padding: 20px;

    display: flex;
    flex-direction: column;
    gap: 12px;
}

.post-header {
    display: flex;
    align-items: center;
}

.post-author {
    text-decoration: none;
    font-weight: 700;
}

.post-title {
    margin: 0;
}

.post-link {
    word-break: break-all;
}

.post-content {
    line-height: 1.6;
    overflow-wrap: break-word;
}

.post-delete {
    position: absolute;
    top: 10px;
    right: 10px;
}
.post-delete button {
    background: transparent;
    border: none;
    color: #ff4d4d;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
}

.post-delete button:hover {
    background: rgba(255, 77, 77, 0.15);
}

.post-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    border-radius: 12px;
}
/* =========================
   FEED
   ========================= */

.feed {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feed-sort {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.feed-sort a {
    padding: 8px 14px;
    border-radius: 999px;

    border: 1px solid rgba(128,128,128,.25);

    text-decoration: none;
    font-size: 0.9rem;

    transition: .2s;
}

.feed-sort a:hover {
    opacity: .8;
}

.feed-sort a.active {
    border-color: currentColor;
    font-weight: 600;
}
.post-action.edit-action {
  display: inline-flex;
  width: auto;
  max-width: max-content;
  flex: 0 0 auto;
  justify-content: center;
  align-items: center;
  text-align: center;
}

@media (max-width: 768px) {
  .post-action.edit-action {
    display: flex;
    width: 100%;
    max-width: none;
    flex: 1 1 100%;
    box-sizing: border-box;
    justify-content: center;
    align-items: center;
    text-align: center;
  }
}
