/*! Fachowiec24 R25.8.4 — safe Marketplace core and CSS-only native form */
.f24-m2-market-hub {
  --m2-accent:#6d28d9;
  --m2-accent-2:#8b5cf6;
  background:#f7f7fb;
  color:#172033;
  padding:18px 14px 2px;
}
.f24-m2-market-hub[data-mode="rental"] { --m2-accent:#1d4ed8; --m2-accent-2:#38bdf8; }
.f24-m2-market-hub[data-mode="service"] { --m2-accent:#047857; --m2-accent-2:#34d399; }
.f24-m2-hub-inner { max-width:1500px; margin:0 auto; }
.f24-m2-tabs {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:6px;
  max-width:520px;
  padding:5px;
  border:1px solid #e2e8f0;
  border-radius:17px;
  background:#fff;
  box-shadow:0 5px 18px rgba(15,23,42,.04);
}
.f24-m2-tab {
  min-height:44px;
  border:0;
  border-radius:12px;
  background:transparent;
  color:#64748b;
  font-size:13px;
  font-weight:900;
  transition:background .18s,color .18s,transform .18s;
}
.f24-m2-tab:hover { background:#f8fafc; color:#334155; }
.f24-m2-tab.is-active {
  background:var(--m2-accent);
  color:#fff;
  box-shadow:0 7px 18px color-mix(in srgb,var(--m2-accent) 25%,transparent);
}
.f24-m2-hero {
  position:relative;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:28px;
  min-height:205px;
  margin-top:14px;
  padding:30px 36px;
  overflow:hidden;
  border-radius:28px;
  background:linear-gradient(135deg,var(--m2-accent),var(--m2-accent-2));
  color:#fff;
  box-shadow:0 20px 45px color-mix(in srgb,var(--m2-accent) 18%,transparent);
}
.f24-m2-hero:after {
  content:"";
  position:absolute;
  right:-70px;
  top:-92px;
  width:300px;
  height:300px;
  border:56px solid rgba(255,255,255,.11);
  border-radius:50%;
}
.f24-m2-hero-copy { position:relative; z-index:2; max-width:650px; }
.f24-m2-kicker { font-size:11px; font-weight:950; letter-spacing:.12em; text-transform:uppercase; opacity:.82; }
.f24-m2-hero h2 { margin:8px 0 7px; font-size:clamp(24px,3vw,40px); line-height:1.05; letter-spacing:-.035em; font-weight:950; }
.f24-m2-hero p { margin:0; max-width:560px; font-size:14px; opacity:.88; }
.f24-m2-add {
  min-height:46px;
  margin-top:20px;
  padding:0 19px;
  border:0;
  border-radius:14px;
  background:#fff;
  color:var(--m2-accent);
  font-size:13px;
  font-weight:950;
  box-shadow:0 7px 22px rgba(15,23,42,.16);
}
.f24-m2-hero-art { position:relative; z-index:1; display:grid; place-items:center; min-width:160px; font-size:94px; filter:drop-shadow(0 15px 22px rgba(15,23,42,.25)); transform:rotate(4deg); }
.f24-m2-category-heading { margin:18px 0 9px; font-size:14px; font-weight:950; }
.f24-m2-chips { display:flex; gap:8px; overflow:auto; padding:0 0 12px; scrollbar-width:none; }
.f24-m2-chips::-webkit-scrollbar { display:none; }
.f24-m2-chip {
  flex:none;
  min-height:38px;
  padding:0 13px;
  border:1px solid #e2e8f0;
  border-radius:12px;
  background:#fff;
  color:#475569;
  font-size:11px;
  font-weight:850;
}
.f24-m2-chip.is-active { border-color:var(--m2-accent); background:color-mix(in srgb,var(--m2-accent) 8%,white); color:var(--m2-accent); }
.f24-m2-type-badge { border:0!important; color:#fff!important; letter-spacing:.07em; }
.f24-m2-rental-card .f24-m2-type-badge { background:rgba(29,78,216,.94)!important; }
.f24-m2-service-card .f24-m2-type-badge { background:rgba(4,120,87,.94)!important; }
.f24-m2-rental-card { border-color:#bfdbfe!important; }
.f24-m2-service-card { border-color:#a7f3d0!important; }
.f24-m2-price-unit { display:inline; color:#64748b; font-size:10px; font-weight:800; white-space:normal; }
.f24-m2-detail-ribbon { display:flex; align-items:center; justify-content:center; gap:10px; min-height:44px; padding:8px 16px; background:#eff6ff; border-bottom:1px solid #bfdbfe; color:#1d4ed8; font-size:12px; }
.f24-m2-detail-ribbon strong { padding:5px 8px; border-radius:8px; background:#1d4ed8; color:#fff; font-size:9px; letter-spacing:.08em; }

/* R25.8.3 stable layout.
 * The compiled R25.7 page still renders its legacy violet hero directly after
 * the new M2 hub. Keep the complete original category strip for sale and hide
 * only the duplicate hero. Rental and service modes use one relevant category
 * strip supplied by M2, so their old product-category strip stays hidden. */
.f24-market-page > .f24-m2-market-hub + section { display:none!important; }
.f24-m2-market-hub[data-mode="rental"] ~ .f24-market-main .f24-market-category-scroll,
.f24-m2-market-hub[data-mode="service"] ~ .f24-market-main .f24-market-category-scroll { display:none!important; }

/* Product condition is not meaningful for rental/service; delivery remains
 * available for rental equipment, while services keep price/location only. */
.f24-m2-market-hub[data-mode="rental"] ~ .f24-market-main #f24-m2-filter-panel > :nth-child(3),
.f24-m2-market-hub[data-mode="rental"] ~ .f24-market-main .f24-m2-filter-panel > :nth-child(3),
.f24-m2-market-hub[data-mode="service"] ~ .f24-market-main #f24-m2-filter-panel > :nth-child(3),
.f24-m2-market-hub[data-mode="service"] ~ .f24-market-main #f24-m2-filter-panel > :nth-child(4),
.f24-m2-market-hub[data-mode="service"] ~ .f24-market-main .f24-m2-filter-panel > :nth-child(3),
.f24-m2-market-hub[data-mode="service"] ~ .f24-market-main .f24-m2-filter-panel > :nth-child(4) { display:none!important; }

/* R25.8.2: production filter controls live one level deeper in .m2-row. */
.f24-m2-market-hub[data-mode="rental"] ~ .f24-market-main #f24-m2-filter-panel .m2-row > label:nth-child(3),
.f24-m2-market-hub[data-mode="service"] ~ .f24-market-main #f24-m2-filter-panel .m2-row > label:nth-child(3),
.f24-m2-market-hub[data-mode="service"] ~ .f24-market-main #f24-m2-filter-panel .m2-row > label:nth-child(4) { display:none!important; }

.f24-m2-form-mode { grid-column:1/-1; margin:-2px 0 5px; padding:14px; border:1px solid #ddd6fe; border-radius:17px; background:linear-gradient(145deg,#faf8ff,#f5f3ff); }
.f24-m2-form-label,.f24-m2-subcaption,.f24-m2-unit-caption { display:block; margin-bottom:7px; color:#334155; font-size:11px; font-weight:950; }
.f24-m2-form-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; padding:4px; border:1px solid #e2e8f0; border-radius:14px; background:#fff; }
.f24-m2-form-tab { min-height:44px; padding:0 6px; border:0; border-radius:10px; background:transparent; color:#64748b; font-size:11px; font-weight:900; }
.f24-m2-form-tab.is-active { background:#6d28d9; color:#fff; box-shadow:0 6px 15px rgba(109,40,217,.22); }
.f24-m2-form-hint { display:block; margin-top:8px; color:#7c3aed; font-size:9px; line-height:1.35; }
.f24-m2-subcategory-label,.f24-m2-unit-label { display:block; margin:0; color:#334155; font-size:11px; font-weight:900; }
.f24-m2-subcategory-select,.f24-m2-unit-select {
  display:block;
  width:100%;
  min-height:51px;
  padding:0 13px;
  border:1px solid #cbd5e1;
  border-radius:13px;
  background:#fff;
  color:#172033;
  font-size:16px;
  outline:none;
}
.f24-m2-subcategory-select:focus,.f24-m2-unit-select:focus { border-color:#8b5cf6; box-shadow:0 0 0 3px #ede9fe; }
.f24-m2-field-error { display:none; margin-top:5px; color:#dc2626; font-size:10px; font-weight:700; }
.f24-m2-subcategory-label.is-invalid .f24-m2-subcategory-select { border-color:#f87171; box-shadow:0 0 0 3px #fee2e2; }
.f24-m2-subcategory-label.is-invalid .f24-m2-field-error { display:block; }
.f24-m2-owner-mode { display:grid; grid-template-columns:1fr 1fr; gap:14px; grid-column:1/-1; margin-bottom:14px; }
.f24-m2-owner-mode .f24-m2-form-mode { margin:0; }
.f24-m2-owner-mode > .f24-m2-form-mode { grid-column:1/-1; }

@media (max-width:767px) {
  .f24-m2-market-hub { padding:12px 12px 0; }
  .f24-m2-tabs { position:relative; z-index:2; max-width:none; border-radius:16px; }
  .f24-m2-tab { min-height:42px; font-size:11px; }
  .f24-m2-hero { min-height:151px; margin-top:11px; padding:20px 18px; border-radius:21px; box-shadow:0 13px 28px color-mix(in srgb,var(--m2-accent) 18%,transparent); }
  .f24-m2-hero h2 { max-width:270px; margin-top:6px; font-size:22px; }
  .f24-m2-hero p { max-width:275px; font-size:11px; line-height:1.4; }
  .f24-m2-kicker { font-size:9px; }
  .f24-m2-add { min-height:42px; margin-top:13px; padding:0 15px; font-size:11px; }
  .f24-m2-hero-art { position:absolute; right:9px; bottom:8px; min-width:0; font-size:55px; opacity:.32; }
  .f24-m2-category-heading { margin-top:15px; }
  .f24-m2-chips { margin-right:-12px; padding-right:12px; }
  .f24-m2-chip { min-height:38px; }
  .f24-market-page article[role="link"] { border-radius:17px!important; }
  .f24-m2-owner-mode { grid-template-columns:1fr; }
  .f24-m2-owner-mode > * { grid-column:1!important; }
  .f24-m2-form-mode { padding:12px; }
  .f24-m2-form-tab { min-height:46px; font-size:10px; }
  .f24-create-modal-overlay .f24-m2-subcategory-label,
  .f24-create-modal-overlay .f24-m2-unit-label { grid-column:1/-1; }
}

@media (prefers-reduced-motion:reduce) {
  .f24-m2-tab,.f24-m2-chip,.f24-m2-add { transition:none!important; }
}

/* The production React form remains authoritative.  These rules only change
 * layout and never replace fields, intercept typing, save drafts or submit on
 * the user's behalf. */
.f24-create-modal-panel {
  width:min(100%,48rem);
}
.f24-create-modal-body > * {
  min-width:0;
}
.f24-create-modal-body input:not([type="checkbox"]),
.f24-create-modal-body select,
.f24-create-modal-body textarea {
  max-width:100%;
}
.f24-create-actions button {
  min-height:48px;
}
.f24-r2584-special-banner {
  grid-column:1/-1;
  display:flex;
  flex-direction:column;
  gap:4px;
  padding:14px 15px;
  border:1px solid #ddd6fe;
  border-radius:16px;
  background:linear-gradient(145deg,#faf8ff,#f5f3ff);
  color:#5b21b6;
}
.f24-create-modal-overlay[data-f24-r2584-safe="rental"] .f24-r2584-special-banner {
  border-color:#bfdbfe;
  background:linear-gradient(145deg,#f8fbff,#eff6ff);
  color:#1d4ed8;
}
.f24-create-modal-overlay[data-f24-r2584-safe="service"] .f24-r2584-special-banner {
  border-color:#a7f3d0;
  background:linear-gradient(145deg,#f7fffb,#ecfdf5);
  color:#047857;
}
.f24-r2584-special-banner strong {
  font-size:13px;
  font-weight:950;
}
.f24-r2584-special-banner span {
  font-size:11px;
  line-height:1.4;
  opacity:.86;
}
.f24-r2584-special-field {
  min-width:0;
}

@supports selector(body:has(.f24-create-modal-overlay)) {
  body:has(.f24-create-modal-overlay) {
    overflow:hidden!important;
  }
}

@media (max-width:767px) {
  .f24-create-modal-overlay {
    display:flex!important;
    align-items:flex-end!important;
    padding:0!important;
    overflow:hidden!important;
    overscroll-behavior:contain;
  }
  .f24-create-modal-panel {
    display:flex!important;
    flex-direction:column!important;
    width:100%!important;
    max-width:none!important;
    max-height:100dvh!important;
    margin:0!important;
    overflow:hidden!important;
    border-radius:24px 24px 0 0!important;
  }
  .f24-create-modal-header {
    position:relative!important;
    z-index:3!important;
    flex:none!important;
    padding:15px 16px!important;
    background:#fff!important;
  }
  .f24-create-modal-header h2 {
    font-size:19px!important;
    line-height:1.2!important;
  }
  .f24-create-modal-header > button {
    display:grid!important;
    place-items:center!important;
    width:44px!important;
    min-width:44px!important;
    height:44px!important;
    margin:-7px -7px -7px 8px!important;
    border-radius:13px!important;
  }
  .f24-create-modal-body {
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:14px!important;
    flex:1 1 auto!important;
    min-height:0!important;
    padding:16px!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
  }
  .f24-create-modal-body > * {
    grid-column:1/-1!important;
    width:100%!important;
    min-width:0!important;
    margin-left:0!important;
    margin-right:0!important;
  }
  .f24-create-modal-body input:not([type="checkbox"]),
  .f24-create-modal-body select,
  .f24-create-modal-body textarea {
    box-sizing:border-box!important;
    width:100%!important;
    min-width:0!important;
    min-height:50px!important;
    margin-top:7px!important;
    padding:12px 13px!important;
    border-radius:13px!important;
    font-size:16px!important;
    line-height:1.3!important;
  }
  .f24-create-modal-body textarea {
    min-height:142px!important;
    resize:vertical!important;
  }
  .f24-create-modal-body input[type="file"] {
    min-height:58px!important;
    padding:10px!important;
    font-size:13px!important;
  }
  .f24-create-options {
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:8px!important;
    margin-top:2px!important;
  }
  .f24-create-options label {
    display:flex!important;
    align-items:center!important;
    gap:10px!important;
    min-height:46px!important;
    padding:10px 12px!important;
    border:1px solid #e2e8f0!important;
    border-radius:13px!important;
    background:#f8fafc!important;
  }
  .f24-create-actions {
    position:relative!important;
    z-index:4!important;
    display:grid!important;
    grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr)!important;
    gap:9px!important;
    flex:none!important;
    padding:11px 16px calc(11px + env(safe-area-inset-bottom))!important;
    border-top:1px solid #e2e8f0!important;
    background:rgba(255,255,255,.98)!important;
    box-shadow:0 -10px 25px rgba(15,23,42,.08)!important;
  }
  .f24-create-actions button {
    width:100%!important;
    min-width:0!important;
    min-height:52px!important;
    margin:0!important;
    padding:0 12px!important;
    border-radius:14px!important;
    font-size:14px!important;
  }
  .f24-create-actions button:last-child {
    box-shadow:0 8px 20px rgba(109,40,217,.23)!important;
  }
}
