/**
 * WikiDrive admin marketplace — shared styles inherited by all marketplace pages.
 * Use these classes instead of inline styles in Blade templates.
 */

:root {
    --mp-green: #196d00;
    --mp-green-light: #55b938;
    --mp-green-dark: #0c4400;
    --mp-bg: #f9f9ff;
    --mp-surface: #ffffff;
    --mp-surface-alt: #f0f3ff;
    --mp-border: #bfcab5;
    --mp-text: #151c27;
    --mp-muted: #3f4a3a;
    --mp-accent-purple-start: #7a60ff;
    --mp-accent-purple-end: #cd5cff;
    --mp-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --mp-radius: 0.75rem;
}

/* Page shell */
.mp-page-header {
    margin-bottom: 1.5rem;
}

.mp-page-title {
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--mp-text);
    margin-bottom: 0.25rem;
}

.mp-page-subtitle {
    color: var(--mp-muted);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Cards */
.mp-card {
    background: var(--mp-surface);
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius);
    box-shadow: var(--mp-shadow);
}

.mp-card-accent {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.mp-stat-card {
    background: var(--mp-surface);
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius);
    box-shadow: var(--mp-shadow);
    padding: 1rem;
    height: 100%;
}

.mp-stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    background: rgba(85, 185, 56, 0.2);
    color: var(--mp-green);
}

.mp-stat-label {
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mp-muted);
}

.mp-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--mp-text);
}

.mp-stat-change {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--mp-green);
}

/* Buttons */
.mp-btn-primary {
    background: var(--mp-green);
    border-color: var(--mp-green);
    color: #fff;
    font-weight: 700;
}

.mp-btn-primary:hover,
.mp-btn-primary:focus {
    background: #145a00;
    border-color: #145a00;
    color: #fff;
}

.mp-btn-gradient {
    background: linear-gradient(to right, var(--mp-accent-purple-start), var(--mp-accent-purple-end));
    border: 0;
    color: #fff;
    font-weight: 700;
    border-radius: 4px;
    padding: 0.625rem 1.25rem;
}

.mp-btn-gradient:hover,
.mp-btn-gradient:focus {
    color: #fff;
    opacity: 0.92;
}

.mp-btn-soft {
    background: #dce2f3;
    border: 1px solid var(--mp-border);
    color: var(--mp-text);
    font-weight: 700;
}

.mp-btn-soft:hover {
    background: #e2e8f8;
    color: var(--mp-text);
}

/* Alerts */
.mp-alert {
    border-radius: 4px;
    border-left-width: 4px;
    border-left-style: solid;
}

.mp-alert-success {
    border-left-color: #1bcfb4;
}

.mp-alert-danger {
    border-left-color: #fe7c96;
}

/* Vehicle listing cards */
.mp-vehicle-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease;
}

.mp-vehicle-card:hover {
    transform: translateY(-2px);
}

.mp-vehicle-media {
    height: 180px;
    overflow: hidden;
    position: relative;
}

.mp-vehicle-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mp-badge-overlay {
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.mp-badge-overlay-right {
    left: auto;
    right: 12px;
}

.mp-tagline {
    font-style: italic;
}

.mp-empty-icon {
    font-size: 3.5rem;
}

/* Overview charts */
.mp-chart-wrap {
    position: relative;
    height: 14rem;
    width: 100%;
}

.mp-chart-svg {
    width: 100%;
    height: 100%;
}

.mp-chart-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--mp-muted);
    padding-top: 0.5rem;
    border-top: 1px solid var(--mp-border);
}

.mp-doughnut {
    position: relative;
    width: 10rem;
    height: 10rem;
    border-radius: 50%;
    border: 16px solid var(--mp-green);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mp-doughnut-inner {
    background: var(--mp-surface);
    border-radius: 50%;
    width: 7rem;
    height: 7rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.mp-segment-dot {
    display: inline-block;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
}

.mp-seg-rentals { background-color: #196d00; }
.mp-seg-sales { background-color: #93fb71; }
.mp-seg-rto { background-color: #6f7a68; }

/* Activity timeline */
.mp-timeline {
    position: relative;
    padding-left: 1rem;
}

.mp-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 2px;
    background: var(--mp-border);
}

.mp-timeline-item {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1.5rem;
}

.mp-timeline-dot {
    position: absolute;
    left: 0;
    top: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 4px solid var(--mp-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.mp-timeline-dot-green { background-color: var(--mp-green-light); }
.mp-timeline-dot-muted { background-color: #9ca3bc; }

/* Listing table */
.mp-table thead th {
    background: var(--mp-surface-alt);
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mp-muted);
    border-bottom: 1px solid var(--mp-border);
}

.mp-table tbody td {
    vertical-align: middle;
}

.mp-listing-id {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    color: var(--mp-green);
    font-weight: 500;
}

/* Listing type badges */
.mp-type-sales { background: #d9e6d6; color: #5b675b; }
.mp-type-rental { background: #9ca3bc; color: #32394e; }
.mp-type-rto { background: var(--mp-green-light); color: var(--mp-green-dark); }

.mp-status-dot {
    display: inline-block;
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.mp-status-active { background: var(--mp-green); }
.mp-status-completed { background: var(--mp-muted); }

/* Featured listings */
.mp-featured-card {
    text-decoration: none;
    color: inherit;
    display: block;
    border-radius: var(--mp-radius);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.mp-featured-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    color: inherit;
}

.mp-featured-media {
    height: 10rem;
    background: #dce2f3;
    position: relative;
    overflow: hidden;
}

.mp-featured-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.mp-featured-card:hover .mp-featured-media img {
    transform: scale(1.05);
}

.mp-featured-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    font-size: 0.625rem;
    font-weight: 900;
    text-transform: uppercase;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    z-index: 1;
}

.mp-badge-best { background: var(--mp-green); color: #fff; }
.mp-badge-new { background: #d9e6d6; color: #5b675b; }
.mp-badge-last { background: #ba1a1a; color: #fff; }
.mp-badge-featured { background: #9ca3bc; color: #fff; }

/* Top seller thumb */
.mp-thumb {
    width: 3rem;
    height: 3rem;
    border-radius: 0.5rem;
    background: #dce2f3 center / cover no-repeat;
}

.mp-thumb-fallback {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%233F4A3A'%3E%3Cpath d='M18.92 6.01C18.72 5.42 18.16 5 17.5 5h-11c-.66 0-1.21.42-1.42 1.01L3 12v8c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h12v1c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-8l-2.08-5.99zM6.5 16c-.83 0-1.5-.67-1.5-1.5S5.67 13 6.5 13s1.5.67 1.5 1.5S7.33 16 6.5 16zm11 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM5 11l1.5-4.5h11L19 11H5z'/%3E%3C/svg%3E");
}

/* Form sections inside marketplace CRUD */
.mp-form-section-title {
    color: var(--mp-green);
    font-weight: 700;
    margin-bottom: 1rem;
}

.mp-image-preview-grid {
    margin-top: 0.75rem;
}

.mp-image-preview-slot {
    height: 11rem;
    border: 2px dashed var(--mp-border);
    border-radius: 0.5rem;
    overflow: hidden;
    background: var(--mp-surface-alt);
    position: relative;
}

.mp-image-preview-slot.is-filled {
    border-style: solid;
    border-color: rgba(25, 109, 0, 0.35);
}

.mp-image-preview-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mp-image-preview-placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    color: var(--mp-muted);
    font-size: 0.8rem;
    text-align: center;
    padding: 0.75rem;
}

.mp-image-preview-placeholder i {
    font-size: 1.5rem;
    color: var(--mp-green);
}

.mp-image-preview-label {
    position: absolute;
    left: 0.5rem;
    top: 0.5rem;
    background: var(--mp-green);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.15rem 0.45rem;
    border-radius: 0.25rem;
    z-index: 2;
}

.mp-image-upload-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mp-image-upload-frame {
    height: 11rem;
    border: 2px dashed var(--mp-border);
    border-radius: 0.5rem;
    overflow: hidden;
    background: var(--mp-surface-alt);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mp-image-upload-card.is-filled .mp-image-upload-frame {
    border-style: solid;
    border-color: rgba(25, 109, 0, 0.35);
}

.mp-image-upload-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mp-image-upload-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--mp-muted);
}

.mp-image-upload-empty i {
    font-size: 2rem;
    color: rgba(25, 109, 0, 0.35);
}

.mp-image-upload-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--mp-border);
    border-radius: 0.5rem;
    background: #fff;
    color: var(--mp-green);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    margin: 0;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.mp-image-upload-trigger:hover {
    background: var(--mp-surface-alt);
    border-color: rgba(25, 109, 0, 0.35);
}

.mp-image-upload-trigger i {
    font-size: 1.125rem;
    line-height: 1;
}

.mp-image-upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.mp-avatar {
    width: 36px;
    height: 36px;
}

.mp-actions-col {
    width: 150px;
}

.mp-card-title-lg {
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.mp-form-card .card-body {
    padding: 2rem;
}

.mp-carousel {
    overflow: hidden;
    height: 380px;
    background: #000;
}

.mp-carousel-img {
    object-fit: cover;
}

.mp-description {
    line-height: 1.6;
}

.mp-feature-icon {
    font-size: 1.5rem;
    color: var(--mp-accent-purple-start);
}

.mp-card-highlight {
    overflow: hidden;
    border-top: 4px solid var(--mp-accent-purple-start) !important;
}

.mp-map-placeholder {
    height: 120px;
    border-style: dashed !important;
}

.mp-map-placeholder i {
    font-size: 2rem;
}

.mp-thumb-sm {
    width: 70px;
    height: 44px;
    object-fit: cover;
}

.mp-thumb-md {
    width: 80px;
    height: 50px;
    object-fit: cover;
    overflow: hidden;
}

.mp-thumb-box {
    width: 80px;
    height: 50px;
    color: var(--mp-accent-purple-start);
    font-size: 1.5rem;
}

.mp-avatar-lg {
    width: 80px;
    height: 80px;
    font-size: 2rem;
}

.mp-icon-lg { font-size: 1.5rem; }
.mp-icon-xl { font-size: 1.8rem; }
.mp-icon-xxl { font-size: 3rem; }
.mp-icon-empty { font-size: 3.5rem; }
.mp-icon-cart-empty { font-size: 4rem; }

.mp-badge-xs { font-size: 0.7rem; }
.mp-badge-sm { font-size: 0.75rem; }
.mp-text-xs { font-size: 0.8rem; }
.mp-text-sm { font-size: 0.9rem; }
.mp-checkout-total { font-size: 1.1rem; }

.mp-addon-icon {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
}

.mp-desc-max {
    max-width: 350px;
}

.mp-cart-qty {
    width: 70px;
}

.mp-summary-soft {
    background: rgba(122, 96, 255, 0.06);
    border: 1px solid rgba(122, 96, 255, 0.15);
}

.mp-checkout-summary {
    background: #fdfdfd;
    border-top: 4px solid var(--mp-accent-purple-end) !important;
}

.mp-actions-col-wide {
    width: 220px;
}

.mp-icon-col {
    width: 80px;
}

.mp-text-label {
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}
