/**
 * Marketplace Style - StudoSigma Platform
 * Extends existing platform styles with marketplace-specific components
 * All classes prefixed with 'mp-' to avoid conflicts
 */

.hidden { display: none !important; }

/* ============================================
   1. BROWSE PAGE - TOOLS GRID
   ============================================ */

.mp-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.mp-tool-card {
    background: white;
    border: 3px solid #1E2D3B;
    box-shadow: 6px 6px 0px #1E2D3B;
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mp-tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 8px 8px 0px #1E2D3B;
}

.mp-tool-card-icon {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 0.5rem;
}

.mp-tool-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.mp-tool-card-info {
    flex: 1;
}

.mp-tool-card-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1A5954;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.mp-tool-card-desc {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mp-tool-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.mp-tool-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1A5954;
}

.mp-tool-price.free {
    color: #4CAF50;
}

.mp-tool-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.9rem;
    color: #666;
}

/* ============================================
   2. SEARCH & FILTER BAR
   ============================================ */

.mp-search-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.mp-search-bar input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #1E2D3B;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
}

.mp-search-bar button {
    padding: 0.75rem 2rem;
    background: #00A99D;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.mp-search-bar button:hover {
    background: #1A5954;
}

.mp-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: center;
}

.mp-filters select {
    padding: 0.5rem 1rem;
    border: 2px solid #1E2D3B;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    background: white;
    cursor: pointer;
}

.mp-category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
}

.mp-category-badge.rekenen { background: #2196F3; }
.mp-category-badge.taal { background: #4CAF50; }
.mp-category-badge.spelling { background: #FF9800; }
.mp-category-badge.lezen { background: #9C27B0; }
.mp-category-badge.wereldorientatie { background: #795548; }
.mp-category-badge.creatief { background: #E91E63; }
.mp-category-badge.sociaal_emotioneel { background: #00BCD4; }
.mp-category-badge.overig { background: #607D8B; }

/* ============================================
   3. TOOL DETAIL PAGE
   ============================================ */

.mp-tool-hero {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 2rem;
    background: white;
    border: 3px solid #1E2D3B;
    box-shadow: 6px 6px 0px #1E2D3B;
    border-radius: 12px;
}

.mp-tool-hero-icon {
    width: 150px;
    height: 150px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.mp-tool-hero-info {
    flex: 1;
}

.mp-tool-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1A5954;
    margin-bottom: 0.5rem;
}

.mp-tool-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.mp-tool-creator {
    color: #666;
    font-size: 0.95rem;
}

.mp-tool-creator a {
    color: #00A99D;
    text-decoration: none;
    font-weight: 600;
}

.mp-tool-creator a:hover {
    text-decoration: underline;
}

.mp-tool-description {
    background: white;
    border: 3px solid #1E2D3B;
    box-shadow: 6px 6px 0px #1E2D3B;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    line-height: 1.7;
    color: #333;
}

.mp-tool-description h3 {
    color: #1A5954;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.mp-screenshots-carousel {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 1rem 0;
    margin-bottom: 2rem;
    scroll-behavior: smooth;
}

.mp-screenshots-carousel::-webkit-scrollbar {
    height: 8px;
}

.mp-screenshots-carousel::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.mp-screenshots-carousel::-webkit-scrollbar-thumb {
    background: #00A99D;
    border-radius: 4px;
}

.mp-screenshot {
    width: 300px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #1E2D3B;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.mp-screenshot:hover {
    transform: scale(1.05);
}

.mp-subscribe-box {
    background: linear-gradient(135deg, #00A99D 0%, #1A5954 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 2rem;
}

.mp-subscribe-box h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.mp-subscribe-price {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.mp-subscribe-price .period {
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.9;
}

.mp-subscribe-btn {
    background: white;
    color: #1A5954;
    padding: 1rem 3rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
    transition: transform 0.2s ease;
}

.mp-subscribe-btn:hover {
    transform: scale(1.05);
}

/* ============================================
   4. REVIEWS SECTION
   ============================================ */

.mp-reviews-section {
    background: white;
    border: 3px solid #1E2D3B;
    box-shadow: 6px 6px 0px #1E2D3B;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.mp-reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e0e0;
}

.mp-reviews-summary {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.mp-average-rating {
    text-align: center;
}

.mp-average-rating-number {
    font-size: 3rem;
    font-weight: 700;
    color: #1A5954;
}

.mp-rating-bars {
    flex: 1;
}

.mp-rating-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.mp-rating-bar-label {
    width: 60px;
    font-size: 0.9rem;
    color: #666;
}

.mp-rating-bar-fill {
    flex: 1;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.mp-rating-bar-fill-inner {
    height: 100%;
    background: #FFB400;
    transition: width 0.3s ease;
}

.mp-rating-bar-count {
    width: 40px;
    text-align: right;
    font-size: 0.9rem;
    color: #666;
}

.mp-review-card {
    padding: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.mp-review-card:last-child {
    border-bottom: none;
}

.mp-review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.mp-review-author {
    font-weight: 600;
    color: #1A5954;
}

.mp-review-date {
    font-size: 0.85rem;
    color: #999;
}

.mp-stars {
    display: inline-flex;
    gap: 0.15rem;
    color: #FFB400;
}

.mp-star {
    font-size: 1.1rem;
}

.mp-star.empty {
    color: #ddd;
}

.mp-review-text {
    line-height: 1.6;
    color: #333;
    margin-top: 0.5rem;
}

/* ============================================
   5. CREATOR DASHBOARD
   ============================================ */

.mp-stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.mp-stat-card {
    background: white;
    border: 3px solid #1E2D3B;
    box-shadow: 6px 6px 0px #1E2D3B;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.mp-stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #00A99D;
    margin-bottom: 0.5rem;
}

.mp-stat-label {
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mp-earnings-table {
    width: 100%;
    background: white;
    border: 3px solid #1E2D3B;
    box-shadow: 6px 6px 0px #1E2D3B;
    border-radius: 12px;
    overflow: hidden;
}

.mp-earnings-table table {
    width: 100%;
    border-collapse: collapse;
}

.mp-earnings-table th {
    background: #1A5954;
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.mp-earnings-table td {
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.mp-earnings-table tr:last-child td {
    border-bottom: none;
}

.mp-earnings-table tr:hover {
    background: #f8f9fa;
}

/* ============================================
   6. UPLOAD FORM
   ============================================ */

.mp-upload-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    position: relative;
}

.mp-upload-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.mp-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
    flex: 1;
}

.mp-step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 3px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #999;
    transition: all 0.3s ease;
}

.mp-step.active .mp-step-circle {
    background: #00A99D;
    border-color: #00A99D;
    color: white;
}

.mp-step.completed .mp-step-circle {
    background: #4CAF50;
    border-color: #4CAF50;
    color: white;
}

.mp-step-label {
    font-size: 0.85rem;
    color: #666;
    text-align: center;
}

.mp-step.active .mp-step-label {
    color: #1A5954;
    font-weight: 600;
}

.mp-upload-zone {
    border: 3px dashed #1E2D3B;
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.mp-upload-zone:hover {
    background: #f8f9fa;
    border-color: #00A99D;
}

.mp-upload-zone.dragover {
    background: #e6f7f5;
    border-color: #00A99D;
}

.mp-upload-icon {
    font-size: 3rem;
    color: #00A99D;
    margin-bottom: 1rem;
}

.mp-upload-text {
    color: #666;
    margin-bottom: 0.5rem;
}

.mp-upload-hint {
    font-size: 0.85rem;
    color: #999;
}

/* ============================================
   7. ADMIN REVIEW QUEUE
   ============================================ */

.mp-review-queue-table {
    width: 100%;
    background: white;
    border: 3px solid #1E2D3B;
    box-shadow: 6px 6px 0px #1E2D3B;
    border-radius: 12px;
    overflow: hidden;
}

.mp-review-queue-table table {
    width: 100%;
    border-collapse: collapse;
}

.mp-review-queue-table th {
    background: #1A5954;
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.mp-review-queue-table td {
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.mp-review-queue-table tr:last-child td {
    border-bottom: none;
}

.mp-review-queue-table tr:hover {
    background: #f8f9fa;
}

.mp-status-badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mp-status-badge.draft {
    background: #9E9E9E;
    color: white;
}

.mp-status-badge.pending_review {
    background: #FF9800;
    color: white;
}

.mp-status-badge.approved {
    background: #4CAF50;
    color: white;
}

.mp-status-badge.rejected {
    background: #F44336;
    color: white;
}

.mp-status-badge.suspended {
    background: #B71C1C;
    color: white;
}

/* ============================================
   8. API KEYS PAGE
   ============================================ */

.mp-key-card {
    background: white;
    border: 3px solid #1E2D3B;
    box-shadow: 6px 6px 0px #1E2D3B;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.mp-key-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.mp-key-name {
    font-weight: 600;
    color: #1A5954;
    font-size: 1.1rem;
}

.mp-key-masked {
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    font-size: 0.95rem;
    margin: 1rem 0;
    color: #333;
}

.mp-key-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.mp-key-info {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.75rem;
}

/* ============================================
   9. SUBSCRIPTION MANAGEMENT
   ============================================ */

.mp-subscription-card {
    background: white;
    border: 3px solid #1E2D3B;
    box-shadow: 6px 6px 0px #1E2D3B;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.mp-subscription-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.mp-subscription-tool {
    font-weight: 600;
    color: #1A5954;
    font-size: 1.1rem;
}

.mp-subscription-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.mp-subscription-detail {
    font-size: 0.9rem;
}

.mp-subscription-detail-label {
    color: #666;
    margin-bottom: 0.25rem;
}

.mp-subscription-detail-value {
    font-weight: 600;
    color: #1A5954;
}

.mp-expiry-warning {
    background: #FFF3E0;
    border: 2px solid #FF9800;
    color: #E65100;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-weight: 500;
}

/* ============================================
   10. AI BADGE
   ============================================ */

.mp-ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #7B1FA2 0%, #9C27B0 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mp-ai-badge::before {
    content: '🤖';
    font-size: 0.9rem;
}

/* ============================================
   11. PAGINATION
   ============================================ */

.mp-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.mp-page-btn {
    padding: 0.5rem 0.85rem;
    border: 2px solid #1E2D3B;
    background: white;
    color: #1A5954;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.mp-page-btn:hover {
    background: #00A99D;
    color: white;
    border-color: #00A99D;
}

.mp-page-btn.active {
    background: #1A5954;
    color: white;
    border-color: #1A5954;
}

.mp-page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   12. EMPTY STATE
   ============================================ */

.mp-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #999;
}

.mp-empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.mp-empty-text {
    font-size: 1.25rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.mp-empty-hint {
    font-size: 0.95rem;
    color: #999;
}

/* ============================================
   13. RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .mp-tools-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .mp-tool-hero {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .mp-tool-hero-icon {
        width: 120px;
        height: 120px;
    }

    .mp-tool-title {
        font-size: 1.5rem;
    }

    .mp-search-bar {
        flex-direction: column;
    }

    .mp-filters {
        flex-direction: column;
    }

    .mp-filters select {
        width: 100%;
    }

    .mp-stats-cards {
        grid-template-columns: 1fr;
    }

    .mp-reviews-summary {
        flex-direction: column;
    }

    .mp-rating-bars {
        width: 100%;
    }

    .mp-upload-steps {
        flex-direction: column;
        gap: 1rem;
    }

    .mp-upload-steps::before {
        display: none;
    }

    .mp-step {
        flex-direction: row;
        justify-content: flex-start;
    }

    .mp-subscription-details {
        grid-template-columns: 1fr;
    }

    .mp-review-queue-table,
    .mp-earnings-table {
        overflow-x: auto;
    }

    .mp-screenshots-carousel {
        gap: 0.5rem;
    }

    .mp-screenshot {
        width: 250px;
        height: 166px;
    }
}
