/* Gig Marketplace Public Styles */

.gig-marketplace-profile,
.gig-marketplace-gig-create,
.gig-marketplace-gig-edit {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.profile-display {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.profile-picture {
    flex-shrink: 0;
}

.profile-picture img,
.no-picture {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.profile-info {
    flex: 1;
}

.gig-form {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.required {
    color: #d00;
}

.pricing-tier {
    background: #fff;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
}

.pricing-tier input {
    width: 100%;
    margin-bottom: 5px;
}

.remove-tier {
    background: #db2a20;
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.remove-tier:hover {
    background: #b8221a;
}

.form-actions {
    text-align: right;
    margin-top: 20px;
}

.button {
    background: #db2a20;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.button:hover {
    background: #b8221a;
}

.button.button-primary {
    background: #db2a20;
}

.button.button-secondary {
    background: #f0f0f0;
    color: #333;
}

.button.button-secondary:hover {
    background: #e0e0e0;
}

.success {
    background: #d4edda;
    color: #155724;
    padding: 10px;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    margin-bottom: 10px;
}

.error {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-bottom: 10px;
}

#thumbnail-preview img {
    max-width: 200px;
    margin-top: 10px;
}

/* Gig Listing Styles */
.gig-marketplace.gig-listing {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.gig-filters {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.filter-row {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 150px;
}

.filter-group label {
    margin-bottom: 5px;
    font-weight: bold;
}

.filter-group input,
.filter-group select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.gig-filter-submit {
    background: #db2a20;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.gig-filter-submit:hover {
    background: #b8221a;
}

.gig-results-count {
    margin-bottom: 20px;
    color: #666;
}

.gig-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.gig-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.gig-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.gig-thumbnail {
    height: 200px;
    overflow: hidden;
}

.gig-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-thumbnail {
    width: 100%;
    height: 100%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.gig-content {
    padding: 15px;
}

.gig-title {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.gig-title a {
    text-decoration: none;
    color: #333;
}

.gig-title a:hover {
    color: #007cba;
}

.gig-seller {
    margin-bottom: 10px;
}

.seller-name {
    font-weight: bold;
    color: #666;
}

.seller-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

.rating-stars {
    color: #ffa500;
}

.review-count {
    color: #666;
}

.gig-pricing .tier-price {
    font-size: 16px;
    font-weight: bold;
    color: #007cba;
}

.gig-pagination {
    text-align: center;
}

.gig-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 2px;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
}

.gig-pagination .page-numbers:hover,
.gig-pagination .page-numbers.current {
    background: #007cba;
    color: #fff;
    border-color: #007cba;
}

/* Gig Single Styles */
.gig-marketplace.gig-single {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.gig-header {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    align-items: flex-start;
}

.gig-info {
    flex: 1;
}

.gig-title {
    font-size: 32px;
    margin-bottom: 15px;
}

.gig-seller-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.seller-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.seller-details h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
}

.gig-description {
    margin-bottom: 30px;
}

.gig-description h2 {
    margin-bottom: 15px;
}

.gig-content-wrapper {
    display: flex;
    gap: 30px;
}

.gig-sidebar {
    width: 350px;
    flex-shrink: 0;
}

.gig-pricing-card {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.gig-pricing-card h3 {
    margin-top: 0;
}

.pricing-tiers {
    margin-bottom: 20px;
}

.tier {
    background: #fff;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
}

.tier h4 {
    margin: 0 0 10px 0;
}

.tier-price {
    font-size: 18px;
    font-weight: bold;
    color: #007cba;
}

.gig-actions {
    margin-top: 20px;
}

.gig-purchase-btn {
    width: 100%;
    background: #db2a20;
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
}

.gig-purchase-btn:hover {
    background: #b8221a;
}

.seller-stats {
    margin-top: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
}

.seller-stats h4 {
    margin-top: 0;
}

.seller-stats ul {
    margin: 0;
    padding-left: 20px;
}

.seller-stats li {
    margin-bottom: 5px;
}

.gig-reviews {
    margin-top: 40px;
}

.gig-reviews h2 {
    margin-bottom: 20px;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.review-item {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.reviewer-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.reviewer-info {
    flex: 1;
}

.reviewer-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.review-date {
    color: #666;
    font-size: 14px;
}

/* Gig Purchase Styles */
.gig-marketplace.gig-purchase {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.purchase-header h1 {
    text-align: center;
    margin-bottom: 30px;
}

.purchase-content {
    display: flex;
    gap: 30px;
}

.gig-summary {
    flex: 1;
}

.gig-summary-card {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.gig-info {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.gig-details h3 {
    margin: 0 0 5px 0;
}

.selected-tier {
    margin-bottom: 15px;
}

.pricing-breakdown {
    border-top: 1px solid #ddd;
    padding-top: 15px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.price-row.total {
    border-top: 1px solid #ddd;
    padding-top: 10px;
    font-size: 18px;
    font-weight: bold;
}

.purchase-form {
    width: 400px;
    flex-shrink: 0;
}

.purchase-form h2 {
    margin-bottom: 20px;
}

.form-section {
    margin-bottom: 25px;
}

.form-section h3 {
    margin-bottom: 10px;
}

.requirements-field textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 80px;
}

.terms-checkbox {
    margin-bottom: 20px;
}

.purchase-actions {
    display: flex;
    gap: 10px;
}

.back-to-gig-btn {
    background: #db2a20;
    color: #fff;
    padding: 12px 20px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
}

.back-to-gig-btn:hover {
    background: #b8221a;
}

.confirm-purchase-btn {
    background: #db2a20;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    flex: 1;
}

.confirm-purchase-btn:hover {
    background: #b8221a;
}

.purchase-sidebar {
    width: 300px;
    flex-shrink: 0;
}

.seller-info {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.seller-card {
    display: flex;
    align-items: center;
    gap: 15px;
}

.seller-card h4 {
    margin: 0 0 5px 0;
}

.delivery-info {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

.delivery-info h3 {
    margin-top: 0;
}

.delivery-info ul {
    margin: 0;
    padding-left: 20px;
}

.delivery-info li {
    margin-bottom: 8px;
}

/* Star Ratings */
.star {
    display: inline-block;
    font-size: 16px;
}

.star.full:before {
    content: '★';
}

.star.half:before {
    content: '★';
    position: relative;
}

.star.half:before {
    background: linear-gradient(to right, #ffa500 50%, #ddd 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.star.empty:before {
    content: '☆';
    color: #ddd;
}

/* Loading States */
.gig-grid.loading,
.gig-pagination.loading {
    opacity: 0.6;
    pointer-events: none;
}

.gig-grid.loading:before,
.gig-pagination.loading:before {
    content: 'Loading...';
    display: block;
    text-align: center;
    padding: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gig-marketplace-profile,
    .gig-marketplace-gig-create,
    .gig-marketplace-gig-edit,
    .gig-marketplace.gig-listing,
    .gig-marketplace.gig-single,
    .gig-marketplace.gig-purchase {
        padding: 10px;
    }

    .profile-display {
        flex-direction: column;
        text-align: center;
    }

    .profile-picture img,
    .no-picture {
        width: 100px;
        height: 100px;
    }

    .form-actions {
        text-align: center;
    }

    .pricing-tier {
        padding: 10px;
    }

    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        min-width: auto;
    }

    .gig-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .gig-header {
        flex-direction: column;
        text-align: center;
    }

    .gig-content-wrapper {
        flex-direction: column;
    }

    .gig-sidebar {
        width: 100%;
    }

    .purchase-content {
        flex-direction: column;
    }

    .purchase-form {
        width: 100%;
    }

    .purchase-sidebar {
        width: 100%;
    }

    .gig-info {
        flex-direction: column;
        text-align: center;
    }

    .purchase-actions {
        flex-direction: column;
    }

    .confirm-purchase-btn {
        order: -1;
    }
}