.post-action-menu {
    position: relative;
    display: inline-block;
}

.action-toggle {
    color: #555;
    transition: color 0.2s ease;
}

.action-toggle:hover {
    color: #000;
}

.action-menu {
    display: none;
    position: absolute;
    top: 50%;
    right: 100%;
    transform: translateY(-50%) translateX(8px);
    z-index: 1000;
    background: rgb(255 255 255 / 53%) ;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(200, 200, 200, 0.5);
    border-radius: 13px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 1px;
    white-space: nowrap;
    opacity: 0;
    transition: transform 0.2s ease-out, opacity 0.2s ease-out;
}

.action-menu.active {
    display: flex;
    transform: translateY(-50%) translateX(0);
    opacity: 1;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* justify-content: center; */
    width: 39px;
    height: 39px;
    margin: 4px 3px;
    background: none;
    border: none;
    border-radius: 4px;
    color: #3b3b3b;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    opacity: 1; /* Ensure buttons are visible */
}

.action-item:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #000;
}

.action-item i {
    font-size: 16px;
    margin-bottom: 3px;
}

.action-label {
    font-size: 9px;
    line-height: 1.2;
    color: #444;
    text-align: center;
}

.action-item:hover .action-label {
    color: #000;
}

/* Fallback for browsers without backdrop-filter support */
@supports not (backdrop-filter: blur(5px)) {
    .action-menu {
        background: rgba(255, 255, 255, 0.9); 
    }
}


.btn-link {
    color: #ffffff !important;
}

.active-reaction {
    color: #ffbade;
}

.dropdown-menu .dropdown-item:hover {
    background-color: #f8f9fa;
}

.is-vote .is-up.active i,
.is-vote .is-down.active i {
    font-weight: 900 !important;
    color: #ffbade !important;
}

.post-content-preview {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 4.5em;
    line-height: 1.5em;
}

/* Add fade-out animation */
@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

.fade-out {
    animation: fadeOut 0.3s ease-in-out;
    opacity: 0;
}

.custom-modal .modal-content {
    background: #1f2937; /* dark gray */
    color: #f9fafb; /* light text */
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border: none;
    overflow: hidden;
}

.custom-modal .modal-header {
    background: #111827; /* even darker header */
    border-bottom: 1px solid #374151;
    padding: 1rem 1.5rem;
}

.custom-modal .modal-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: #facc15; /* yellow */
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.custom-modal .modal-title i {
    color: #facc15;
    text-shadow: 0 0 6px rgba(250, 204, 21, 0.5);
}

.custom-modal .modal-body {
    padding: 1.5rem;
    background-color: #1f2937;
}

.custom-modal label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
    color: #e5e7eb;
}

.custom-modal select,
.custom-modal textarea {
    background-color: #374151;
    border: 1px solid #4b5563;
    color: #f9fafb;
    border-radius: 0.5rem;
    padding: 0.5rem;
    width: 100%;
}

.custom-modal select:focus,
.custom-modal textarea:focus {
    outline: none;
    border-color: #facc15;
    box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.3);
}

.custom-modal .btn-secondary {
    background-color: #4b5563;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: background 0.2s;
}

.custom-modal .btn-secondary:hover {
    background-color: #6b7280;
}

.custom-modal .btn-danger {
    background-color: #dc2626;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: background 0.2s;
}

.custom-modal .btn-danger:hover {
    background-color: #b91c1c;
}

.custom-modal .close {
    color: #f9fafb;
    font-size: 1.5rem;
    background: none;
    border: none;
}

.custom-modal .close:hover {
    color: #f87171;
}

.loading-relative {
    position: relative;
}
.loading-box {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}
.loading {
    display: flex;
    gap: 5px;
}
.span1, .span2, .span3 {
    width: 10px;
    height: 10px;
    background: #007bff;
    border-radius: 50%;
    animation: bounce 0.6s infinite alternate;
}
.span2 { animation-delay: 0.2s; }
.span3 { animation-delay: 0.4s; }
@keyframes bounce {
    to { transform: translateY(-10px); }
}

/* Dropdown menu */
.dropdown-menu {
    font-size: 13px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    padding: 4px 0;
}

.dropdown-item {
    padding: 6px 12px;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

.dropdown-item i {
    width: 18px;
    text-align: center;
    margin-right: 8px;
}

.dropdown-divider {
    margin: 4px 0;
}

#chat-viewer-details {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px 4px 18px;
    background: #18191c;
    border-bottom: 1px solid #232323;
    margin-bottom: 10px;
    border-radius: 10px;
    min-height: 44px;
}
#chat-viewer-details .viewer-label {
    color: #aaa;
    font-size: 14px;
    font-weight: 500;
    margin-right: 2px;
}
#viewer-avatars {
    display: flex;
    align-items: center;
    gap: 6px;
}
.viewer-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #232323;
    box-shadow: 0 1px 4px #0002;
    transition: transform 0.15s, box-shadow 0.15s;
    background: #222;
    cursor: pointer;
}
.viewer-avatar:hover {
    transform: scale(1.08);
    box-shadow: 0 2px 8px #0005;
    z-index: 2;
}
.viewer-avatar-guest {
    cursor: default;
    opacity: 0.7;
}
#viewer-more {
    color: #aaa;
    font-size: 13px;
    margin-left: 4px;
}
#toggle-online-users {
    background: #141d27;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 15px;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s;
}
#toggle-online-users:hover {
    background: #333;
}
#online-users-count, #online-users-count-sidebar {
    background: #57666d;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}
#chat-online-users {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
    width: 253px;
    background: rgba(0, 0, 0, 0.4); /* semi-transparent background */
    color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.37);
    backdrop-filter: blur(10px); /* frosted glass effect */
    -webkit-backdrop-filter: blur(10px); /* Safari support */
    border: 1px solid rgba(255, 255, 255, 0.15); /* subtle border */
    display: none;
}
#chat-online-users .sidebar-header {
    padding: 12px 16px;
    border-bottom: 1px solid #222;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
#online-users-list {
    max-height: 350px;
    overflow-y: auto;
    padding: 8px 0;
}
.sidebar-user-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px;
    transition: background 0.15s;
    border-radius: 6px;
}
.sidebar-user-row:hover {
    background: #232323;
}
.sidebar-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    background: #222;
    border: 1.5px solid #232323;
}
.sidebar-user-link {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s;
}
.sidebar-user-link:hover {
    color: #6cf;
}
.sidebar-user-guest {
    color: #aaa;
    font-family: 'Roboto', sans-serif;
}

.avatar-wrapper {
    position: relative;
    display: inline-block;
}

.sidebar-user-avatar {
    width: 40px; /* Adjust as needed */
    height: 40px;
    border-radius: 50%;
}

.online-status {
    position: absolute;
    bottom: 3px;
    right: 3px;
    width: 10px;
    height: 10px;
    background-color: #00e676; /* green light */
    border: 2px solid #fff; /* border to look clean */
    border-radius: 50%;
}
