/* =========================================================================
   بازارچه سُکانه — بازطراحی ساده‌تر و آیکون‌محور (بعد از market.css و ui_kit.css بارگذاری می‌شود)
   ========================================================================= */

/* ---------- سربرگ صفحه‌ی اصلی ---------- */
.mk-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.mk-top__text { min-width: 0; }
.mk-top__title { margin: 0; font-size: 1.45rem; font-weight: 800; line-height: 1.5; }
.mk-top__sub { margin: 2px 0 0; font-size: var(--fs-xs); color: var(--sk-muted); line-height: 1.8; }
.mk-top__actions { flex: none; display: flex; gap: 8px; }

/* «بازارچه من» فشرده */
.mk-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 8px; margin-bottom: 14px; }
.mk-strip a {
    display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 0 10px; border: 1px solid var(--sk-line); border-radius: 14px;
    background: var(--sk-surface); color: var(--sk-ink); font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.mk-strip a .sk-ico { font-size: 19px; color: var(--sk-primary); }
.mk-strip a b { font-size: 1rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.mk-strip a span { color: var(--sk-muted); }
.mk-strip a:hover { border-color: var(--sk-primary-soft-border); }
.mk-strip a.is-alert { background: var(--sk-accent-soft); border-color: #F2D9A9; }
.mk-strip a.is-alert .sk-ico, .mk-strip a.is-alert b { color: var(--sk-accent-text); }
.mk-strip .mk-strip__go { background: var(--sk-primary); border-color: var(--sk-primary); color: #FFFFFF; padding: 0 14px; }
.mk-strip .mk-strip__go .sk-ico, .mk-strip .mk-strip__go span { color: #FFFFFF; }

/* ---------- جستجو، فیلتر، زبانه‌ی نوع ---------- */
.mk-toolbar { display: flex; align-items: center; gap: 8px; }
.mk-search input { min-height: 50px; border-radius: 16px; }
.mk-filter-btn { position: relative; display: none; width: 50px; min-height: 50px; padding: 0; border-radius: 16px; align-items: center; justify-content: center; }
.mk-filter-btn .sk-ico { font-size: 22px; }
.mk-filter-btn__count { position: absolute; top: -5px; left: -5px; }
.mk-tabs3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 10px; padding: 4px; border-radius: 16px; background: var(--sk-line); }
.mk-tabs3 a { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 6px; border-radius: 12px; color: var(--sk-muted); font-size: var(--fs-sm); font-weight: 800; text-decoration: none; }
.mk-tabs3 a .sk-ico { font-size: 19px; }
.mk-tabs3 a small { font-size: 11px; font-weight: 700; padding: 0 6px; border-radius: 999px; background: rgba(15, 37, 48, 0.07); font-variant-numeric: tabular-nums; }
.mk-tabs3 a.is-active { background: var(--sk-surface); color: var(--sk-primary); box-shadow: var(--sk-shadow-sm); }
.mk-tabs3 a.is-active[data-kind=demand] { color: var(--sk-accent-text); }
.mk-cats { margin-top: 10px; }
.mk-cats a { min-height: 32px; font-weight: 700; }
.mk-locset { margin: 0; padding: 0; border: none; min-width: 0; }
.mk-locset legend { padding: 0; margin-bottom: 6px; }
.mk-locset .ui-seg > label { min-height: 62px; }
.mk-sort { display: inline-flex; min-width: 0; }
.mk-sort .ui-select { min-width: 150px; }
.mk-sort .ui-select__btn { border: 1px solid var(--sk-line); }
.mk-results__bar .mk-active a { background: var(--sk-primary-soft); }

/* کارت آگهی: ساده‌تر */
.mk-card { border-radius: 20px; }
.mk-card__facts { gap: 2px; }

/* ---------- «چطور کار می‌کند» و راهنما ---------- */
.mk-how { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.mk-how__box { width: 100%; border: 1px solid var(--sk-line); border-radius: 16px; background: var(--sk-surface); }
.mk-how__box summary { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; list-style: none; cursor: pointer; font-size: var(--fs-sm); font-weight: 800; }
.mk-how__box summary::-webkit-details-marker { display: none; }
.mk-how__box summary .sk-ico { font-size: 20px; color: var(--sk-primary); }
.mk-how__box summary span { flex: 1; }
.mk-how__chev { transition: transform 0.18s ease; color: var(--sk-muted) !important; }
.mk-how__box[open] .mk-how__chev { transform: rotate(180deg); }
.mk-how__box .mk-how__steps { padding: 0 14px 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mk-how__box .mk-how__steps li { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px; border: none; border-radius: 14px; background: var(--sk-ground); }
.mk-how__box .mk-how__steps li .sk-ico { font-size: 22px; color: var(--sk-primary); }
.mk-how__box .mk-how__steps b { font-size: var(--fs-xs); }
.mk-how__box .mk-how__steps li span:last-child { font-size: 12px; line-height: 1.8; }
.ui-linkbtn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 4px; border: none; background: none; color: var(--sk-primary); font: inherit; font-size: var(--fs-xs); font-weight: 800; cursor: pointer; }
.ui-linkbtn .sk-ico { font-size: 18px; }
.mk-note { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--sk-ground); color: var(--sk-muted); font-size: 12px; line-height: 1.9; }
.mk-note .sk-ico { font-size: 17px; color: var(--sk-primary); flex: none; margin-top: 2px; }

/* ---------- انتخاب کد تعرفه ---------- */
.mk-hs-pick__chosen { gap: 8px; border: 1px solid var(--sk-primary-soft-border); }
.mk-hs-pick__ico { display: inline-flex; font-size: 22px; color: var(--sk-primary); }
.mk-hs-pick__chosen button { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 10px; background: var(--sk-surface); color: var(--sk-danger); font-size: 17px; }
.mk-hs-list { margin-top: 8px; max-height: min(52vh, 340px); overflow-y: auto; overscroll-behavior: contain; border-radius: 16px; box-shadow: var(--sk-shadow-sm); }
.mk-hs-list button { grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; padding: 12px 14px; align-items: start; }
.mk-hs-list button b { grid-row: span 2; align-self: center; min-width: 88px; padding: 6px 10px; border-radius: 10px; background: var(--sk-primary-soft); text-align: center; letter-spacing: 0.03em; font-size: 0.86rem; }
.mk-hs-list button span { font-size: var(--fs-sm); line-height: 1.7; }
.mk-hs-list button small { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 11.5px; line-height: 1.7; }
.mk-hs-list button small em { font-style: normal; padding: 0 8px; border-radius: 999px; background: var(--sk-success-soft); color: var(--sk-success); font-weight: 800; }
.mk-hs-list button small em.is-banned { background: var(--sk-danger-soft); color: var(--sk-danger); }
.mk-hs-hint { display: block; margin-top: 6px; }

/* ---------- گروه ورودی غیرفعال (قیمت توافقی) ---------- */
.ui-group:has(input:disabled) { opacity: 0.6; }

/* ---------- کارتابل ---------- */
.mk-deskhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.mk-deskhead h1 { margin: 0; font-size: 1.45rem; font-weight: 800; }
.mk-deskhead p { margin: 2px 0 0; font-size: var(--fs-xs); color: var(--sk-muted); }
.mk-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.mk-tabs a {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 74px; padding: 10px 4px; border: 1px solid var(--sk-line);
    border-radius: 18px; background: var(--sk-surface); color: var(--sk-muted); font-size: 11.5px; font-weight: 800; line-height: 1.4; text-align: center; text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.mk-tabs a .sk-ico { font-size: 24px; }
.mk-tabs a:hover { border-color: var(--sk-primary-soft-border); }
.mk-tabs a.is-on { border-color: var(--sk-primary); background: var(--sk-primary-soft); color: var(--sk-primary); }
.mk-tabs__n { position: absolute; top: 6px; left: 8px; min-width: 20px; height: 20px; padding: 0 6px; box-sizing: border-box; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--sk-ground); color: var(--sk-ink); font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; }
.mk-tabs a.is-alert .mk-tabs__n { background: var(--sk-accent); color: var(--sk-accent-ink); }
.mk-tabs a.is-on .mk-tabs__n { background: var(--sk-primary); color: #FFFFFF; }
.mk-deskinfo { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 8px 8px 8px 12px; border-radius: 14px; background: var(--sk-ground); font-size: 12px; color: var(--sk-muted); }
.mk-deskinfo .sk-ico { font-size: 18px; color: var(--sk-primary); flex: none; }
.mk-deskinfo > span { flex: 1; min-width: 0; line-height: 1.8; }
.mk-deskinfo b { color: var(--sk-ink); }
.mk-deskinfo a { color: var(--sk-primary); font-weight: 800; text-decoration: none; white-space: nowrap; }
.mk-rows { border-radius: 20px; }
.mk-row__meta .mk-kind { padding: 0 8px; font-size: 11px; }

/* ---------- مدیریت آگهی (صفحه‌ی آگهی) ---------- */
.mk-manage__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mk-manage__head .br-card__title { margin: 0; }
.mk-manage .ui-actions { margin-top: 12px; }
.mk-manage .mk-stats3 { margin-top: 12px; }

@media (max-width: 900px) {
    .mk-filter-btn { display: inline-flex; }
    .mk-toolbar { display: flex; grid-template-areas: none; }
    .mk-tabs3 a { font-size: var(--fs-xs); }
    .mk-browse__body { margin-top: 10px; }
}
@media (max-width: 768px) {
    .mk-top__title { font-size: 1.25rem; }
    .mk-top__sub { display: none; }
    .mk-top__actions .ui-iconbtn { padding: 0 10px; min-height: 42px; }
    .mk-how__box .mk-how__steps { grid-template-columns: minmax(0, 1fr); }
    .mk-how__box .mk-how__steps li { flex-direction: row; align-items: center; gap: 10px; }
    .mk-how__box .mk-how__steps li b { white-space: nowrap; }
    .mk-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .mk-strip .mk-strip__go { grid-column: 1 / -1; min-height: 44px; }
    .mk-strip a { padding: 0 6px; gap: 5px; }
    .mk-strip a b { font-size: 1.05rem; }
    .mk-deskhead h1 { font-size: 1.25rem; }
    .mk-deskhead p { display: none; }
    .mk-hs-list { max-height: 38vh; }
}

/* «نامرتبط است»: دلیل (دراپ‌دان فشرده) + دکمه‌ی آیکونی در یک ردیف */
.mk-dismiss { flex-wrap: nowrap; margin-inline-start: auto; }
.mk-dismiss .ui-select { width: 150px; }
.mk-dismiss .ui-select__btn { min-height: 38px; border-radius: 12px; font-size: 12px; }
.mk-match__actions { flex-wrap: nowrap; }
.mk-match__actions > .br-btn { flex: 1 1 auto; justify-content: center; }
.mk-logo-pick .ui-drop__zone { padding: 12px; }
.mk-logo-pick .ui-drop__ico { width: 40px; height: 40px; font-size: 20px; }
