/* ===========================================
   Dashboard / Feed Page Styles
   =========================================== */

/* Dashboard Container */
.dashboard-container {
    flex: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 24px 16px;
    width: 100%;
    background: white;
    min-height: 100%;
}

/* Dashboard Header */
.dashboard-header {
    margin-bottom: 24px;
}

.dashboard-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.dashboard-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 8px 0;
}

.dashboard-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0;
}

.btn-create-post {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 15px;
    transition: background 0.2s;
    white-space: nowrap;
}

.btn-create-post:hover {
    background: var(--primary-dark);
}

/* Feed Container */
.feed-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Feed Item Card */
.feed-item {
    display: flex;
    align-items: flex-start;
    background: white;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: transform 0.1s, box-shadow 0.2s;
}

.feed-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Feed Item Avatar */
.feed-item-avatar {
    width: 48px;
    height: 48px;
    border-radius: 24px;
    overflow: hidden;
    background: var(--primary-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    flex-shrink: 0;
}

.feed-item-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feed-item-avatar .avatar-initials {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
}

/* Feed Item Content */
.feed-item-content {
    flex: 1;
    min-width: 0;
}

.feed-item-body {
    font-size: 16px;
    color: var(--text);
    margin: 0 0 12px 0;
    line-height: 1.5;
}

.feed-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 14px;
    color: var(--text-secondary);
}

.feed-item-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.feed-item-meta-item .mdi {
    font-size: 16px;
}

.feed-item-chevron {
    color: var(--text-light);
    font-size: 24px;
    margin-left: 8px;
    align-self: center;
}

/* Feed Type Badge */
.feed-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.feed-type-badge.quote {
    background: var(--primary-soft);
    color: var(--primary);
}

.feed-type-badge.post {
    background: rgba(34, 197, 94, 0.1);
    color: rgb(34, 197, 94);
}

/* Loading Spinner */
.feed-loading {
    display: flex;
    justify-content: center;
    padding: 24px;
}

.feed-loading .mdi {
    font-size: 24px;
    color: var(--primary);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* End of Feed */
.feed-end {
    text-align: center;
    padding: 24px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Empty State */
.dashboard-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.dashboard-empty .mdi {
    font-size: 64px;
    color: var(--primary-soft);
    margin-bottom: 16px;
}

.dashboard-empty-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 8px 0;
}

.dashboard-empty-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0 0 24px 0;
}

.dashboard-empty-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.dashboard-empty-actions .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}

.dashboard-empty-actions .btn-primary:hover {
    background: var(--primary-dark);
}

.dashboard-empty-actions .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}

.dashboard-empty-actions .btn-secondary:hover {
    background: var(--primary-soft);
}

/* Post Feed Item Styles */
.post-feed-item .feed-item-content {
    display: flex;
    flex-direction: column;
}

.post-feed-item .feed-type-badge {
    align-self: flex-start;
}

.post-media-preview {
    position: relative;
    width: 100%;
    max-height: 300px;
    margin-bottom: 12px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--background);
}

.post-media-image,
.post-media-video {
    width: 100%;
    height: 100%;
    max-height: 300px;
    object-fit: cover;
    display: block;
}

.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.media-count-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Post Feed Item Card Styles */
.post-feed-item-card {
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.post-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.post-author-info-compact {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.post-author-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.post-meta-compact {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.media-carousel-feed {
    position: relative;
    width: 100%;
    background: transparent;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.media-carousel-feed .carousel-items {
    width: 100%;
    height: 100%;
    position: relative;
}

.media-carousel-feed .carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-carousel-feed .carousel-item.active {
    opacity: 1;
    z-index: 1;
}

.media-carousel-feed .carousel-image,
.media-carousel-feed .carousel-video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.media-carousel-feed .carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
}

.media-carousel-feed .carousel-arrow:hover {
    background: rgba(0, 0, 0, 0.8);
}

.media-carousel-feed .carousel-arrow.left {
    left: 16px;
}

.media-carousel-feed .carousel-arrow.right {
    right: 16px;
}

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

.media-carousel-feed .indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.2s;
}

.media-carousel-feed .indicator.active {
    background: white;
}

.post-body-feed {
    padding: 20px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.quote-context-feed {
    padding: 0 20px 20px 20px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
    font-style: italic;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.post-footer-feed {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--background);
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.comments-section-feed {
    padding: 16px 20px;
}

.comments-header-feed {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.comments-list-feed {
    margin-bottom: 12px;
}

.comment-item-feed {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.comment-item-feed:last-child {
    border-bottom: none;
}

.comment-avatar-feed {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--primary-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.comment-avatar-feed img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-avatar-feed .avatar-initials {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
}

.comment-content-feed {
    flex: 1;
    min-width: 0;
}

.comment-author-feed {
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
    margin-bottom: 2px;
}

.comment-body-feed {
    font-size: 14px;
    color: var(--text);
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.comment-actions-feed {
    display: flex;
    gap: 0;
    flex-shrink: 0;
}

.comment-delete-btn-feed {
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-light);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}

.comment-delete-btn-feed:hover {
    background: rgba(220, 38, 38, 0.1);
    color: rgb(220, 38, 38);
}

.comment-delete-btn-feed:focus {
    outline: none;
}

.comment-edit-btn-feed {
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-light);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}

.comment-edit-btn-feed:hover {
    background: rgba(59, 130, 246, 0.1);
    color: rgb(59, 130, 246);
}

.comment-edit-btn-feed:focus {
    outline: none;
}

.comment-form-feed {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.comment-input-feed {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    transition: border-color 0.2s;
}

.comment-input-feed:focus {
    outline: none;
    border-color: var(--primary);
}

.comment-submit-btn-feed {
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.comment-submit-btn-feed:hover {
    background: var(--primary-dark);
}

.comment-submit-btn-feed:focus {
    outline: none;
}

.view-full-post-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border-top: 1px solid var(--border);
    transition: background 0.2s;
}

.view-full-post-link:hover {
    background: var(--primary-soft);
}

/* Responsive Dashboard Header */
@media (max-width: 640px) {
    .dashboard-header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .btn-create-post {
        width: 100%;
        justify-content: center;
    }
}
/* ===========================================
   Image Modal Viewer
   =========================================== */

.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.image-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1;
}

.image-modal-content {
    position: relative;
    z-index: 2;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-content img {
    max-width: 100%;
    max-height: 95vh;
    object-fit: contain;
    border-radius: 8px;
}

.image-modal-close {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    color: #1f2937;
    transition: background 0.2s, transform 0.2s;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.image-modal-close:hover {
    background: white;
    transform: scale(1.1);
}

.image-modal-close:active {
    transform: scale(0.95);
}

/* ===========================================
   Like Button Styles
   =========================================== */

.engagement-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    border-top: 1px solid #e5e7eb;
    margin-top: 12px;
}

.like-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.like-btn:hover {
    background: #fef2f2;
    border-color: #fca5a5;
}

.like-btn[data-liked="true"] {
    background: #fef2f2;
    border-color: #ef4444;
    color: #dc2626;
}

.like-btn[data-liked="true"] .mdi-heart {
    color: #ef4444;
}

.like-btn .mdi-heart-outline {
    color: #9ca3af;
    font-size: 20px;
}

.like-btn .mdi-heart {
    color: #ef4444;
    font-size: 20px;
}

.like-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.like-count {
    font-weight: 600;
    min-width: 16px;
    text-align: center;
}

/* Compact like button for feed card headers */
.like-btn-compact {
    padding: 6px 10px;
    font-size: 13px;
    margin-left: auto;
}

.like-btn-compact .mdi {
    font-size: 18px;
}

/* Heartbeat Animation */
@keyframes heartbeat {
    0% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.3);
    }
    50% {
        transform: scale(1);
    }
    75% {
        transform: scale(1.15);
    }
    100% {
        transform: scale(1);
    }
}

/* ===========================================
   Recipe Feed Item Styles
   =========================================== */

/* Card type color indicators */
.recipe-feed-item {
    border-left: 4px solid var(--primary);
}

.recipe-feed-item .media-carousel-feed {
    aspect-ratio: unset;
    height: 200px;
}

.recipe-feed-item .media-carousel-feed .carousel-image,
.recipe-feed-item .media-carousel-feed .carousel-video {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.event-feed-item {
    border-left: 4px solid #3b82f6;
}

.post-feed-item-card[data-post-id] {
    border-left: 4px solid #22c55e;
}

.post-feed-item-card[data-quote-id] {
    border-left: 4px solid #a855f7;
}

.recipe-feed-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    padding: 12px 16px 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.recipe-feed-title .mdi {
    color: var(--primary);
    font-size: 20px;
}

.recipe-feed-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0 16px 8px;
}

.recipe-feed-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--text-light);
}

.recipe-feed-meta-item .mdi {
    font-size: 14px;
}

.recipe-feed-meta-item.recipe-difficulty-easy {
    color: #22c55e;
}

.recipe-feed-meta-item.recipe-difficulty-medium {
    color: #f59e0b;
}

.recipe-feed-meta-item.recipe-difficulty-hard {
    color: #ef4444;
}
