/**
 * PleChat - Moments stylesheet
 * Reels/TikTok style vertical snap feed with premium glassmorphism
 */

.moments-page {
    background: #06090e;
    color: #f8fafc;
    height: 100vh;
    height: 100dvh;
    width: 100vw;
    overflow: hidden;
    position: relative;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Feed layout */
.moments-feed {
    height: 100%;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE/Edge */
    position: relative;
    z-index: 2;
    background: #000;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
}

.moments-feed::-webkit-scrollbar {
    display: none; /* Safari/Chrome */
}

/* Moment Item */
.moment-item {
    height: 100%;
    width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Video wrapper */
.moment-video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Comments open state styles */
.comments-open .moment-video-wrapper {
    height: 45%;
}

.comments-open .moment-bottom-section {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s;
}

.comments-open .moment-backdrop {
    opacity: 0;
    transition: opacity 0.25s ease;
}

.moment-video {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    background: transparent;
}

/* Ambient glow backdrop for PC */
.moment-backdrop {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    object-fit: cover;
    filter: blur(60px) opacity(0.25);
    z-index: 1;
    pointer-events: none;
}

/* Overlay elements */
.moment-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px;
    padding-top: calc(16px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); /* Extra padding to avoid mobile bottom nav overlap */
}

.moment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: auto;
    width: 100%;
    z-index: 10;
}

.moment-back-btn {
    background: rgba(15, 23, 32, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.moment-back-btn:hover {
    background: rgba(132, 239, 210, 0.2);
    border-color: var(--accent-primary);
    transform: scale(1.05);
}

.moment-header-title {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    color: #fff;
    background: linear-gradient(135deg, #84EFD2, #5ED9B9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.moment-sound-btn {
    background: rgba(15, 23, 32, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.moment-sound-btn:hover {
    background: rgba(132, 239, 210, 0.2);
    border-color: var(--accent-primary);
}

/* Bottom info */
.moment-bottom-section {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    width: 100%;
}

.moment-info {
    flex: 1;
    pointer-events: auto;
    margin-right: 12px;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.75) 100%);
    padding: 10px 12px;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
    backdrop-filter: blur(1px);
}

.moment-author {
    display: flex;
    align-items: center;
    gap: 6px;
}

.moment-author-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid var(--accent-primary);
    object-fit: cover;
    cursor: pointer;
}

.moment-author-placeholder {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid var(--accent-primary);
    background: var(--accent-gradient);
    color: #0f1720;
    font-weight: 700;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.moment-author-details {
    display: flex;
    flex-direction: column;
}

.moment-author-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 3px;
    text-decoration: none;
}

.moment-author-name:hover {
    color: var(--accent-primary);
}

.moment-author-username {
    font-size: 0.65rem;
    color: #94a3b8;
}

.moment-follow-btn {
    background: transparent;
    border: 1.5px solid var(--accent-primary);
    color: var(--accent-primary);
    font-weight: 700;
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 6px;
    line-height: 1;
}

.moment-follow-btn.following {
    border-color: rgba(255, 255, 255, 0.2);
    color: #94a3b8;
}

.moment-follow-btn:hover {
    background: rgba(132, 239, 210, 0.15);
}

.moment-description {
    font-size: 0.74rem;
    color: #f1f5f9;
    line-height: 1.35;
    word-break: break-word;
    margin-top: 2px;
}

.moment-time {
    font-size: 0.65rem;
    color: #64748b;
    margin-top: 1px;
}

.moment-info > div:last-child {
    font-size: 0.65rem !important;
    margin-top: 2px !important;
}

/* Floating Actions Sidebar */
.moment-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
    z-index: 5;
    margin-bottom: 28px;
}

.moment-action-btn {
    background: rgba(15, 23, 32, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 32px; /* Redefine from 44px to 32px (smaller, more refined) */
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.moment-action-btn svg {
    width: 15px !important; /* Force smaller icon dimensions */
    height: 15px !important;
}

.moment-action-btn:hover {
    transform: scale(1.08);
}

.moment-action-btn.liked {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.15);
}

.moment-action-btn.liked svg {
    fill: #ef4444;
    animation: heartBeat 0.3s ease-in-out;
}

.moment-action-btn.comment-icon:hover {
    color: var(--accent-primary);
    border-color: rgba(132, 239, 210, 0.3);
}

.moment-action-btn.share-icon:hover {
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.3);
}

.moment-action-btn.donate-icon {
    color: #f59e0b;
}

.moment-action-btn.donate-icon:hover {
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.15);
}

.moment-action-label {
    font-size: 0.62rem; /* Reduced for proportional size */
    font-weight: 700;
    color: #e2e8f0;
    margin-top: 2px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    text-align: center;
}

.moment-action-group {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Sound Indicator overlay */
.volume-indicator-overlay {
    position: absolute;
    z-index: 100;
    background: rgba(0, 0, 0, 0.7);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform: scale(0.8);
    color: #fff;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.volume-indicator-overlay.show {
    opacity: 1;
    transform: scale(1);
}

/* Comments bottom sheet/drawer */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5); /* Slightly transparent dark overlay, no blur */
    z-index: 1099;
    display: none;
    animation: fadeIn 0.2s ease;
}

.comments-drawer {
    position: fixed;
    z-index: 1100;
    background: #0f1622;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Mobile drawer (bottom sheet) */
@media (max-width: 768px) {
    .comments-drawer {
        bottom: 0;
        left: 0;
        right: 0;
        height: 60%;
        border-radius: 24px 24px 0 0;
        border-bottom: none;
        transform: translateY(100%);
    }
    .comments-drawer.active {
        transform: translateY(0);
    }
    .drawer-footer {
        padding-bottom: calc(24px + env(safe-area-inset-bottom, 12px)) !important;
    }
}

/* Desktop drawer (bottom sheet centered with feed) */
@media (min-width: 769px) {
    .comments-drawer {
        bottom: 0;
        left: 50%;
        width: 480px;
        height: 55%;
        border-radius: 24px 24px 0 0;
        border-bottom: none;
        transform: translate(-50%, 100%);
    }
    .comments-drawer.active {
        transform: translate(-50%, 0);
    }
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.drawer-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.drawer-close {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: #94a3b8;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.drawer-close:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.drawer-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.06);
    background: #0c111a;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}

/* Comments layout inside drawer */
.drawer-comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.drawer-comment-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.drawer-comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.drawer-comment-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: #0f1720;
    font-weight: 700;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.drawer-comment-body {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 8px 12px;
    border-radius: 12px;
}

.drawer-comment-author {
    font-size: 0.78rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 2px;
    display: block;
}

.drawer-comment-text {
    font-size: 0.82rem;
    color: #94a3b8;
    margin: 0;
    line-height: 1.4;
    word-break: break-word;
}

.drawer-comment-time {
    font-size: 0.7rem;
    color: #475569;
    margin-top: 4px;
    display: block;
}

/* Comment Form */
.drawer-comment-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.drawer-comment-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 10px 16px;
    color: #fff;
    font-size: 0.85rem;
    outline: none;
    transition: all 0.2s;
}

.drawer-comment-input:focus {
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.08);
}

.drawer-comment-submit {
    background: var(--accent-gradient);
    color: #0f1720;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.drawer-comment-submit:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(132, 239, 210, 0.4);
}

.drawer-comment-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Toast styling */
.moment-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-50px);
    background: rgba(15, 22, 34, 0.9);
    border: 1px solid var(--accent-primary);
    backdrop-filter: blur(12px);
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 2000;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5), var(--accent-glow);
}

.moment-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Animations */
@keyframes heartBeat {
    0% { transform: scale(1); }
    30% { transform: scale(1.3); }
    60% { transform: scale(0.9); }
    80% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Desktop Ambient lighting wrapper around feed */
@media (min-width: 769px) {
    .moments-page {
        display: flex;
        align-items: center;
        justify-content: center;
        background: #020406;
    }
}

/* Views Badge Overlay */
.moment-views-badge {
    position: absolute;
    top: calc(76px + env(safe-area-inset-top, 0px));
    left: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 10;
    pointer-events: none;
    text-shadow: 0 1.5px 3px rgba(0, 0, 0, 0.85);
    transition: opacity 0.25s ease, visibility 0.25s;
}

.moment-views-icon {
    width: 11px;
    height: 11px;
    fill: #ffffff;
    filter: drop-shadow(0 1.5px 3px rgba(0, 0, 0, 0.85));
}

.comments-open .moment-views-badge {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

/* Seekbar Container */
.moment-seekbar-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 24px; /* Generous touch area */
    z-index: 15;
    display: flex;
    align-items: center; /* Center the track vertically */
    justify-content: center;
    padding: 0 12px;
    box-sizing: border-box;
    cursor: pointer;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0) 100%);
    pointer-events: auto;
}

/* The visual track line */
.moment-seekbar-track {
    position: relative;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 2px;
    transition: height 0.15s ease;
    display: flex;
    align-items: center;
}

/* Expand track on hover / touch active */
.moment-seekbar-container:hover .moment-seekbar-track,
.moment-seekbar-container:active .moment-seekbar-track {
    height: 6px;
}

/* The progress fill (colored) */
.moment-seekbar-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: var(--accent-primary);
    border-radius: 2px;
}

/* Visual drag thumb handle */
.moment-seekbar-thumb {
    position: absolute;
    left: 0%;
    width: 0px;
    height: 0px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    transform: translate(-50%, -50%); /* Center thumb on the progress point vertically and horizontally */
    top: 50%;
    transition: width 0.15s ease, height 0.15s ease;
    pointer-events: none; /* Let input handle pointer events */
    z-index: 2;
}

/* Expand thumb on hover / touch active */
.moment-seekbar-container:hover .moment-seekbar-thumb,
.moment-seekbar-container:active .moment-seekbar-thumb {
    width: 12px;
    height: 12px;
}

/* Invisible overlay input range */
.moment-seekbar-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    opacity: 0; /* Fully invisible */
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    z-index: 3;
    background: transparent;
}

/* Clear all user-agent range styles */
.moment-seekbar-input::-webkit-slider-runnable-track {
    background: transparent;
    border: none;
}
.moment-seekbar-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
}
.moment-seekbar-input::-moz-range-track {
    background: transparent;
    border: none;
}
.moment-seekbar-input::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border: none;
}

/* Mobile seekbar placement (shifts up to avoid overlaying bottom nav) */
@media (max-width: 768px) {
    .moment-seekbar-container {
        bottom: calc(60px + env(safe-area-inset-bottom, 0px));
        padding: 0 10px;
    }
    /* When comments are open, the video wrapper occupies 45% height at the top, so bottom should be 0 */
    .comments-open .moment-seekbar-container {
        bottom: 0;
    }
}

/* Time display above progress bar */
.moment-seekbar-time-display {
    position: absolute;
    top: -14px;
    right: 12px;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.6);
    font-family: monospace, sans-serif;
    pointer-events: none;
    text-shadow: 0 1.5px 3px rgba(0, 0, 0, 0.85);
    display: flex;
    gap: 3px;
    user-select: none;
    transition: color 0.15s ease, opacity 0.15s ease;
    z-index: 5;
}

/* Brighten on hover/active seekbar */
.moment-seekbar-container:hover .moment-seekbar-time-display,
.moment-seekbar-container:active .moment-seekbar-time-display {
    color: rgba(255, 255, 255, 0.95);
}

/* Play/Pause indicator overlay in center of video */
.play-pause-indicator-overlay {
    position: absolute;
    z-index: 100;
    background: rgba(0, 0, 0, 0.45);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform: scale(0.7);
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    top: 50%;
    left: 50%;
    margin-left: -30px;
    margin-top: -30px;
}

.play-pause-indicator-overlay.show {
    opacity: 1;
    transform: scale(1);
}

.play-pause-indicator-overlay svg {
    margin-left: 3px; /* Slightly shift play triangle to visually center it */
}

/* --- Video Editor Workspace Styles --- */
.editor-workspace {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: left;
    margin-bottom: 12px;
}

.editor-preview-column {
    position: relative;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    width: 160px;
    height: 284px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin: 0 auto;
    flex-shrink: 0;
}

#momentsEditorWorkspace #editorTextOverlay {
    text-shadow: 0 1px 2px rgba(0,0,0,0.85);
    border-radius: 4px;
    padding: 2px 4px !important;
}

#momentsEditorWorkspace #editorEmojiOverlay {
}

.editor-controls-column {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 4px;
}

/* Custom Scrollbar for Controls Column */
.editor-controls-column::-webkit-scrollbar {
    width: 4px;
}
.editor-controls-column::-webkit-scrollbar-track {
    background: transparent;
}
.editor-controls-column::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

/* Interactive Color Dot Picker */
.color-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    padding: 0;
    outline: none;
    box-sizing: border-box;
    transition: transform 0.2s, border-color 0.2s;
}
.color-dot:hover {
    transform: scale(1.15);
}
.color-dot.active {
    border: 2.5px solid var(--accent-primary) !important;
    transform: scale(1.2);
    box-shadow: 0 0 8px rgba(132, 239, 210, 0.5);
}

/* Filter Button */
.filter-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 6px 4px;
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}
.filter-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}
.filter-btn.active {
    border-color: var(--accent-primary) !important;
    background: rgba(132, 239, 210, 0.12) !important;
    color: var(--accent-primary) !important;
    box-shadow: 0 0 10px rgba(132, 239, 210, 0.2);
}

/* Video Filters Classes */
.filter-normal {
    filter: none !important;
}
.filter-sepia {
    filter: sepia(0.85) contrast(1.1) !important;
}
.filter-grayscale {
    filter: grayscale(1) contrast(1.2) !important;
}
.filter-vintage {
    filter: sepia(0.4) saturate(1.4) contrast(0.95) brightness(1.05) !important;
}
.filter-neon {
    filter: saturate(1.85) contrast(1.2) hue-rotate(15deg) !important;
}
.filter-cool {
    filter: saturate(1.2) hue-rotate(-20deg) contrast(1.05) !important;
}

/* Backdrop Filter Classes (must retain blur and opacity) */
.backdrop-filter-normal {
    filter: blur(60px) opacity(0.25) !important;
}
.backdrop-filter-sepia {
    filter: blur(60px) opacity(0.25) sepia(0.85) contrast(1.1) !important;
}
.backdrop-filter-grayscale {
    filter: blur(60px) opacity(0.25) grayscale(1) contrast(1.2) !important;
}
.backdrop-filter-vintage {
    filter: blur(60px) opacity(0.25) sepia(0.4) saturate(1.4) contrast(0.95) brightness(1.05) !important;
}
.backdrop-filter-neon {
    filter: blur(60px) opacity(0.25) saturate(1.85) contrast(1.2) hue-rotate(15deg) !important;
}
.backdrop-filter-cool {
    filter: blur(60px) opacity(0.25) saturate(1.2) hue-rotate(-20deg) contrast(1.05) !important;
}

/* Range input styled custom */
.editor-controls-column input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}
.editor-controls-column input[type="range"]:focus {
    outline: none;
}
.editor-controls-column input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 2px;
}
.editor-controls-column input[type="range"]::-webkit-slider-thumb {
    height: 12px;
    width: 12px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: -4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.5);
    transition: transform 0.1s;
}
.editor-controls-column input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Unified Top Bar Container */
.moments-top-bar {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding-top: 0 !important;
    pointer-events: auto;
}

.moments-top-bar .guest-register-banner {
    width: 100%;
    background: transparent !important;
    padding: 10px 0 !important;
    display: none !important;
    justify-content: center !important;
    box-sizing: border-box;
}

.moments-page .guest-register-banner > span {
    display: none !important;
}

.moments-page .guest-register-banner > div {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    gap: 0 !important;
}

.moments-page .guest-register-banner .banner-login {
    display: none !important;
}

.moments-page .guest-register-banner .banner-cta {
    background: rgba(132, 239, 210, 0.05) !important;
    border: 1.5px solid var(--accent-primary) !important;
    color: var(--accent-primary) !important;
    padding: 6px 18px !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    border-radius: 30px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
}

.moments-page .guest-register-banner .banner-cta:hover {
    background: rgba(132, 239, 210, 0.15) !important;
    transform: scale(1.03) !important;
    box-shadow: 0 6px 20px rgba(132, 239, 210, 0.3) !important;
}

.moments-top-bar .adsterra-moments-banner {
    width: 100%;
    display: flex;
    justify-content: center;
    overflow: hidden;
    padding: 0 !important;
    background: rgba(0, 0, 0, 0.3);
}

.moments-top-bar .moment-header {
    padding: 8px 16px 12px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Force solid black background for the bottom nav bar specifically on Moments pages */
.moments-page .premium-nav,
.show-moment-page .premium-nav {
    background: #000000 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Hide bottom navigation bar on Moments page */
.moments-page .premium-nav {
    display: none !important;
}

/* Adjust layout space now that bottom navigation is hidden */
.moments-page .moment-overlay {
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
}

@media (max-width: 768px) {
    .moments-page .moment-seekbar-container {
        bottom: 0 !important;
    }
    .moments-page .drawer-footer {
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

.moments-page #pushPromptBanner,
.moments-page #pwaInstallBubble {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
}

/* Hilos de comentarios y respuestas con enganche en Moments */
.drawer-comment-item.reply-comment {
    position: relative !important;
    margin-left: 36px !important;
    margin-top: 6px !important;
    margin-bottom: 6px !important;
    gap: 8px !important;
}

.drawer-comment-item.reply-comment .drawer-comment-avatar {
    width: 22px !important;
    height: 22px !important;
}

.drawer-comment-item.reply-comment .drawer-comment-avatar-placeholder {
    width: 22px !important;
    height: 22px !important;
    font-size: 0.65rem !important;
    line-height: 22px !important;
}

.drawer-comment-item.reply-comment .drawer-comment-body {
    padding: 6px 10px !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.drawer-comment-item.reply-comment .drawer-comment-author {
    font-size: 0.76rem !important;
}

.drawer-comment-item.reply-comment .drawer-comment-text {
    font-size: 0.78rem !important;
}

.drawer-comment-item.reply-comment::before {
    content: "" !important;
    position: absolute !important;
    left: -20px !important; /* Alinea con el centro del avatar principal */
    top: -20px !important; /* Se engancha hacia arriba al comentario padre */
    width: 20px !important; /* Ancho de la línea horizontal */
    height: 32px !important; /* Altura de la línea vertical */
    border-left: 2px solid rgba(255, 255, 255, 0.15) !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.15) !important;
    border-bottom-left-radius: 6px !important;
    pointer-events: none !important;
}

/* Soporte para tema claro */
html[data-theme="light"] .drawer-comment-item.reply-comment::before,
body[data-theme="light"] .drawer-comment-item.reply-comment::before {
    border-color: rgba(0, 0, 0, 0.12) !important;
}





