/* Gönderi kartları ve sekmeler (ana sayfa akışı ve profil ortak kullanır) */

/* Sekmeler */
.tabs {
    display: flex;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.tabs button {
    flex: 1;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: #d1c7be;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 10px 0 12px;
    cursor: pointer;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    transition: color 0.2s;
}

.tabs button:hover {
    color: #ffffff;
}

.tabs button[aria-selected="true"] {
    color: #ffffff;
    border-bottom-color: #deb878;
}

.tabs button:focus-visible {
    outline: none;
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.06);
}

/* Telefonda üç sekme ("En yeni · Takip · En çok beğenilen") satıra sığsın */
@media (max-width: 480px) {
    .tabs button {
        padding-left: 4px;
        padding-right: 4px;
        font-size: 0.86rem;
        white-space: nowrap;
    }
}

/* Gönderiler: sütunda ince çizgilerle ayrılan satırlar */
.feed {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.post {
    display: flex;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: background-color 0.2s;
}

.post:hover {
    background-color: rgba(255, 255, 255, 0.025);
}

.post-avatar {
    flex-shrink: 0;
    border-radius: 50%;
    align-self: flex-start;
}

.post-main {
    flex: 1;
    min-width: 0;
}

.post-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 6px;
    font-size: 0.9rem;
    color: var(--muted);
}

.post-name {
    color: #ffffff;
    font-weight: 600;
    font-size: 0.97rem;
    text-decoration: none;
    overflow-wrap: anywhere;
}

a.post-name:hover {
    text-decoration: underline;
}

/* Şikayet et: başlığın sağında, üzerine gelince belirginleşen küçük bayrak */
.post-report {
    display: inline-flex;
    align-self: center;
    margin-left: auto;
    padding: 4px;
    border: none;
    border-radius: 50%;
    background: none;
    color: var(--muted);
    opacity: 0.55;
    cursor: pointer;
    transition: opacity 0.2s, color 0.2s, background-color 0.2s;
}

.post-report:hover,
.post-report:focus-visible {
    opacity: 1;
    color: #f0a59a;
    background-color: rgba(255, 255, 255, 0.06);
    outline: none;
}

.post-report svg {
    width: 16px;
    height: 16px;
}

.post-text {
    margin-top: 2px;
    font-size: 1rem;
    color: #f0ece9;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

/* Kitap kartı: yazının altında, kapak solda */
.post-book {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    padding: 8px 14px 8px 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--muted);
    font-size: 0.82rem;
    text-decoration: none;
    transition: background-color 0.2s, border-color 0.2s;
}

.post-book:hover {
    background-color: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.18);
}

.post-book:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(209, 199, 190, 0.5);
}

.post-book img,
.post-book .no-cover {
    width: 34px;
    height: 51px;
    border-radius: 2px 3px 3px 2px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, #5a3e2e, #2a1c15);
}

.post-book-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow-wrap: anywhere;
}

.post-book-title {
    font-family: 'Playfair Display', serif;
    color: #ffffff;
    font-size: 1rem;
    line-height: 1.3;
}

/* Beğen / cevap / yeniden paylaş düğmeleri; sağda takip ettiklerinin repostları */
.post-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.post-buttons {
    display: flex;
    flex: 1 1 auto;
    justify-content: space-between;
    max-width: 300px;
}

.act {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--muted);
    font: inherit;
    font-size: 0.88rem;
    cursor: pointer;
    padding: 4px 6px 4px 0;
    border-radius: 16px;
    transition: color 0.2s;
}

.act svg {
    width: 19px;
    height: 19px;
    transition: transform 0.2s;
}

.act:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(209, 199, 190, 0.5);
}

/* Beğen: kalp; beğenilince içi dolar */
.act.like:hover,
.act.like[aria-pressed="true"] {
    color: #f2738a;
}

.act.like[aria-pressed="true"] svg path {
    fill: currentColor;
}

.act.like.pop svg {
    transform: scale(1.3);
}

/* Takip ettiklerinin bu yazıyı yeniden paylaştığı: düğmelerin sağında küçük avatarlar + "ali paylaştı" */
.followed-reposts {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    margin-left: auto;
    padding: 3px 10px 3px 4px;
    border-radius: 14px;
    background-color: rgba(143, 209, 165, 0.1);
    color: #8fd1a5;
    font-size: 0.78rem;
    font-weight: 500;
    text-decoration: none;
}

a.followed-reposts:hover {
    background-color: rgba(143, 209, 165, 0.18);
}

a.followed-reposts:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(143, 209, 165, 0.5);
}

.followed-reposts .faces {
    display: inline-flex;
    flex-shrink: 0;
}

.followed-reposts .faces .avatar {
    box-shadow: 0 0 0 2px #1d1915;
}

.followed-reposts .faces .avatar + .avatar {
    margin-left: -7px;
}

.followed-reposts .who {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.followed-reposts svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

@media (max-width: 420px) {
    .followed-reposts .who-verb {
        display: none;
    }
}

.act.reply:hover,
.act.reply[aria-expanded="true"] {
    color: #8fc3e8;
}

.act.repost:hover,
.act.repost[aria-pressed="true"] {
    color: #8fd1a5;
}

.act.repost.pop svg {
    transform: rotate(180deg);
}

/* "↻ irem yeniden paylaştı" */
.repost-label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--muted);
}

/* Repost kartında avatar "yeniden paylaştı" satırının değil, adın hizasında başlar (X'teki gibi) */
.post.is-repost > :first-child {
    margin-top: 26px;
}

.repost-label svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.repost-label a {
    color: inherit;
    text-decoration: none;
}

.repost-label a:hover {
    text-decoration: underline;
}

/* Cevaplar */
.replies {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.reply-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reply {
    display: flex;
    gap: 10px;
}

.reply-main {
    flex: 1;
    min-width: 0;
    font-size: 0.92rem;
}

.reply-text {
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.reply-delete {
    background: none;
    border: none;
    color: var(--muted);
    font: inherit;
    font-size: 0.78rem;
    text-decoration: underline;
    cursor: pointer;
    margin-left: auto;
}

.reply-delete:hover {
    color: #f0a59a;
}

.reply-form {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    align-items: flex-start;
}

.reply-form textarea {
    flex: 1;
    min-height: 40px;
    max-height: 160px;
    resize: vertical;
    background-color: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    padding: 9px 12px;
    color: #ffffff;
    font: inherit;
    font-size: 0.92rem;
}

.reply-form textarea:focus-visible {
    outline: none;
    border-color: #d1c7be;
}

.reply-login {
    margin-top: 10px;
    font-size: 0.88rem;
    color: #d1c7be;
}

.link-btn {
    background: none;
    border: none;
    padding: 0;
    color: #deb878;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.feed-status {
    text-align: center;
    color: #d1c7be;
    padding: 22px 0;
    font-size: 0.9rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.feed-status:empty {
    display: none;
}

.empty {
    padding: 40px 24px;
    text-align: center;
    color: #d1c7be;
}

.empty a {
    color: #deb878;
}

/* Kısa bildirim */
.toast {
    position: fixed;
    left: 50%;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 50;
    max-width: calc(100vw - 32px);
    background-color: #2b221d;
    color: #f0ece9;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 0.9rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

@media (prefers-reduced-motion: reduce) {
    .act svg {
        transition: none;
    }
}
