/* ===========================
   MARKETPLACE PLUGIN STYLES
   =========================== */

/* General Styles */
.marketplace-submission-form,
.marketplace-dashboard,
.marketplace-listings-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Form Styles */
.form-row {
    margin-bottom: 20px;
}

.form-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.form-row input[type="text"],
.form-row input[type="number"],
.form-row input[type="email"],
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.form-row-half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.button-primary {
    background: #0073aa;
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s;
}

.button-primary:hover {
    background: #005a87;
}

.button-secondary {
    background: #f0f0f0;
    color: #333;
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: background 0.3s;
}

.button-secondary:hover {
    background: #e0e0e0;
}

/* Star Rating Input */
.star-rating-input {
    display: flex;
    gap: 5px;
    font-size: 32px;
    color: #ddd;
}

.star-rating-input .star {
    cursor: pointer;
    transition: color 0.2s;
}

.star-rating-input .star:hover,
.star-rating-input .star.active {
    color: #ffc107;
}

/* File Previews */
.file-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.preview-thumb {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #ddd;
}

.location-status {
    display: inline-block;
    margin-left: 10px;
    font-size: 14px;
}

.form-message {
    margin: 20px 0;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #c3e6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #f5c6cb;
}

.form-notice {
    font-size: 13px;
    color: #666;
    margin-top: 10px;
}

.form-loader {
    margin-left: 10px;
    color: #0073aa;
}

/* Dashboard Styles */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.dashboard-header h2 {
    margin: 0;
    color: #333;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.stat-number {
    display: block;
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 10px;
}

.stat-label {
    display: block;
    font-size: 16px;
    opacity: 0.9;
}

.dashboard-listings h3 {
    margin-bottom: 20px;
    color: #333;
}

.listings-table-wrapper {
    overflow-x: auto;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.dashboard-table thead {
    background: #f8f9fa;
}

.dashboard-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #e0e0e0;
}

.dashboard-table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.dashboard-table tr:hover {
    background: #f8f9fa;
}

.listing-thumb,
.listing-thumb-placeholder {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

.listing-thumb-placeholder {
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 12px;
}

.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

.actions-cell {
    white-space: nowrap;
}

.btn-view,
.btn-edit,
.btn-delete {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    margin: 0 5px;
    padding: 5px;
    transition: transform 0.2s;
}

.btn-view:hover,
.btn-edit:hover,
.btn-delete:hover {
    transform: scale(1.2);
}

.dashboard-empty {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.dashboard-empty p {
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
}

/* Listings Grid Styles */
.listings-filter-bar {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.filter-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.filter-row {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 15px;
    align-items: center;
}

.filter-row-secondary {
    grid-template-columns: 2fr 1fr auto auto;
}

.search-input {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
}

.filter-select {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    background: #fff;
    cursor: pointer;
}

.price-range-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.price-range-wrapper label {
    font-weight: 600;
    white-space: nowrap;
}

.price-input {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    width: 100px;
}

.listings-results-info {
    margin-bottom: 20px;
    color: #666;
}

.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.listing-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.listing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
}

.listing-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.listing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.listing-card:hover .listing-image img {
    transform: scale(1.05);
}

.listing-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.listing-type-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
}

.listing-type-sale {
    background: rgba(40, 167, 69, 0.9);
}

.listing-type-rent {
    background: rgba(0, 123, 255, 0.9);
}

.listing-type-service {
    background: rgba(255, 193, 7, 0.9);
}

.listing-type-job {
    background: rgba(220, 53, 69, 0.9);
}

.listing-content {
    padding: 20px;
}

.listing-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.listing-category {
    background: #f0f0f0;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    color: #666;
    font-weight: 600;
}

.listing-rating {
    color: #ffc107;
    font-size: 14px;
}

.listing-title {
    margin: 0 0 10px 0;
    font-size: 20px;
}

.listing-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.listing-title a:hover {
    color: #0073aa;
}

.listing-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.listing-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    margin-bottom: 15px;
}

.listing-price {
    font-size: 24px;
    font-weight: 700;
    color: #0073aa;
}

.listing-location {
    font-size: 13px;
    color: #666;
}

.listing-view-btn {
    display: block;
    text-align: center;
    background: #0073aa;
    color: #fff;
    padding: 10px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
}

.listing-view-btn:hover {
    background: #005a87;
}

.listings-empty {
    text-align: center;
    padding: 80px 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.listings-empty p {
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
}

.listings-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.listings-pagination a,
.listings-pagination span {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}

.listings-pagination a:hover {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.listings-pagination .current {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-row-half {
        grid-template-columns: 1fr;
    }
    
    .filter-row,
    .filter-row-secondary {
        grid-template-columns: 1fr;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .listings-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-table {
        font-size: 14px;
    }
    
    .dashboard-table th,
    .dashboard-table td {
        padding: 10px;
    }
    
    .listing-thumb {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .marketplace-submission-form,
    .marketplace-dashboard,
    .marketplace-listings-wrapper {
        padding: 10px;
    }
    
    .stat-number {
        font-size: 36px;
    }
    
    .listing-price {
        font-size: 20px;
    }
}