/* post-options.css - Premium post options popup */
.post-options-popup {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.7); /* glass effect background */
    backdrop-filter: blur(6px); /* frosted blur */
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.15);
    transition: bottom 0.3s ease;
    z-index: 1000;
    padding: 12px;
    box-sizing: border-box;
    border-top: 1px solid rgba(230, 236, 240, 0.7); /* subtle glass border */
}

.post-options-popup.popup-visible {
    bottom: 0;
}

.popup-option {
    display: flex;
    align-items: center;
    padding: 12px;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.2s;
    position: relative;
}

.popup-option:hover {
    background-color: #f7f7f7;
}

.popup-option-icon {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-option-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.popup-option-text {
    font-size: 14px;
    font-weight: 500;
    color: #0f1419;
}

.popup-cancel {
    margin-top: 6px;
    justify-content: center;
    background-color: #f7f7f7;
    font-weight: 600;
}

.popup-cancel .popup-option-text {
    color: #000;
}

/* Delete option specific styling */
.popup-option[data-action="delete"] .popup-option-text {
    color: #f91880;
}

/* Backdrop overlay - fixed to properly handle clicks */
.post-options-backdrop,
.report-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.post-options-backdrop.visible,
.report-backdrop.visible {
    opacity: 1;
    pointer-events: all;
}

/* Report popup styles - Updated with glass effect */
.report-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(255, 255, 255, 0.7); /* glass background */
    backdrop-filter: blur(6px); /* frosted blur */
    -webkit-backdrop-filter: blur(6px); /* Safari support */
    border-radius: 14px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
    z-index: 1002;
    padding: 20px;
    width: 320px;
    max-height: 80vh;
    overflow-y: auto;
    opacity: 0;
    transition: all 0.3s ease;
    border: 1px solid rgba(230, 236, 240, 0.7); /* subtle glass border */
}

.report-popup.visible {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.report-content h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #0f1419;
}

.report-content p {
    font-size: 13px;
    color: #536471;
    margin-bottom: 14px;
    line-height: 1.4;
}

.report-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.report-option {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.report-option:hover {
    background-color: #f7f7f7;
}

.report-option input[type="radio"] {
    margin-right: 10px;
}

.report-option span {
    font-size: 14px;
    color: #0f1419;
}

.report-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.report-btn {
    padding: 10px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s;
}

.report-submit {
    background-color: #000; /* Changed from blue to black */
    color: white;
}

.report-submit:hover {
    background-color: #333; /* Darker shade for hover */
}

.report-submit:disabled {
    background-color: #cfd9de;
    cursor: not-allowed;
}

.report-cancel {
    background-color: #eff3f4;
    color: #0f1419;
}

.report-cancel:hover {
    background-color: #e7e7e8;
}

/* Report success notification - Updated styles */
.report-success {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: #f8f9fa;
    color: #000;
    padding: 8px 16px;
    border-radius: 20px;
    z-index: 1003;
    opacity: 0;
    transition: all 0.3s ease;
    font-size: 13px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.report-success.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.report-success-content {
    display: flex;
    align-items: center;
    gap: 6px;
}

.report-success-content svg {
    width: 16px;
    height: 16px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .post-options-popup,
    .report-popup {
        background: rgba(0, 0, 0, 0.7); /* Glass effect for dark mode */
        box-shadow: 0 2px 15px rgba(255, 255, 255, 0.1);
    }
    
    .popup-option:hover,
    .report-option:hover {
        background-color: #16181c;
    }
    
    .popup-option-text,
    .report-content h3,
    .report-option span {
        color: #e7e9ea;
    }
    
    .popup-cancel,
    .report-cancel {
        background-color: #16181c;
        color: #e7e9ea;
    }
    
    .popup-cancel:hover,
    .report-cancel:hover {
        background-color: #2f3336;
    }
    
    .report-content p {
        color: #71767b;
    }
    
    /* Dark mode for report button */
    .report-submit {
        background-color: #fff; /* White in dark mode */
        color: #000;
    }
    
    .report-submit:hover {
        background-color: #e6e6e6; /* Lighter shade for hover */
    }
    
    /* Dark mode for success message */
    .report-success {
        background: #2f3336;
        color: #e7e9ea;
        box-shadow: 0 2px 10px rgba(255, 255, 255, 0.1);
    }
}

/* Default (mobile) → full width bottom sheet */
.post-options-popup {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.7); /* Glass effect */
    backdrop-filter: blur(6px);
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.15);
    transition: bottom 0.3s ease;
    z-index: 1000;
    padding: 12px;
    box-sizing: border-box;
}

/* Visible state */
.post-options-popup.popup-visible {
    bottom: 0;
}

/* Desktop adjustment → align with your 600px body container */
@media (min-width: 768px) {
    .post-options-popup {
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        max-width: 600px;   /* match body width */
        border-radius: 12px 12px 0 0;
    }
}

/* Edit mode styles */
.create-post-container[data-edit-post-id] .post-btn {
    background-color: #1d9bf0 !important;
}

.create-post-container[data-edit-post-id] .post-input {
    border-left: 4px solid #1d9bf0;
    padding-left: 12px;
}

/* Media preview styles for existing media */
.existing-media-preview {
    position: relative;
    margin: 10px 0;
}

.existing-media-preview img,
.existing-media-preview video {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
}

.remove-media-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* Dark mode styles for post options popup */
@media (prefers-color-scheme: dark) {
    .post-options-popup {
        background: rgba(0, 0, 0, 0.8); /* Dark glass effect */
        backdrop-filter: blur(10px);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 -2px 15px rgba(255, 255, 255, 0.1);
    }
    
    .popup-option {
        color: #e7e9ea;
    }
    
    .popup-option:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    .popup-option-text {
        color: #e7e9ea;
    }
    
    .popup-cancel {
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    .popup-cancel .popup-option-text {
        color: #e7e9ea;
    }
    
    .popup-cancel:hover {
        background-color: rgba(255, 255, 255, 0.15);
    }
    
    /* Delete option in dark mode */
    .popup-option[data-action="delete"] .popup-option-text {
        color: #f91880;
    }
    
    /* Report popup dark mode */
    .report-popup {
        background: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 2px 15px rgba(255, 255, 255, 0.1);
    }
    
    .report-content h3 {
        color: #e7e9ea;
    }
    
    .report-content p {
        color: #71767b;
    }
    
    .report-option {
        color: #e7e9ea;
    }
    
    .report-option:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    .report-option span {
        color: #e7e9ea;
    }
    
    .report-submit {
        background-color: #fff;
        color: #000;
    }
    
    .report-submit:hover {
        background-color: #e6e6e6;
    }
    
    .report-cancel {
        background-color: rgba(255, 255, 255, 0.1);
        color: #e7e9ea;
    }
    
    .report-cancel:hover {
        background-color: rgba(255, 255, 255, 0.15);
    }
    
    /* Success message in dark mode */
    .report-success {
        background: rgba(255, 255, 255, 0.9);
        color: #000;
        box-shadow: 0 2px 10px rgba(255, 255, 255, 0.2);
    }
}


/* Pin success notification */
.pin-success {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pin-success.visible {
    opacity: 1;
}

.pin-success-content {
    background-color: #00ba7c;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Profile replies styling */
.profile-reply {
    background: #fff;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.reply-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.reply-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f0f2f5;
    margin-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reply-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.reply-info {
    display: flex;
    flex-direction: column;
}

.reply-username {
    font-weight: 600;
    font-size: 14px;
}

.reply-time {
    font-size: 12px;
    color: #666;
}

.reply-content {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 8px;
}

.reply-to-post {
    font-size: 12px;
    color: #666;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #1d9bf0;
}
