﻿/* Feed Styles for Craft Review */
:root {
    --primary-color: #8b4513;
    --secondary-color: #d2691e;
    --accent-color: #f4a460;
    --light-color: #f5f5f5;
    --dark-color: #333;
    --error-color: #cc0000;
    --success-color: #009900;
    --radius: 8px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Feed Container */
.feed-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 16px;
}

/* Loading Indicator */
.feed-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 0;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--light-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* End of Feed */
.end-of-feed {
    text-align: center;
    padding: 32px 0;
    color: #777;
}

.refresh-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius);
    cursor: pointer;
    margin-top: 8px;
}

.refresh-button:hover {
    background-color: var(--secondary-color);
}

/* Feed Items */
.feed-items {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.feed-item {
    background-color: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.feed-item-header {
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #ddd;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23999"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>');
    background-size: 60%;
    background-position: center;
    background-repeat: no-repeat;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.username {
    font-weight: bold;
    font-size: 0.9rem;
}

.timestamp {
    font-size: 0.8rem;
    color: #777;
}

.venue-info {
    text-align: right;
}

.venue-name {
    font-weight: bold;
    font-size: 0.9rem;
    color: var(--primary-color);
}

.venue-location {
    font-size: 0.8rem;
    color: #777;
}

.feed-item-venue-photo {
    width: 100%;
    height: 300px;
    background-color: #f0f0f0;
    overflow: hidden;
}

.feed-item-venue-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feed-item-actions {
    display: flex;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.feed-item-actions button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-right: 16px;
}

.feed-item-actions button svg {
    width: 24px;
    height: 24px;
    stroke: var(--dark-color);
    transition: all 0.2s ease;
}

.feed-item-actions button:hover svg {
    stroke: var(--primary-color);
}

.action-like.active svg {
    fill: var(--primary-color);
    stroke: var(--primary-color);
}

.feed-item-content {
    padding: 16px;
}

.venue-rating {
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.venue-rating::before {
    content: "★";
    margin-right: 4px;
}

.venue-review {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 12px;
}

.feed-item-products {
    padding: 0 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.product-review {
    display: flex;
    background-color: #f9f9f9;
    border-radius: var(--radius);
    overflow: hidden;
}

.product-photo {
    width: 80px;
    height: 80px;
    overflow: hidden;
    flex-shrink: 0;
    background-color: #eee;
}

.product-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-details {
    flex: 1;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-name {
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.product-category {
    font-size: 0.8rem;
    color: #777;
    margin-bottom: 4px;
}

.product-rating {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
}

.product-rating::before {
    content: "★";
    margin-right: 4px;
}

.product-quick-take {
    font-size: 0.85rem;
    font-style: italic;
    color: #555;
    margin-top: 4px;
}

.feed-item-comments {
    padding: 12px 16px;
    border-top: 1px solid #f0f0f0;
}

.comment-count {
    font-size: 0.85rem;
    color: #777;
    cursor: pointer;
}

.comment-count:hover {
    color: var(--primary-color);
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
    text-decoration: none;
}

.fab:hover {
    transform: scale(1.05);
    background-color: var(--secondary-color);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

.fab:active {
    transform: scale(0.95);
}

.fab svg {
    width: 24px;
    height: 24px;
}

/* Responsive Adjustments */
@media (max-width: 600px) {
    .feed-container {
        padding: 8px;
    }
    
    .feed-item-venue-photo {
        height: 250px;
    }
    
    .feed-item-actions button {
        padding: 6px;
        margin-right: 12px;
    }
    
    .fab {
        bottom: 16px;
        right: 16px;
    }
}

@media (max-width: 400px) {
    .feed-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .venue-info {
        text-align: left;
    }
    
    .feed-item-venue-photo {
        height: 200px;
    }
}