/* Stories strip styles (separate file) */
.story-strip {
    max-width: 1400px;
    margin: 18px auto;
    padding: 0 20px;
}

/* Add space for fixed header on desktop */
@media (min-width: 768px) {
    .story-strip {
        margin-top: 70px;
    }
}
.story-inner {
    background: transparent;
    border-radius: 10px;
    padding: 6px 0;
}
.story-cats {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-bottom: 1.5px solid rgba(0,0,0,0.10);
    padding: 0 20px;
    gap: 0;
    margin-bottom: 14px;
    align-items: stretch;
}
.story-cats .cat-btn {
    position: relative;
    flex: 0 0 auto;
    background: none;
    border: none;
    padding: 6px 20px 12px;
    font-family: 'Iceland', serif;
    font-size: 14px;
    font-weight: 500;
    color: #888;
    cursor: pointer;
    white-space: nowrap;
    letter-spacing: 0.01em;
    line-height: 1.3;
    transition: color 0.15s;
    outline: none;
}
.story-cats .cat-btn::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    right: 50%;
    height: 2px;
    background: #111;
    border-radius: 2px 2px 0 0;
    transition: left 0.18s ease, right 0.18s ease;
}
.story-cats .cat-btn:hover { color: #444; }
.story-cats .cat-btn.active {
    color: #111;
    font-weight: 700;
    background: none;
}
.story-cats .cat-btn.active::after { left: 0; right: 0; }
.story-list {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding: 6px 0 12px 20px; /* left padding aligns with categories */
    -webkit-overflow-scrolling: touch;
    align-items: flex-start;
}

/* Hide native scrollbars/track on mobile and remove focus outlines that create visible lines */
.story-list, .story-cats {
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}
.story-list::-webkit-scrollbar, .story-cats::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
    width: 0;
    height: 0;
}
.story-list:focus, .story-cats:focus,
.story-list:active, .story-cats:active {
    outline: none;
}
.story-item {
    width: 84px;
    min-width: 84px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
}
.story-item .blob {
    width: 104px;
    height: 104px;
    border-radius: 28% 72% 60% 40% / 40% 40% 60% 60%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.story-item .blob {
    /* ash background to match request */
    background: linear-gradient(180deg, #363434 0%, #777373 100%);
}
.story-item img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255,255,255,0.95);
    box-shadow: 0 10px 20px rgba(0,0,0,0.14);
    transform: translateY(-6px);
}
.story-label {
    font-size: 12px;
    color: #222;
    text-align: center;
    max-width: 96px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Small screens: compact sizes */
@media (max-width: 480px) {
    .story-item { width: 72px; min-width: 72px; }
    .story-item .blob { width: 84px; height: 84px; }
    .story-item img { width: 56px; height: 56px; border-width: 3px; }
    .story-label { font-size: 11px; max-width: 68px; }

    /* Start lists closer to the left on small screens */
    .story-strip { padding-left: 8px; padding-right: 12px; }
    .story-cats { padding: 0 8px; }
    .story-list { padding-left: 8px; }
}

/* Larger screens: slightly bigger blobs and more spacing for a balanced desktop layout */
@media (min-width: 769px) {
    .story-item { width: 96px; min-width: 96px; }
    .story-item { gap: 16px; } /* vertical spacing between blob and label */
    .story-item .blob { width: 120px; height: 120px; }
    .story-item img { width: 76px; height: 76px; border-width: 4px; }
    .story-label { font-size: 13px; max-width: 100px; }
    .story-list { gap: 44px; } /* increased horizontal spacing between items */
    .story-cats { gap: 0; }
}

/* Fullscreen story viewer (mobile) */
.story-viewer {
    position: fixed;
    inset: 0;
    background: #000;
    color: #fff;
    z-index: 110000;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
}
.story-viewer .sv-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    padding-top: calc(env(safe-area-inset-top) + 8px);
}
.sv-back {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
}
.sv-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}
.sv-meta { display:flex; flex-direction:column; }
.sv-profile .avatar { width:36px;height:36px;border-radius:50%;object-fit:cover;border:2px solid rgba(255,255,255,0.12);}
.sv-title { font-weight:600;font-size:16px }
.sv-time { font-size:12px;color:rgba(255,255,255,0.7); margin-top:4px; }
/* remove 'more' control (not used) */
.sv-more { display:none; }

.sv-progress { display:flex; gap:6px; padding:8px 8px 4px 8px; }
.sv-progress .bar { flex:1; height:3px; background:rgba(255,255,255,0.18); border-radius:3px; overflow:hidden; }
.sv-progress .bar > i { display:block; width:0%; height:100%; background:linear-gradient(90deg,#fff,#a8d1ff); transition:width linear; }

.sv-media { flex:1; display:flex; align-items:center; justify-content:center; overflow:hidden; position:relative; }
.sv-media img { max-width:100%; max-height:100%; object-fit:contain; }

/* footer now only shows short description */
.sv-footer {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    justify-content: space-between; /* keep actions pinned to the right */
    position: absolute; /* pin footer to bottom so actions don't shift */
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 110010;
    background: linear-gradient(180deg, rgba(0,0,0,0.0), rgba(0,0,0,0.18));
    border-radius: 10px;
}
.sv-desc {
    flex: 1 1 auto;
    min-width: 0; /* allow truncation/overflow within flex */
    color: rgba(255,255,255,0.92);
    font-size: 16px;
    line-height: 1.6;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
}
.sv-actions {
    flex: 0 0 auto; /* fixed action area */
    display: flex;
    gap: 10px;
    align-items: center;
}
.sv-actions .lb-btn { min-width: 44px; height:44px; display:inline-flex; align-items:center; justify-content:center; }

/* Mobile story viewer: heart-only like button styles */
.sv-actions .like-btn {
    width: 48px;
    height: 48px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
    font-size: 18px;
}
.sv-actions .like-btn.liked {
    background: #c62828 !important; /* red filled */
    border-color: #b71c1c !important;
    color: #fff !important;
}
.sv-actions .like-btn i { pointer-events: none; }

/* make sure media area leaves room for footer so it doesn't overlap content */
.sv-media { padding-bottom: 140px; }
.sv-action { display:none; }

/* Tappable left / right zones to jump prev/next */
.sv-zone { position:absolute; top:0; bottom:0; width:28%; }
.sv-zone.left { left:0; }
.sv-zone.right { right:0; }

/* Close button top-right */
.sv-close { position: absolute; right: 12px; top: calc(env(safe-area-inset-top) + 18px); width:40px;height:40px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:rgba(255,255,255,0.06); z-index:110001; }

@media (min-width: 769px) {
    .story-viewer { display:none; }
}
