/**
 * Post Card Styles - Facebook-like Design
 * Enhanced styling for community posts
 */

/* Post Card Container */
.post-card {
    transition: box-shadow 0.2s ease;
}

.post-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Facebook-like Reactions */
.reaction-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-center;
    font-size: 10px;
}

/* Media Slider Styles */
.swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}

.swiper-button-next,
.swiper-button-prev {
    transition: all 0.3s ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    transform: scale(1.1);
}

.swiper-pagination-bullet {
    width: 6px;
    height: 6px;
    background: white;
    opacity: 0.6;
    transition: all 0.2s ease;
    margin: 0 3px !important;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    width: 6px;
    background: #1877f2;
}

/* Poll Styles - Facebook-like */
.poll-option-bar {
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.poll-option input[type="radio"]:checked + span,
.poll-option input[type="checkbox"]:checked + span {
    font-weight: 600;
    color: #1877f2;
}

/* Image Popup Styles */
#image-popup {
    animation: fadeIn 0.3s ease;
}

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

#image-popup img {
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Comment Textarea Auto-resize */
textarea {
    min-height: 42px;
    max-height: 200px;
    overflow-y: auto;
}

/* Action Button Hover Effects */
.post-action-btn {
    position: relative;
    overflow: hidden;
}

.post-action-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(14, 165, 233, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.post-action-btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Like Animation */
@keyframes heartBeat {
    0% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.3);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.liked-animation {
    animation: heartBeat 0.5s ease;
}

/* Dropdown Menu */
.dropdown-menu {
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Media Counter Badge */
.media-counter {
    backdrop-filter: blur(10px);
}

/* Comment Item Hover */
.comment-item {
    transition: all 0.2s ease;
}

.comment-item:hover {
    background: rgba(249, 250, 251, 0.5);
}

/* Loading Spinner */
.spinner {
    border: 2px solid #f3f4f6;
    border-top: 2px solid #0ea5e9;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 0.8s linear infinite;
}

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

/* Notification Toast */
.notification-toast {
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Post Content Expandable */
.post-content {
    position: relative;
}

.post-content.truncated::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(transparent, white);
}

/* Modal Overlay */
.modal-overlay {
    backdrop-filter: blur(4px);
}

/* Responsive Media Queries */
@media (max-width: 640px) {
    .swiper-button-next,
    .swiper-button-prev {
        width: 32px !important;
        height: 32px !important;
    }
    
    .swiper-button-next::after,
    .swiper-button-prev::after {
        font-size: 16px !important;
    }
    
    .media-counter {
        font-size: 12px;
        padding: 4px 8px;
    }
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Video Player Controls */
video::-webkit-media-controls-panel {
    background-image: linear-gradient(transparent, rgba(0, 0, 0, 0.5));
}

/* Share Modal Styles */
.share-option {
    transition: all 0.2s ease;
}

.share-option:hover {
    transform: translateX(5px);
}

/* Bookmark Button Animation */
.bookmark-active {
    animation: bookmarkPulse 0.5s ease;
}

@keyframes bookmarkPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* Comment Count Badge */
.comment-badge {
    position: relative;
}

.comment-badge::after {
    content: attr(data-count);
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
}

/* Post Stats Separator */
.stats-separator {
    width: 1px;
    height: 16px;
    background: #e5e7eb;
}

/* Hover Effects for Interactive Elements */
.interactive-element {
    transition: all 0.2s ease;
}

.interactive-element:active {
    transform: scale(0.95);
}

/* Focus Visible for Accessibility */
*:focus-visible {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Avatar Gradient Backgrounds */
.avatar-gradient-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.avatar-gradient-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.avatar-gradient-3 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.avatar-gradient-4 {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.avatar-gradient-5 {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

/* Emoji Picker Button (if you add emoji support) */
.emoji-picker-btn {
    transition: transform 0.2s ease;
}

.emoji-picker-btn:hover {
    transform: scale(1.1);
}

/* Poll Styles (if you have polls) */
.poll-option {
    cursor: pointer;
    transition: all 0.2s ease;
}

.poll-option:hover {
    background: #f3f4f6;
    transform: translateX(4px);
}

.poll-progress {
    transition: width 0.5s ease;
}

/* Tag/Category Badge */
.post-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.post-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Verified Badge */
.verified-badge {
    color: #3b82f6;
}

/* Time Ago Hover */
.time-ago:hover {
    text-decoration: underline;
}

/* Mention Highlight */
.mention {
    color: #0ea5e9;
    font-weight: 600;
    cursor: pointer;
}

.mention:hover {
    text-decoration: underline;
}

/* Hashtag Styles */
.hashtag {
    color: #0ea5e9;
    font-weight: 500;
    cursor: pointer;
}

.hashtag:hover {
    text-decoration: underline;
}

/* Read More Button Animation */
.read-more-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.read-more-btn i {
    transition: transform 0.3s ease;
}

.read-more-btn:hover i {
    transform: translateY(2px);
}

/* Event Card Styles */
.event-card {
    border-left: 4px solid #0ea5e9;
    transition: all 0.2s ease;
}

.event-card:hover {
    border-left-color: #0284c7;
    background: #f0f9ff;
}

/* Facebook-like Action Buttons */
.action-button {
    transition: background-color 0.1s ease;
}

.action-button:hover {
    background-color: #f2f3f5;
}

.action-button:active {
    transform: scale(0.98);
}

/* Like Button Animation */
.like-button.liked {
    animation: likeAnimation 0.4s ease;
}

@keyframes likeAnimation {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* Comment Bubbles - Facebook Style */
.comment-bubble {
    background-color: #f0f2f5;
    border-radius: 18px;
    max-width: 100%;
}

.comment-bubble:hover {
    background-color: #e4e6e9;
}

/* Dropdown Menu Animation */
.dropdown-menu {
    animation: dropdownFade 0.15s ease-out;
    transform-origin: top right;
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-5px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Poll Results Bar - Facebook Style */
.poll-result-bar {
    background: linear-gradient(90deg, #1877f2 0%, #4599ff 100%);
    border-radius: 8px;
}

.poll-result-bar.winning {
    background: linear-gradient(90deg, #1877f2 0%, #0c5fcc 100%);
}

.poll-result-bar.not-winning {
    background: linear-gradient(90deg, #9ca3af 0%, #6b7280 100%);
}

/* Avatar Styles */
.user-avatar {
    object-fit: cover;
    flex-shrink: 0;
}

/* Hover Effects for Interactive Elements */
.interactive-hover:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s ease;
}

/* Focus States for Accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #1877f2;
    outline-offset: 2px;
}

/* Notification Toast - Facebook Style */
.notification-toast {
    animation: slideInDown 0.3s ease-out;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Spinner Animation */
@keyframes spinLoader {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.spinner {
    animation: spinLoader 0.8s linear infinite;
}

/* Responsive Adjustments */
@media (max-width: 640px) {
    .post-card {
        margin-bottom: 8px;
        border-radius: 0;
    }

    .action-button span {
        font-size: 13px;
    }

    .comment-bubble {
        font-size: 13px;
    }
}
