/* NewLIST Post Styles */

/* Global scrollbar hiding for all post-related scrollable content */
.post-item *::-webkit-scrollbar,
.post-content *::-webkit-scrollbar,
.post-media *::-webkit-scrollbar,
.media-carousel-container *::-webkit-scrollbar {
    display: none;
}

.post-item *,
.post-content *,
.post-media *,
.media-carousel-container * {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* Post Form Modal */
#post-form-modal .modal-dialog {
    max-width: 800px;
}

#post-form-modal textarea {
    resize: vertical;
    min-height: 120px;
}

.media-preview-container {
    margin-top: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    min-height: 50px;
    border: 2px dashed #dee2e6;
}

.media-preview-container:empty::before {
    content: "Media previews will appear here";
    color: #6c757d;
    font-style: italic;
    display: block;
    text-align: center;
    padding: 20px;
}

.media-preview-item {
    display: inline-block;
    margin: 5px;
    padding: 8px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    text-align: center;
    vertical-align: top;
}

.media-preview-item img {
    display: block;
    margin: 0 auto 5px;
}

.media-info {
    font-size: 11px;
    color: #6c757d;
    max-width: 150px;
    word-break: break-word;
}

/* Post Items in Search Results */
.post-item {
    margin-bottom: 20px;
}

.post-item .portfolio-item {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(var(--primary-rgb), 0.08),
    0 2px 4px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
    width: 100%;
}

/* Enhanced visibility with subtle gradient background */
.post-item .portfolio-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
    rgba(var(--primary-rgb), 0.02) 0%,
    rgba(var(--secondary-rgb), 0.01) 100%);
    z-index: 0;
    pointer-events: none;
}

/* REMOVED enhanced drop shadow on hover - kept simple */
.post-item .portfolio-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Post Header */
.post-header {
    /*border-bottom: 1px solid var(--border-color);*/
    /*padding-bottom: 15px;*/
    /*margin-bottom: 15px;*/
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.post-meta .text-muted {
    font-size: 13px;
    color: var(--secondary-color);
}

.post-meta .fa-thumb-tack {
    margin-left: 8px;
    color: var(--quaternary-color);
}

.post-title {
    color: var(--text-color);
    font-weight: 600;
}

/* Post Body */
.post-body {
    line-height: 1.6;
}

.post-text {
    margin-bottom: 15px;
    color: var(--text-color);
}

.post-text p {
    margin-bottom: 10px;
}

.post-text p:last-child {
    margin-bottom: 0;
}

/* Post Media */
.post-media {
    margin: 15px 0;
    width: 100%;
    max-height: 60vh;
    overflow-y: auto;
    /* Hide scrollbars */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.post-media::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.post-media .media-item {
    display: block;
    margin: 5px 0;
    border-radius: 6px;
    overflow-y: auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    width: 100%;
    max-height: 60vh;
    /* Hide scrollbars */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.post-media .media-item::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.post-media .media-item img {
    width: 100%;
    max-height: 60vh;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.post-media .media-item img:hover {
    transform: scale(1.05);
}

/* Single image takes full width */
.post-media .media-item:only-child img {
    width: 100%;
    max-height: 60vh;
    object-fit: contain;
    overflow-y: auto;
}

/* Post Footer */
.post-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
    margin-top: 15px;
}

/* UPDATED: Vertically center action buttons */
.post-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-start;
    min-height: 36px; /* Ensure consistent height for centering */
}

/* Update Post Action Buttons */
.post-actions .btn {
    padding: 6px 12px;
    font-size: 13px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--secondary-color);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.post-actions .btn:hover {
    background: var(--card-bg);
    color: var(--primary-color);
    border-color: var(--border-color);
}

.post-actions .btn.active {
    color: var(--primary-color);
    background: var(--card-bg);
    border-color: var(--border-color);
}

.post-actions .btn i {
    margin-right: 5px;
}

/* Update Post Control Buttons */
.post-controls .btn {
    margin-left: 5px;
    padding: 4px 8px;
    font-size: 12px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--secondary-color);
    transition: all 0.3s ease;
}

.post-controls .btn:hover {
    background: var(--card-bg);
    color: var(--primary-color);
    border-color: var(--border-color);
}

.post-controls .btn-danger {
    border-color: var(--border-color);
    color: var(--danger-color);
}

.post-controls .btn-danger:hover {
    background: var(--card-bg);
    color: var(--danger-color);
    border-color: var(--border-color);
}

/* Post Status Indicators */
.post-item[data-status="pending"] .portfolio-item {
    border-left: 4px solid var(--quaternary-color);
}

.post-item[data-status="flagged"] .portfolio-item {
    border-left: 4px solid var(--danger-color);
}

.post-item[data-pinned="1"] .portfolio-item {
    border-left: 4px solid var(--tertiary-color);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .channel-controls {
        text-align: center;
    }

    .channel-controls .controls-label {
        display: block;
        margin-bottom: 10px;
    }

    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .post-controls {
        align-self: flex-end;
    }

    .post-actions {
        justify-content: space-around;
    }

    .post-actions .btn {
        flex: 1;
        text-align: center;
    }

    .post-media .media-item img {
        width: 100%;
        max-height: 50vh;
        object-fit: contain;
    }

    .media-preview-item {
        margin: 3px;
        padding: 5px;
    }

    .media-preview-item img {
        max-width: 100px !important;
        max-height: 100px !important;
    }
}

/* Form Enhancements */
.form-group label {
    font-weight: 600;
    color: var(--text-color);
}

/* Update Form Controls in Modal */
#postFormModal .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: none;
    outline: none;
}

/* Update Alert Colors */
.alert-success {
    background-color: rgba(var(--tertiary-rgb), 0.1);
    color: var(--tertiary-color);
    border-color: var(--tertiary-color);
}

.alert-danger {
    background-color: rgba(var(--danger-color), 0.1);
    color: var(--danger-color);
    border-color: var(--danger-color);
}

/* Loading States */
.btn .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Post Transitions */
.post-item {
    transition: all 0.3s ease;
}

.post-item.removing {
    opacity: 0;
    transform: translateY(-20px);
}

/* Empty State */
.posts-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--secondary-color);
}

.posts-empty i {
    font-size: 48px;
    margin-bottom: 15px;
    color: var(--border-color);
}

.posts-empty h4 {
    margin-bottom: 10px;
    color: var(--text-color);
}

/* Update Channel Owner Badge */
.channel-owner-badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}

/* Post Content Formatting */
.post-text blockquote {
    border-left: 4px solid var(--primary-color);
    margin: 15px 0;
    padding: 10px 15px;
    background: rgba(var(--primary-rgb), 0.05);
    font-style: italic;
}

.post-text ul, .post-text ol {
    margin: 10px 0;
    padding-left: 20px;
}

.post-text pre {
    background: rgba(var(--secondary-rgb), 0.05);
    padding: 10px;
    border-radius: 4px;
    overflow-x: auto;
    font-size: 13px;
}

/* Update Hashtag and Mention Styling */
.post-text .hashtag {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-text .hashtag:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.post-text .mention {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.post-text .mention:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Update Post Text Links */
.post-text a {
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.post-text a:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

/* Post Modal Specific Styles */
#postFormModal .modal-lg {
    width: 800px;
}

#postFormModal .form-group label {
    font-weight: 600;
    margin-bottom: 8px;
}

#postFormModal textarea {
    resize: vertical;
    min-height: 100px;
}

#postFormModal .text-danger {
    color: var(--danger-color) !important;
}

#postFormModal .modal-body {
    padding: 30px;
}

#postFormModal .modal-footer {
    padding: 20px 30px;
}

/* Update Channel Controls Button */
#open-post-form {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transition: all 0.3s ease;
}

#open-post-form:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
}

/* Update Post Modal Buttons */
#post-form-submit {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transition: all 0.3s ease;
}

#post-form-submit:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
}

/* Mobile responsiveness for modal */
@media (max-width: 768px) {
    #postFormModal .modal-lg {
        width: 95%;
        margin: 10px auto;
    }

    #postFormModal .modal-body {
        padding: 20px 15px;
    }

    #postFormModal .modal-footer {
        padding: 15px;
    }

    .post-dropzone {
        padding: 30px 15px;
    }

    .post-dropzone .dz-icon {
        font-size: 36px;
    }
}

/* Post content styling for half-size layout */
.post-item .post-content {
    height: auto;
    min-height: 200px;
    padding: 20px !important;
    background-color: var(--card-bg) !important;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    /*margin-bottom: 30px;*/
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1;
}

.post-item .post-title {
    margin: 15px 0 10px;
}

.post-item .post-text {
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 10px;
}


/* Update Show More Button */
.post-item .show-more-btn {
    padding: 2px 0;
    font-size: 12px;
    margin-top: 5px;
    color: var(--primary-color);
    background: transparent;
    border: none;
    transition: all 0.3s ease;
}

.post-item .show-more-btn:hover {
    color: var(--primary-dark);
    background: transparent;
    text-decoration: none;
}

.post-item .post-media img {
    width: 100%;
    max-height: 60vh;
    object-fit: contain;
}

.post-item .post-actions {
    /*margin-top: 8px;*/
}

.post-item .post-actions .btn {
    font-size: 11px;
    padding: 4px 8px;
    margin-right: 5px;
}

.post-item .post-meta {
    margin-bottom: 8px;
}

.post-item .post-meta small {
    font-size: 10px;
}

.post-item .post-controls .btn {
    padding: 2px 4px;
    margin-left: 2px;
}

/* Smooth transitions for post content */
.post-item .post-text {
    transition: all 0.5s ease-in-out;
}

.post-item .post-text h1 {
    font-weight: 400;
    margin: 0 0 0 0;
}

#comments-modal .post-text-container .post-text h1 {
    font-size: 2.2em;
    font-weight: 400;
    line-height: 1em;
    margin: 0 0 10px 0;
}

.post-item .post-text.truncated {
    max-height: 150px;
    position: relative;
    overflow: hidden;
}

.post-item .post-text.expanded {
    max-height: none;
}

/* FIXED: Fade-out effect using card background for both light and dark mode */
.post-item .post-text.truncated::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(transparent, var(--card-bg));
    pointer-events: none;
    transition: opacity 0.5s ease-in-out;
}

.post-item .post-text.expanded::after {
    opacity: 0;
}

/* Smooth height transition for the entire text container */
.post-item .post-text-container {
    transition: height 0.5s ease-in-out;
    margin-top: 10px;
}

/* Animate the chevron icon rotation */
.post-item .show-more-btn i {
    transition: transform 0.3s ease-in-out;
}

.post-item .show-more-btn[aria-expanded="true"] i {
    transform: rotate(180deg);
}

/**/

/* Post styles for better display */

.channel-info {
    margin-bottom: 5px;
}

.channel-info a {
    color: #337ab7;
    text-decoration: none;
}

.channel-info a:hover {
    text-decoration: underline;
}

.post-text {
    margin-bottom: 10px;
    line-height: 1.6;
}

.post-text.truncated {
    max-height: 100px;
    overflow: hidden;
    position: relative;
}

.post-text.expanded {
    max-height: none;
}

.show-more-btn {
    padding: 0;
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}

.show-more-btn:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

.post-media {
    margin: 0;
}

.media-item {
    margin-bottom: 5px;
}

.media-item img {
    border-radius: 4px;
    width: 100%;
    max-height: 60vh;
    object-fit: contain;
}

.post-actions {

}

.post-actions .btn {
    margin-right: 10px;
    border: none;
    background: none;
    color: #666;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.post-actions .btn:hover {
    /*background: #f5f5f5;*/
    /*color: #333;*/
}

.post-actions .btn.active,
.post-actions .btn[data-liked="true"] {
    /*color: #337ab7;*/
    /*background: #e7f3ff;*/
}

.hashtag {
    color: #337ab7;
    font-weight: 500;
}

.mention {
    color: #d9534f;
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .post-controls {
        margin-top: 5px;
    }

    .post-controls .btn {
        margin-left: 3px;
        padding: 2px 6px;
        font-size: 11px;
    }

    .post-actions .btn {
        margin-right: 5px;
        padding: 3px 8px;
        font-size: 12px;
    }
}

/* Loading indicator */
#posts-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

#posts-loading i {
    margin-right: 5px;
}

/* Comments modal styles */
#comments-modal .comment-item {
    /*border-bottom: 1px solid #eee;*/
    padding: 10px;
    margin-bottom: 10px;
}

#comments-modal .comment-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

#comments-modal .comment-header {
    margin-bottom: 5px;
}

#comments-modal .comment-text {
    color: #555;
    line-height: 1.5;
}

#comments-modal .add-comment-form textarea {
    resize: vertical;
    min-height: 80px;
}

/* Home post specific styles */
.home-post .channel-info {
    font-weight: 500;
}

.home-post .channel-info i {
    margin-right: 3px;
}

/* Follow button styles */
.follow-channel-btn {
    margin-left: 8px;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.follow-channel-btn:hover {
    /*transform: translateY(-1px);*/
    /*box-shadow: 0 2px 4px rgba(0,0,0,0.1);*/
}

.follow-channel-btn.btn-success {
    background-color: #5cb85c;
    border-color: #4cae4c;
    color: white;
}

.follow-channel-btn.btn-success:hover {
    background-color: #449d44;
    border-color: #398439;
}

.follow-channel-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.follow-channel-btn i {
    margin-right: 3px;
}

/* Responsive follow button */
@media (max-width: 768px) {
    .follow-channel-btn {
        font-size: 10px;
        padding: 1px 6px;
        margin-left: 5px;
    }

    .follow-channel-btn i {
        margin-right: 2px;
    }
}

/* Animation for follow state changes */
.follow-channel-btn.transitioning {
    animation: followPulse 0.3s ease-in-out;
}

@keyframes followPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Post Modal Specific Styles */
#postFormModal .modal-lg {
    width: 800px;
}

#postFormModal .form-group label {
    font-weight: 600;
    margin-bottom: 8px;
}

#postFormModal textarea {
    resize: vertical;
    min-height: 100px;
}

#postFormModal .text-danger {
    color: #dc3545 !important;
}

#postFormModal .modal-body {
    padding: 30px;
}

#postFormModal .modal-footer {
    padding: 20px 30px;
}

/* Drag and Drop Styles */
.post-dropzone {
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: 8px;
    background: var(--card-bg, #f8f9fa);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    position: relative;
    min-height: 120px;
    overflow: hidden;
}

.post-dropzone .dropzone-content {
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.post-dropzone:hover {
    /* Only show cursor pointer, no color change */
    cursor: pointer;
}

.post-dropzone.dragover {
    border-color: var(--primary-color, #007bff);
    background: rgba(var(--primary-rgb), 0.1);
}

.post-dropzone.has-media {
    padding: 0;
    border: none;
    background: transparent;
    cursor: default;
}

.post-dropzone.has-media .dropzone-content {
    display: none;
}

.post-dropzone .dz-icon {
    font-size: 48px;
    color: var(--secondary-color, #6c757d);
    display: block;
    margin-bottom: 10px;
}

.post-dropzone.dragover .dz-icon {
    color: var(--primary-color, #007bff);
}

.post-dropzone .dz-instructions {
    color: var(--secondary-color, #6c757d);
    font-size: 14px;
}

.post-dropzone.dragover .dz-instructions {
    color: var(--primary-color, #007bff);
    font-weight: 600;
}

/* Media Carousel Styles */
.media-carousel-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.media-swiper {
    width: 100%;
    min-height: 200px;
    max-height: 60vh;
}

.media-swiper .swiper-wrapper {
    pointer-events: none;
}

.media-swiper .swiper-slide {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
    pointer-events: auto;
}

.media-carousel-item {
    width: 100%;
    position: relative;
    background: var(--card-bg, #f8f9fa);
    border-radius: 8px;
    overflow-y: auto;
    min-height: 200px;
    max-height: 60vh;
    /* Hide scrollbars */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.media-carousel-item::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.media-carousel-item img {
    width: 100%;
    height: auto;
    max-height: 60vh;
    object-fit: contain;
    display: block;
    border-radius: 8px;
}

.media-carousel-item video {
    width: 100%;
    height: auto;
    max-height: 60vh;
    object-fit: contain;
    display: block;
    border-radius: 8px;
}

.media-carousel-item .file-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg, #f8f9fa);
    color: var(--secondary-color, #6c757d);
    font-size: 24px;
    flex-direction: column;
}

.media-carousel-item .file-placeholder i {
    font-size: 48px;
    margin-bottom: 10px;
}

.media-carousel-item .remove-media {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    z-index: 1020;
    pointer-events: auto;
    transition: all 0.3s ease;
}

.media-carousel-item .remove-media:hover {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.1);
}

.carousel-controls {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.carousel-controls .btn {
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 15px;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.carousel-controls .btn:hover {
    opacity: 1;
    transform: translateY(-1px);
}

/* Single image mode */
.post-dropzone.single-image .media-swiper {
    min-height: auto;
    max-height: none;
}

.post-dropzone.single-image .swiper-button-next,
.post-dropzone.single-image .swiper-button-prev,
.post-dropzone.single-image .swiper-pagination {
    display: none;
}

.post-dropzone.single-image .carousel-controls {
    display: none;
}

.post-dropzone.single-image .media-carousel-item {
    min-height: 200px;
}

/* Swiper Custom Styles */
.media-swiper .swiper-button-next,
.media-swiper .swiper-button-prev {
    color: white;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.media-swiper .swiper-button-next:hover,
.media-swiper .swiper-button-prev:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.media-swiper .swiper-button-next:after,
.media-swiper .swiper-button-prev:after {
    font-size: 18px;
}

.media-swiper .swiper-pagination {
    bottom: 50px;
}

.media-swiper .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
}

.media-swiper .swiper-pagination-bullet-active {
    background: white;
    transform: scale(1.2);
}

/* Post Form Media Preview Styles */
#post-media-preview {
    margin-top: 15px;
    min-height: 20px;
}

#post-media-preview .img-thumbnail {
    margin: 5px 0;
    position: relative;
    overflow: hidden;
}

#post-media-preview .remove-file,
#post-media-preview .remove-existing-image {
    position: absolute;
    top: 5px;
    right: 5px;
    padding: 2px 5px;
    font-size: 10px;
    line-height: 1;
    z-index: 10;
}

#post-media-preview .new-file,
#post-media-preview .existing-image {
    margin-bottom: 10px;
}

#post-media-preview small {
    font-size: 10px;
    color: #6c757d;
    word-break: break-word;
    max-width: 100%;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Dark mode form inputs and placeholders */
html.dark #postFormModal .form-control {
    background-color: var(--input-bg);
    color: var(--text-color);
}

html.dark #postFormModal .form-control::placeholder {
    color: var(--secondary-light);
}

html.dark #postFormModal .form-control::-webkit-input-placeholder {
    color: var(--secondary-light);
}

html.dark #postFormModal .form-control::-moz-placeholder {
    color: var(--secondary-light);
}

html.dark #postFormModal .form-control:-ms-input-placeholder {
    color: var(--secondary-light);
}

html.dark #postFormModal .form-control:-moz-placeholder {
    color: var(--secondary-light);
}

/* Mobile responsiveness for post modal */
@media (max-width: 768px) {
    #postFormModal .modal-lg {
        width: 95%;
        margin: 10px auto;
    }

    #postFormModal .modal-body {
        padding: 20px 15px;
    }

    #postFormModal .modal-footer {
        padding: 15px;
    }

    .post-dropzone {
        padding: 30px 15px;
    }

    .post-dropzone .dz-icon {
        font-size: 36px;
    }
}

/* UPDATE: Post card button hovers to use primary color */
.post-actions .btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.3);
}

.post-actions .btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.post-controls .btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(var(--primary-rgb), 0.25);
}

/* UPDATE: Channel links to use primary color */
.channel-info a {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.channel-info a:hover {
    color: var(--primary-dark);
    text-decoration: none;
    text-shadow: 0 0 8px rgba(var(--primary-rgb), 0.3);
}

/* UPDATE: Follow button to use primary color theme */
.follow-channel,
.follow-channel-btn {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transition: all 0.3s ease;
}

.follow-channel:hover,
.follow-channel-btn:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
    transform: translateY(-1px);
    /*box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.4);*/
    box-shadow: none;
}

.follow-channel.following {
    background-color: var(--tertiary-color);
    border-color: var(--tertiary-color);
    color: white;
}

.follow-channel.following:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* NEW: Post Card Styling Improvements */

/* Remove blue styling from liked buttons */
.post-actions .btn.liked {
    /*background: transparent !important;*/
    /*border-color: var(--border-color) !important;*/
    /*color: var(--text-color) !important;*/
}

.post-actions .btn.liked:hover {
    /*background: var(--card-bg) !important;*/
    /*border-color: var(--border-color) !important;*/
    /*color: var(--primary-color) !important;*/
}

/* Follow button as link styling */
.follow-channel {
    color: #666 !important;
    text-decoration: none !important;
    border: none !important;
    background: none !important;
    padding: 0 !important;
    font-size: 13px;
    transition: color 0.2s ease;
}

.follow-channel:hover {
    color: var(--primary-color) !important;
    text-decoration: none !important;
    background: none !important;
    border: none !important;
}

.follow-channel.following {
    color: var(--primary-color) !important;
    background: none !important;
    border: none !important;
}

.follow-channel.following:hover {
    color: var(--primary-dark) !important;
    background: none !important;
    border: none !important;
}



