/* QAFlow - Social feed enhancements: story creator + story viewer
   (includes/social-feed-enhancements.php)
   Extracted from inline style="" attributes, incl. HTML built via JS string
   concatenation inside openStoryViewer(). */

/* Generic hidden-by-default helper (JS sets .style.display='block'/'none'
   explicitly on every call, so this only supplies the initial state). */
.sf-hidden {
    display: none;
}

/* Story creator modal - background color picker */
.sf-color-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
}

.sf-color-dot.active {
    border-color: var(--primary);
}

.sf-color-indigo { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.sf-color-pink   { background: linear-gradient(135deg, #ec4899, #f43f5e); }
.sf-color-green  { background: linear-gradient(135deg, #10b981, #059669); }
.sf-color-amber  { background: linear-gradient(135deg, #f59e0b, #d97706); }
.sf-color-blue   { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.sf-color-red    { background: linear-gradient(135deg, #ef4444, #dc2626); }
.sf-color-black  { background: linear-gradient(135deg, #000, #333); }

/* Story creator modal - image/video preview */
.sf-story-preview {
    text-align: center;
    margin-bottom: 8px;
    position: relative;
}

.sf-preview-img {
    max-height: 200px;
    border-radius: 8px;
}

.sf-remove-img-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Full-screen story viewer (built dynamically in openStoryViewer()) */
.sf-viewer-media-wrap {
    max-width: 400px;
    max-height: 80vh;
    border-radius: 16px;
    overflow: hidden;
}

.sf-viewer-media-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sf-viewer-text-card {
    width: 360px;
    height: 500px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.sf-viewer-text {
    color: #fff;
    font-size: 22px;
    font-weight: 600;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    line-height: 1.5;
}

.sf-viewer-progress-container {
    position: absolute;
    top: 16px;
    left: 20px;
    right: 20px;
    display: flex;
    gap: 4px;
}

.sf-viewer-progress-track {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.sf-viewer-progress-bar {
    height: 100%;
    background: #fff;
    width: 0;
    transition: width 5s linear;
}

.sf-viewer-user-row {
    position: absolute;
    top: 32px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sf-viewer-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
}

.sf-viewer-user-name {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

.sf-viewer-user-time {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
}

.sf-viewer-close-btn {
    position: absolute;
    top: 32px;
    right: 20px;
    cursor: pointer;
    color: #fff;
    font-size: 24px;
}

.sf-yt-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    margin: 10px 0;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.sf-yt-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}
