/**
 * MappCanada — Seller Profile Page
 *
 * Styles for the marketplace seller profile at /user/<login>/.
 * Follows existing MappCanada CSS variable conventions and BEM naming.
 *
 * Sections:
 *  - Page wrapper
 *  - Seller header card
 *  - Section scaffolding (shared)
 *  - Listings grid (reuses mappcanada-card styles)
 *  - Seller pagination
 *  - Review cards
 *  - Stars
 *  - Empty / trust badge states
 *  - Load-more button
 *  - Responsive
 */

/* =========================================================================
   Page wrapper
   ========================================================================= */

.mc-seller-profile {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px 64px;
    box-sizing: border-box;
}

/* =========================================================================
   Seller header card
   ========================================================================= */

.mc-seller-header {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 14px;
    padding: 28px 24px;
    margin-bottom: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.mc-seller-header__inner {
    display: flex;
    align-items: flex-start;
    gap: 24px;
}

.mc-seller-header__avatar-wrap {
    flex-shrink: 0;
}

.mc-seller-header__avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e8e8e8;
    display: block;
}

.mc-seller-header__info {
    flex: 1;
    min-width: 0;
}

.mc-seller-header__name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px;
    line-height: 1.2;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* Trust summary strip */
.mc-seller-header__trust {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    font-size: 0.875rem;
    color: #555;
}

.mc-seller-header__trust-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.mc-seller-header__trust-item svg {
    flex-shrink: 0;
    color: #888;
}

.mc-seller-header__trust-stars {
    display: inline-flex;
    gap: 1px;
    line-height: 1;
}

.mc-seller-header__trust-score {
    font-weight: 700;
    color: #1a1a1a;
}

.mc-seller-header__trust-count {
    color: #888;
    font-size: 0.8rem;
}

/* Trust tier badge */
.mc-seller-trust-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.mc-seller-trust-badge--highly_trusted {
    background: #fff8e1;
    color: #e65100;
    border: 1px solid #ffcc80;
}

.mc-seller-trust-badge--trusted {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.mc-seller-trust-badge--developing {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #90caf9;
}

.mc-seller-trust-badge--low {
    background: #f5f5f5;
    color: #757575;
    border: 1px solid #e0e0e0;
}

/* Phone number link in trust strip */
.mc-seller-header__trust-item--phone svg {
    color: #D52B1E;
}

.mc-seller-header__phone-link {
    color: #D52B1E;
    text-decoration: none;
    font-weight: 600;
}

.mc-seller-header__phone-link:hover {
    text-decoration: underline;
}

/* =========================================================================
   Section scaffolding
   ========================================================================= */

.mc-seller-section {
    margin-bottom: 48px;
}

.mc-seller-section__inner {
    /* No padding — full-width within .mc-seller-profile */
}

.mc-seller-section__title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #c0392b;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.mc-seller-section__count {
    font-size: 0.9rem;
    font-weight: 400;
    color: #888;
}

/* =========================================================================
   Listings grid
   Reuses .mappcanada-card styles from mappcanada-hub.css.
   Only layout/grid scaffolding here.
   ========================================================================= */

.mc-seller-listings-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* =========================================================================
   Seller pagination (kept for backward compat; not used for listings)
   ========================================================================= */

.mc-seller-pagination {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 28px;
}

.mc-seller-pagination__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #333;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.mc-seller-pagination__btn:hover {
    background: #f5f5f5;
}

.mc-seller-pagination__btn--active {
    background: #c0392b;
    border-color: #c0392b;
    color: #fff;
    pointer-events: none;
}

/* =========================================================================
   Reviews header row (title + summary score side-by-side)
   ========================================================================= */

.mc-seller-reviews-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.mc-seller-reviews-header .mc-seller-section__title {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.mc-seller-reviews-section .mc-seller-section__title {
    border-bottom: 2px solid #c0392b;
    padding-bottom: 12px;
    margin-bottom: 0;
}

.mc-seller-reviews-summary {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mc-seller-reviews-summary__score {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1;
}

.mc-seller-reviews-summary__stars {
    display: flex;
    gap: 2px;
}

/* =========================================================================
   Stars (shared across header trust strip, review cards, summary)
   ========================================================================= */

.mc-star {
    font-size: 1.1rem;
    color: #ddd;
    line-height: 1;
}

.mc-star--filled {
    color: #f5a623;
}

.mc-star--lg {
    font-size: 1.4rem;
}

/* =========================================================================
   Empty state
   ========================================================================= */

.mc-seller-empty {
    padding: 32px;
    text-align: center;
    color: #999;
    font-size: 0.95rem;
    border: 1px dashed #ddd;
    border-radius: 10px;
    background: #fafafa;
}

.mc-seller-empty p {
    margin: 0;
}

/* =========================================================================
   Load More button
   ========================================================================= */

.mc-seller-reviews-load-more,
.mc-seller-listings-load-more {
    text-align: center;
    margin-top: 24px;
}

.mc-seller-load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 28px;
    background: #fff;
    color: #c0392b;
    border: 1.5px solid #c0392b;
    border-radius: 24px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    line-height: 1.4;
}

.mc-seller-load-more-btn:hover:not(:disabled) {
    background: #c0392b;
    color: #fff;
}

.mc-seller-load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* =========================================================================
   Responsive — tablet (600px+)
   ========================================================================= */

@media (min-width: 600px) {
    .mc-seller-listings-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =========================================================================
   Responsive — desktop (960px+)
   ========================================================================= */

@media (min-width: 960px) {
    .mc-seller-listings-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .mc-seller-header__avatar {
        width: 120px;
        height: 120px;
    }
}

/* =========================================================================
   Responsive — small mobile (<480px)
   ========================================================================= */

@media (max-width: 479px) {
    .mc-seller-header__inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .mc-seller-header__name {
        justify-content: center;
    }

    .mc-seller-header__trust {
        justify-content: center;
    }
}
