/* marketplace.css — Anúncios e Serviços B2B Fotógrafos */

.mk-wrap {
    max-width: var(--page-width);
    margin: 0 auto;
    padding-bottom: 60px;
}

.mk-public-body {
    display: block;
    min-height: 100vh;
    background: #202020;
    color: #F5F5F7;
}

.mk-public-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px clamp(18px, 4vw, 54px);
    border-bottom: 1px solid rgba(245,245,247,0.08);
    background: rgba(32,32,32,0.86);
    backdrop-filter: blur(18px);
}

.mk-public-brand,
.mk-public-nav a {
    color: #F5F5F7;
    text-decoration: none;
}

.mk-public-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 800;
}

.mk-public-logo {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #202020;
    background: #e6fff0;
}

.mk-public-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mk-public-nav a {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid rgba(245,245,247,0.10);
    border-radius: 8px;
    color: #A1A1A6;
    font-size: 13px;
    font-weight: 700;
}

.mk-public-nav a:hover {
    color: #F5F5F7;
    border-color: rgba(230,255,240,0.28);
}

.mk-public-shell {
    width: min(1240px, calc(100% - 36px));
    margin: 0 auto;
    padding: 34px 0 70px;
}

.mk-public-hero {
    min-height: 310px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 24px;
    padding: clamp(28px, 5vw, 54px) 0;
    border-bottom: 1px solid rgba(245,245,247,0.08);
}

.mk-public-kicker {
    margin: 0 0 12px;
    color: #e6fff0;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.mk-public-hero h1 {
    max-width: 840px;
    margin: 0;
    color: #F5F5F7;
    font-size: clamp(38px, 6vw, 74px);
    line-height: .98;
    font-weight: 850;
}

.mk-public-hero p:not(.mk-public-kicker) {
    max-width: 720px;
    margin: 18px 0 0;
    color: #A1A1A6;
    font-size: clamp(15px, 1.6vw, 18px);
    line-height: 1.65;
}

.mk-public-panel {
    padding-top: 28px;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(18,18,18,0.72);
    backdrop-filter: blur(12px);
    opacity: 0;
    transition: opacity .18s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

/* ── HEADER ── */
.mk-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.mk-header-left h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 4px;
}
.mk-header-left h2 svg { color: var(--primary); }
.mk-header-left p { font-size: 13px; color: var(--text-muted); margin: 0; }

.btn-novo-anuncio {
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    border: none;
    background: #e6fff0;
    color: #202020;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.18s, transform 0.18s;
    font-family: var(--font-main);
}
.btn-novo-anuncio:hover { background: #d6f2e1; transform: translateY(-1px); }

/* ── TABS ── */
.mk-tabs-nav {
    display: flex;
    gap: 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}
.mk-tab-btn {
    padding: 10px 4px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
}
.mk-tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}
.mk-tab-btn:hover:not(.active) { color: var(--text); }
.mk-tab-btn .badge {
    background: #303634;
    color: #e6fff0;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 5px;
}

.mk-tab-content { display: none; animation: fadeIn 0.3s ease; }
.mk-tab-content.active { display: block; }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

/* ── FILTROS (Vitrine) ── */
.mk-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.mk-filter-pill {
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}
.mk-filter-pill:hover, .mk-filter-pill.active {
    background: #1F302A;
    border-color: rgba(230,255,240,0.22);
    color: #e6fff0;
}

/* ── GRID E CARDS ── */
.mk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.mk-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.mk-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    border-color: var(--primary);
}

.mk-card-img {
    height: 160px;
    background: var(--surface-alt);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.mk-card-img img { width: 100%; height: 100%; object-fit: cover; }
.mk-card-img svg { width: 40px; height: 40px; color: var(--text-faint); }

.mk-tipo-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    color: #F5F5F7;
    backdrop-filter: blur(4px);
}
.mk-tipo-tag.fisico  { background: rgba(73,88,112,0.92); }
.mk-tipo-tag.digital { background: rgba(31,48,42,0.94); }
.mk-tipo-tag.servico { background: rgba(95,76,48,0.94); }

.mk-card-info {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.mk-titulo {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
    line-height: 1.3;
}
.mk-autor {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}
.mk-avatar-mini {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    background: #303634;
    color: #e6fff0;
    font-size: 10px;
    font-weight: 800;
    flex-shrink: 0;
}
.mk-desc {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mk-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding-top: 14px;
}
.mk-preco { font-size: 16px; font-weight: 800; color: var(--text); }
.btn-contato {
    padding: 6px 12px;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}
.btn-contato:hover { border-color: var(--primary); color: var(--primary); }
.btn-contato.is-disabled,
.btn-contato:disabled {
    background: #303634;
    color: #636366;
    border-color: rgba(245,245,247,0.06);
    cursor: default;
}

/* ── CAIXA DE ENTRADA ── */
.mk-inbox {
    display: flex;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    height: 600px;
    overflow: hidden;
}
.mk-chat-list {
    width: 320px;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    background: var(--surface-alt);
}
.mk-chat-list-header {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}
.mk-chat-items { flex: 1; overflow-y: auto; }
.mk-chat-item {
    display: flex;
    padding: 14px 16px;
    gap: 12px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s;
}
.mk-chat-item:hover { background: var(--surface); }
.mk-chat-item.active { background: var(--surface); border-left: 3px solid var(--primary); }
.mk-chat-item.unread .mk-chat-nome { color: var(--text); font-weight: 800; }
.mk-chat-item.unread .mk-chat-msg { color: var(--text); font-weight: 600; }

.mk-chat-avatar {
    width: 40px; height: 40px; border-radius: 8px;
    background: var(--primary-muted); color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; flex-shrink: 0;
}
.mk-chat-avatar.compact {
    width: 36px;
    height: 36px;
    font-size: 14px;
}
.mk-chat-preview { flex: 1; min-width: 0; }
.mk-chat-nome { font-size: 13.5px; font-weight: 600; color: var(--text-muted); margin-bottom: 2px; }
.mk-chat-anuncio { font-size: 10px; color: var(--primary); text-transform: uppercase; font-weight: 700; margin-bottom: 4px; }
.mk-chat-msg { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Mensagens (Lado Direito) */
.mk-chat-window {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--surface);
}
.mk-window-header {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}
.mk-window-header span { font-size: 14.5px; font-weight: 700; color: var(--text); }
.mk-window-header small { font-size: 12px; color: var(--text-muted); }

.mk-mensagens {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.msg-bubble {
    max-width: 70%;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.4;
}
.msg-bubble.them {
    background: var(--surface-alt);
    color: var(--text);
    border-bottom-left-radius: 2px;
    align-self: flex-start;
}
.msg-bubble.me {
    background: var(--primary);
    color: #F5F5F7;
    border-bottom-right-radius: 2px;
    align-self: flex-end;
}
.msg-time { font-size: 9px; opacity: 0.7; margin-top: 4px; text-align: right; }

.mk-chat-input {
    padding: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
    background: var(--surface-alt);
}
.mk-chat-input input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-size: 13.5px;
}
.mk-chat-input input:focus { outline:none; border-color:var(--primary); }
.btn-send {
    width: 42px; height: 42px; border-radius: 8px; border: none;
    background: var(--primary); color: #F5F5F7; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.btn-send:hover { background: var(--primary-hover); }

/* ── FORM E MODAIS ── */
.form-section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--text-muted); margin: 20px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 6px; }
.form-section-title:first-child { margin-top: 0; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.input-group { margin-bottom: 14px; }
.input-group label { display: block; font-size: 11.5px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.input-group input, .input-group select, .input-group textarea { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-alt); color: var(--text); font-size: 13.5px; transition: border-color 0.2s; font-family: var(--font-main); }
.input-group input:focus, .input-group select:focus, .input-group textarea:focus { border-color: var(--primary); outline: none; }
.input-group textarea { min-height: 80px; resize: vertical; }

.input-prefix { display: flex; }
.input-prefix span { padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-right: none; border-radius: var(--radius-sm) 0 0 var(--radius-sm); color: var(--text-muted); font-weight: 600; font-size: 13.5px; }
.input-prefix input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.mk-loading,
.mk-empty {
    grid-column: 1 / -1;
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    background: var(--surface);
    font-size: 13px;
}

.mk-empty.compact,
.mk-loading.compact {
    border: 0;
    background: transparent;
    text-align: center;
}

.mk-chat-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-align: center;
    padding: 28px;
}

.mk-chat-empty svg {
    margin-bottom: 16px;
    opacity: .54;
}

.mk-chat-empty h3 {
    margin: 0 0 6px;
    color: var(--text);
    font-size: 16px;
}

.mk-chat-empty p {
    margin: 0;
    max-width: 360px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
}

.mk-modal-card {
    position: relative;
    width: min(680px, calc(100% - 28px));
    max-height: min(88vh, 820px);
    overflow-y: auto;
    padding: 24px;
    border: 1px solid rgba(245,245,247,0.10);
    border-radius: 10px;
    background: #202020;
    color: #F5F5F7;
    box-shadow: 0 24px 80px rgba(0,0,0,0.46);
}

.mk-modal-card h2 {
    margin: 0 0 20px;
    color: #F5F5F7;
    font-size: 18px;
}

.mk-modal-subtitle {
    margin: -10px 0 20px;
    color: #A1A1A6;
    font-size: 13px;
    line-height: 1.5;
}

.mk-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(245,245,247,0.10);
    border-radius: 8px;
    background: #303634;
    color: #A1A1A6;
    cursor: pointer;
}

.mk-modal-close:hover {
    color: #F5F5F7;
    border-color: rgba(230,255,240,0.22);
}

.mk-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.btn-primary {
    min-height: 42px;
    padding: 0 18px;
    border: 0;
    border-radius: 8px;
    background: #e6fff0;
    color: #202020;
    font-family: var(--font-main);
    font-size: 13.5px;
    font-weight: 800;
    cursor: pointer;
}

.btn-primary:disabled,
.btn-novo-anuncio:disabled {
    opacity: .72;
    cursor: wait;
}

.mk-toast-box {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.mk-toast {
    max-width: 360px;
    transform: translateY(10px);
    opacity: 0;
    padding: 13px 15px;
    border-radius: 8px;
    border: 1px solid rgba(245,245,247,0.10);
    background: #303634;
    color: #F5F5F7;
    font-size: 13px;
    line-height: 1.45;
    box-shadow: 0 16px 44px rgba(0,0,0,0.32);
    transition: opacity .2s, transform .2s;
}

.mk-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.mk-toast.is-success {
    border-color: rgba(230,255,240,0.22);
    background: #1F302A;
}

.mk-toast.is-error {
    border-color: rgba(244,178,178,0.20);
    background: #352525;
}

@media (max-width: 768px) {
    .mk-public-topbar {
        padding: 14px 18px;
    }
    .mk-public-nav a {
        min-height: 34px;
        padding: 0 9px;
        font-size: 12px;
    }
    .mk-public-hero {
        grid-template-columns: 1fr;
        min-height: auto;
        align-items: start;
    }
    .mk-header { flex-direction: column; align-items: stretch; }
    .mk-tabs-nav { gap: 10px; overflow-x: auto; }
    .mk-tab-btn { white-space: nowrap; }
    .form-grid-2 { grid-template-columns: 1fr; }
    .mk-inbox { flex-direction: column; height: auto; }
    .mk-chat-list { width: 100%; border-right: none; border-bottom: 1px solid var(--border); max-height: 250px; }
    .mk-chat-window { height: 400px; }
}
