/* =========================================
   Arquivo: filex/css/minhas-historias.css
   XONA — MINHAS HISTÓRIAS
   Requer main.css carregado antes.
   ========================================= */

/* =========================================
   BODY — sem sidebar direita
   ========================================= */
body.stories-body .main-content {
    margin-right: 0 !important;
    max-width: none !important;
}

.stories-page {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 24px;
    margin-top: 2%;
}

/* =========================================
   TÍTULO + PESQUISA
   ========================================= */
.stories-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.stories-title-block h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}
.stories-title-block p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}
.stories-search { min-width: 280px; }

/* =========================================
   TABS
   ========================================= */
.stories-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: #30363d transparent;
}
.stories-tabs::-webkit-scrollbar { height: 4px; }
.stories-tabs::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 999px;
}

.story-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;
}
.story-tab:hover {
    border-color: var(--accent-pink);
    color: var(--accent-pink);
}
.story-tab.active {
    background-color: var(--accent-pink);
    border-color: var(--accent-pink);
    color: #fff;
}

/* =========================================
   CONTADOR
   ========================================= */
.stories-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;
}
.stories-count-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}
.stories-count {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-pink);
}

/* =========================================
   LISTA DE HISTÓRIAS
   ========================================= */
.stories-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
@media (min-width: 1400px) {
    .stories-list { grid-template-columns: repeat(4, 1fr); }
}

/* =========================================
   CARD DE HISTÓRIA
   ========================================= */
.story-card {
    position: relative;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s;
    min-width: 0;
}
.story-card:hover {
    border-color: var(--accent-pink);
    transform: translateY(-2px);
}

/* Thumbnail */
.story-thumb-wrapper {
    position: relative;
    aspect-ratio: 9 / 14;
    overflow: hidden;
    background-color: var(--bg-dark);
}
.story-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}
.story-card:hover .story-thumb { transform: scale(1.03); }

.story-type-icon {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-status {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10.5px;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 999px;
    backdrop-filter: blur(6px);
    white-space: nowrap;
}
.story-status i { font-size: 5px; }
.story-status.active {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.4);
}
.story-status.expired {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

/* Info */
.story-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 14px 16px;
    min-width: 0;
}

.story-info-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}
.story-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1;
}
.story-price {
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}
.story-price.free { color: var(--text-secondary); }
.story-price.paid { color: var(--accent-pink); }

.story-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.story-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}
.story-meta-item i { font-size: 11px; }
.story-meta-item:nth-child(1) i { color: #3b82f6; }
.story-meta-item:nth-child(2) i { color: #ef4444; }
.story-meta-item:nth-child(3) i { color: #3b82f6; }

.story-dates {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}
.story-date {
    font-size: 11.5px;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.story-date i { font-size: 10px; color: var(--accent-pink); }

/* Menu */
.story-menu-btn {
    position: absolute;
    bottom: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 3;
}
.story-menu-btn:hover {
    border-color: var(--accent-pink);
    color: var(--accent-pink);
}

/* =========================================
   BREAKPOINT INTERMÉDIO (1201–1400px)
   ========================================= */
@media (min-width: 1201px) and (max-width: 1400px) {

    .stories-list { grid-template-columns: repeat(3, 1fr); gap: 12px; }
    .story-title { font-size: 13.5px; }
    .story-info { padding: 12px 12px 14px; gap: 8px; }
    .story-menu-btn { width: 30px; height: 30px; font-size: 12px; }
}

/* =========================================
   MOBILE
   ========================================= */
@media (max-width: 768px) {

    body.stories-body .main-content {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0 !important;
    }

    .stories-page {
        padding: 0 10px 130px;
        gap: 14px;
    }

    .stories-top { flex-direction: column; gap: 12px; }
    .stories-title-block h1 { font-size: 22px; }
    .stories-title-block p { font-size: 12px; }
    .stories-search { min-width: 0; width: 100%; padding: 11px 16px; }

    .stories-tabs { padding-bottom: 6px; gap: 6px; }
    .story-tab { font-size: 12.5px; padding: 8px 14px; }

    .stories-counter { padding: 5px 12px; }
    .stories-count-label { font-size: 11px; }
    .stories-count { font-size: 12px; }

    /* Lista — 2 colunas */
    .stories-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .story-card { border-radius: 14px; }

    .story-thumb-wrapper { aspect-ratio: 9 / 15; }

    .story-type-icon { width: 24px; height: 24px; font-size: 10px; top: 8px; left: 8px; }
    .story-status { font-size: 9.5px; padding: 3px 7px; top: 8px; right: 8px; }

    .story-info { padding: 10px 10px 12px; gap: 8px; }
    .story-title { font-size: 12.5px; }
    .story-price { font-size: 11.5px; }

    .story-meta { gap: 10px; }
    .story-meta-item { font-size: 11px; }

    .story-dates { padding-top: 8px; gap: 3px; }
    .story-date { font-size: 10.5px; }

    .story-menu-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
        bottom: 10px;
        right: 10px;
    }
}