/* =========================================
   Arquivo: filex/css/meus-posts.css
   XONA — MEUS POSTS
   Requer main.css carregado antes.
   ========================================= */

/* =========================================
   BODY — sem sidebar direita
   ========================================= */
body.posts-body .main-content {
    margin-right: 0 !important;
    max-width: none !important;
}

.posts-page {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 24px;
    margin-top: 2%;
}

/* =========================================
   TÍTULO + PESQUISA
   ========================================= */
.posts-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.posts-title-block h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}
.posts-title-block p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}
.posts-search { min-width: 280px; }

/* =========================================
   TABS
   ========================================= */
.posts-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: #30363d transparent;
}
.posts-tabs::-webkit-scrollbar { height: 4px; }
.posts-tabs::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 999px;
}

.post-tab {
    flex-shrink: 0;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    padding: 9px 18px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.post-tab:hover {
    border-color: var(--accent-pink);
    color: var(--accent-pink);
}
.post-tab.active {
    background-color: var(--accent-pink);
    border-color: var(--accent-pink);
    color: #fff;
}

/* =========================================
   CONTADOR
   ========================================= */
.posts-counter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 6px 14px;
    align-self: flex-start;
}
.posts-count-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}
.posts-count {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-pink);
}

/* =========================================
   TABELA (DESKTOP)
   ========================================= */
.posts-table-wrapper {
    width: 100%;
    max-width: 100%;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-sizing: border-box;
}

.posts-table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 13.5px;
}

.posts-table col.col-post         { width: 38%; }
.posts-table col.col-tipo         { width: 14%; }
.posts-table col.col-preco        { width: 14%; }
.posts-table col.col-interacoes   { width: 18%; }
.posts-table col.col-data         { width: 16%; }

.posts-table thead { background-color: var(--bg-dark); }

.posts-table th {
    text-align: left;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.posts-table td {
    padding: 14px 18px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
}

.posts-table tbody tr:last-child td { border-bottom: none; }

.post-row {
    cursor: pointer;
    transition: background-color 0.15s;
}
.post-row:hover { background-color: var(--bg-dark); }

.posts-table th.right,
.posts-table td.right {
    text-align: right;
    overflow: visible;
}

/* =========================================
   CÉLULA — POST
   ========================================= */
.post-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.post-thumb-wrapper {
    position: relative;
    flex-shrink: 0;
}
.post-thumb {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid var(--border-color);
    background-color: var(--bg-dark);
    display: block;
}
.post-type-mini {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--accent-pink);
    color: #fff;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-card);
}
.post-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* =========================================
   BADGE DE TIPO
   ========================================= */
.post-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
    border: 1px solid transparent;
}
.post-type-badge i { font-size: 10px; }

.post-type-badge.type-image {
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.25);
}
.post-type-badge.type-video {
    background-color: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
    border-color: rgba(139, 92, 246, 0.25);
}
.post-type-badge.type-audio {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.25);
}

/* =========================================
   PREÇO
   ========================================= */
.post-price {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}
.post-price.free {
    color: var(--text-secondary);
}
.post-price.paid {
    color: var(--accent-pink);
}

/* =========================================
   INTERAÇÕES
   ========================================= */
.post-interactions {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}
.interaction-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
}
.interaction-item i {
    font-size: 11px;
    color: var(--text-muted);
}
.interaction-item:nth-child(1) i { color: #ef4444; }
.interaction-item:nth-child(2) i { color: #3b82f6; }
.interaction-item:nth-child(3) i { color: #f59e0b; }

/* =========================================
   BREAKPOINT INTERMÉDIO (1201–1400px)
   ========================================= */
@media (min-width: 1201px) and (max-width: 1400px) {

    .posts-table th,
    .posts-table td {
        padding: 11px 12px;
    }
    .posts-table th { font-size: 10.5px; }
    .posts-table { font-size: 12.5px; }
    .post-thumb { width: 42px; height: 42px; }
    .post-title { font-size: 12.5px; }
    .post-type-badge { font-size: 11px; padding: 3px 8px; }
    .interaction-item { font-size: 11.5px; }
}

/* =========================================
   MOBILE
   ========================================= */
@media (max-width: 768px) {

    body.posts-body .main-content {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0 !important;
    }

    .posts-page {
        padding: 0 10px 130px;
        gap: 14px;
    }

    .posts-top { flex-direction: column; gap: 12px; }
    .posts-title-block h1 { font-size: 22px; }
    .posts-title-block p { font-size: 12px; }
    .posts-search { min-width: 0; width: 100%; padding: 11px 16px; }

    .posts-tabs { padding-bottom: 6px; gap: 6px; }
    .post-tab { font-size: 12.5px; padding: 8px 14px; }

    .posts-counter { padding: 5px 12px; }
    .posts-count-label { font-size: 11px; }
    .posts-count { font-size: 12px; }

    /* Tabela → cards */
    .posts-table-wrapper {
        background: transparent;
        border: none;
        border-radius: 0;
        overflow: visible;
    }
    .posts-table { table-layout: auto; }
    .posts-table thead { display: none; }
    .posts-table,
    .posts-table tbody,
    .posts-table tr,
    .posts-table td {
        display: block;
        width: 100%;
    }
    .posts-table tbody {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .post-row {
        background-color: var(--bg-card);
        border: 1px solid var(--border-color);
        border-radius: 16px;
        padding: 14px;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    .post-row:hover { background-color: var(--bg-card); }

    .posts-table td {
        padding: 0;
        border-bottom: none;
        overflow: visible;
        text-overflow: clip;
    }

    /* Post (cabeçalho do card) */
    .post-cell { gap: 12px; }
    .post-thumb { width: 52px; height: 52px; border-radius: 12px; }
    .post-type-mini { width: 22px; height: 22px; font-size: 10px; }
    .post-title {
        font-size: 14.5px;
        font-weight: 700;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        line-height: 1.35;
    }

    /* Células com label */
    .post-cell-tipo,
    .post-cell-preco,
    .post-cell-interacoes,
    .post-cell-data {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 8px 0;
        border-top: 1px dashed var(--border-color);
        font-size: 12.5px;
        color: var(--text-secondary);
    }
    .post-cell-tipo::before,
    .post-cell-preco::before,
    .post-cell-interacoes::before,
    .post-cell-data::before {
        content: attr(data-label);
        font-size: 11px;
        font-weight: 700;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.4px;
    }
    .post-cell-preco.right,
    .post-cell-interacoes.right,
    .post-cell-data.right {
        text-align: left;
        justify-content: space-between;
    }

    .post-interactions { gap: 10px; }
    .interaction-item { font-size: 12px; }
}