/**
 * Community Styles
 *
 * @package CrowdOrigin_Community
 */

.co-community-gallery {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.co-gallery-header {
    margin-bottom: 30px;
    text-align: center;
}

.co-gallery-header h1 {
    font-size: 2em;
    margin-bottom: 20px;
}

.co-gallery-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.co-filter-btn {
    padding: 10px 20px;
    background: #f0f0f0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.co-filter-btn:hover {
    background: #e0e0e0;
}

.co-filter-btn.active {
    background: #0073aa;
    color: #fff;
}

.co-gallery-grid {
    min-height: 400px;
}

.co-works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.co-work-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.co-work-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.co-work-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.co-work-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: #fff;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.co-work-item:hover .co-work-overlay {
    transform: translateY(0);
}

.co-work-overlay h3 {
    margin: 0 0 10px 0;
    font-size: 1.2em;
}

.co-work-stats {
    display: flex;
    gap: 15px;
    font-size: 0.9em;
}

.co-gallery-pagination {
    text-align: center;
    margin-top: 30px;
}

.co-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.co-page-btn {
    padding: 8px 16px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.co-page-btn:hover {
    background: #005a87;
}

/* Work Detail */
.co-work-detail {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.co-work-header {
    margin-bottom: 30px;
}

.co-back-link {
    display: inline-block;
    margin-bottom: 15px;
    color: #0073aa;
    text-decoration: none;
}

.co-work-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.co-work-images {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

.co-work-main-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.co-work-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.co-work-thumbnails img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.co-work-thumbnails img:hover {
    opacity: 1;
}

.co-work-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.co-work-author {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.co-author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.co-work-stats {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.co-stat-item {
    text-align: center;
}

.co-stat-value {
    display: block;
    font-size: 1.5em;
    font-weight: bold;
    color: #0073aa;
}

.co-stat-label {
    display: block;
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

.co-work-description,
.co-work-tags,
.co-work-product,
.co-related-products {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.co-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.co-tag {
    padding: 5px 12px;
    background: #0073aa;
    color: #fff;
    border-radius: 20px;
    font-size: 0.9em;
}

.co-product-card {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.co-product-card img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

.co-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.co-product-item {
    text-align: center;
}

.co-product-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
}

/* Publish Work Form */
.co-publish-work {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.co-publish-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.co-form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.co-form-field label {
    font-weight: 500;
}

.co-form-field .required {
    color: #e74c3c;
}

.co-form-field input[type="text"],
.co-form-field input[type="url"],
.co-form-field input[type="number"],
.co-form-field textarea,
.co-form-field select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.co-image-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.co-image-item input {
    flex: 1;
}

/* Loading and Error States */
.co-loading,
.co-error,
.co-no-works {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Interaction Styles */
.co-work-actions {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.co-action-btn {
    flex: 1;
    padding: 12px 20px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
    font-size: 14px;
}

.co-action-btn:hover {
    border-color: #0073aa;
    background: #f0f8ff;
}

.co-action-btn .co-icon {
    font-size: 18px;
}

.co-action-btn.co-liked .co-icon {
    color: #e74c3c;
}

.co-action-btn.co-favorited .co-icon {
    color: #f39c12;
}

.co-share-dropdown {
    position: absolute;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    margin-top: 5px;
    z-index: 1000;
    min-width: 150px;
}

.co-share-link {
    display: block;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
}

.co-share-link:hover {
    background: #f0f0f0;
}

/* Comments Styles */
.co-work-comments {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.co-comment-form {
    margin-bottom: 20px;
}

.co-comment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    margin-bottom: 10px;
}

.co-comments-list {
    margin-top: 20px;
}

.co-comments {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.co-comment-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: #fff;
    border-radius: 6px;
}

.co-comment-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
}

.co-comment-content {
    flex: 1;
}

.co-comment-author {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.co-comment-text {
    color: #666;
    margin-bottom: 5px;
    line-height: 1.5;
}

.co-comment-date {
    font-size: 0.85em;
    color: #999;
}

.co-no-comments {
    text-align: center;
    padding: 40px;
    color: #999;
}

.co-login-prompt {
    text-align: center;
    padding: 20px;
    color: #666;
}

.co-login-prompt a {
    color: #0073aa;
    text-decoration: none;
}

.co-login-prompt a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .co-work-content {
        grid-template-columns: 1fr;
    }
    
    .co-works-grid {
        grid-template-columns: 1fr;
    }
    
    .co-products-grid {
        grid-template-columns: 1fr;
    }
    
    .co-work-actions {
        flex-direction: column;
    }
    
    .co-action-btn {
        width: 100%;
    }
}
