/**
 * Figma Marketplace / Jobs browse (mobile ≤768).
 */

@media (max-width: 768px) {
  body.page-marketplace,
  body.hp-template--listings-view-page,
  body.tax-hp_listing_category,
  body.post-type-archive-hp_listing {
    background: #F3F8F8 !important;
  }

  body.page-marketplace .site-content,
  body.hp-template--listings-view-page .site-content,
  body.tax-hp_listing_category .site-content,
  body.post-type-archive-hp_listing .site-content {
    background: #F3F8F8 !important;
  }

  .hp-page__header.lc-mkt-hide-default-search {
    display: none !important;
  }

  /* Hide sidebar / sort clutter under Figma chrome */
  body.page-marketplace .hp-page__sidebar,
  body.hp-template--listings-view-page .hp-page__sidebar,
  body.tax-hp_listing_category .hp-page__sidebar {
    display: none !important;
  }

  body.page-marketplace .hp-page__content,
  body.hp-template--listings-view-page .hp-page__content,
  body.tax-hp_listing_category .hp-page__content,
  body.post-type-archive-hp_listing .hp-page__content {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 16px 100px !important;
    margin: 0 !important;
  }

  body.page-marketplace .hp-page__topbar,
  body.hp-template--listings-view-page .hp-page__topbar,
  body.tax-hp_listing_category .hp-page__topbar,
  body.page-marketplace .hp-button--listing-filter,
  body.hp-template--listings-view-page .hp-button--listing-filter,
  body.tax-hp_listing_category .hp-button--listing-filter,
  body.page-marketplace .hp-form--listing-sort,
  body.hp-template--listings-view-page .hp-form--listing-sort,
  body.tax-hp_listing_category .hp-form--listing-sort,
  body.page-marketplace .hp-result-count,
  body.hp-template--listings-view-page .hp-result-count {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .hp-listing--mobile-list,
  .marketplace-mobile-list .hp-listing,
  body.page-marketplace .hp-listing--mobile-list,
  body.hp-template--listings-view-page .hp-listings .hp-listing.hp-listing--mobile-list,
  body.page-marketplace .hp-listings .hp-listing.hp-listing--mobile-list {
    display: grid !important;
    grid-template-columns: 74px minmax(0, 1fr) !important;
    gap: 12px !important;
    align-items: start !important;
    width: 100% !important;
    min-height: 92px !important;
    margin: 0 !important;
    padding: 9px 10px !important;
    background: #fff !important;
    background-color: #fff !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: 16px !important;
    box-shadow: 0 2px 12px -6px rgba(0, 0, 0, 0.05) !important;
    overflow: hidden !important;
    position: relative !important;
  }

  body.page-marketplace .hp-listing--mobile-list .lc-wa-btn,
  body.page-marketplace .hp-listing--mobile-list [class*="whatsapp"],
  body.page-marketplace .hp-listing--mobile-list a[href*="wa.me"],
  body.page-marketplace .hp-listing--mobile-list a[href*="whatsapp"],
  body.page-marketplace .lc-clickable-listing-card .whatsapp,
  body.hp-template--listings-view-page .hp-listing--mobile-list a[href*="wa.me"] {
    display: none !important;
  }

  /* ——— Chrome ——— */
  .lc-mkt {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    margin: 8px 0 18px;
    font-family: "Abhaya Libre", Georgia, serif;
  }

  .lc-mkt .lc-sos-listen {
    margin: 0 !important;
  }

  .lc-mkt__browse {
    display: none !important;
  }

  .lc-mkt__browse-icon {
    display: inline-flex;
    flex-shrink: 0;
  }

  .lc-mkt__browse-title {
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.2;
  }

  .lc-mkt__search {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 48px;
    padding: 0 16px;
    border-radius: 24px;
    background: #F8F9FA;
    outline: 1.5px solid #B8D5D6;
    outline-offset: -1.5px;
    box-shadow: 0 2px 10px -6px rgba(0, 0, 0, 0.04);
  }

  .lc-mkt__search-icon {
    display: inline-flex;
    flex-shrink: 0;
  }

  .lc-mkt__search input[type="search"] {
    flex: 1 1 auto;
    min-width: 0;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    font-family: "Abhaya Libre", Georgia, serif !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    color: #4A4A4A !important;
    padding: 0 !important;
    margin: 0 !important;
    height: auto !important;
  }

  .lc-mkt__search input[type="search"]::placeholder {
    color: #4A4A4A;
    opacity: 0.85;
  }

  .lc-mkt__mic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: default;
    flex-shrink: 0;
  }

  .lc-mkt__chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .lc-mkt__chips::-webkit-scrollbar {
    display: none;
  }

  .lc-mkt__chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: #fff;
    outline: 1px solid #B8D5D6;
    outline-offset: -1px;
    color: #0A4650 !important;
    font-family: "Abhaya Libre", "Noto Sans Sinhala", "Noto Sans Tamil", Georgia, serif;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none !important;
    white-space: nowrap;
  }

  .lc-mkt__chip.is-active {
    background: linear-gradient(180deg, #0A454F 0%, #137377 100%);
    outline: none;
    color: #fff !important;
  }

  .lc-mkt__featured {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 55px;
    padding: 12px 16px;
    border-radius: 16px;
    background: linear-gradient(90deg, #FF9900 0%, #FFBF57 100%);
    box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.07);
    text-decoration: none !important;
  }

  .lc-mkt__featured-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .lc-mkt__featured-text {
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15);
  }

  .lc-mkt__post {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 0 16px;
    border-radius: 14px;
    background: linear-gradient(90deg, #137477 0%, #0A454F 100%);
    text-decoration: none !important;
  }

  .lc-mkt__post-icon {
    display: inline-flex;
    flex-shrink: 0;
  }

  .lc-mkt__post-text {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
  }

  /* ——— Listing cards (HivePress mobile list) ——— */
  .marketplace-mobile-list,
  .hp-listings.marketplace-mobile-list,
  ul.hp-listings {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }

  .marketplace-mobile-list .hp-grid__item,
  .hp-listings .hp-grid__item {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 auto !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .hp-listing--mobile-list,
  .marketplace-mobile-list .hp-listing,
  body.page-marketplace .hp-listings .hp-listing.hp-listing--mobile-list,
  body.hp-template--listings-view-page .hp-listings .hp-listing.hp-listing--mobile-list {
    display: grid !important;
    grid-template-columns: 74px minmax(0, 1fr) !important;
    gap: 12px !important;
    align-items: start !important;
    width: 100% !important;
    min-height: 92px !important;
    margin: 0 !important;
    padding: 9px 10px !important;
    background: #fff !important;
    background-color: #fff !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: 16px !important;
    box-shadow: 0 2px 12px -6px rgba(0, 0, 0, 0.05) !important;
    overflow: hidden !important;
  }

  .hp-listing--mobile-list .hp-listing__mobile-thumb,
  .marketplace-mobile-list .hp-listing__header,
  .marketplace-mobile-list .hp-listing__image {
    width: 74px !important;
    height: 74px !important;
    min-width: 74px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    background: #D5E0EB !important;
  }

  .hp-listing--mobile-list .hp-listing__mobile-thumb a,
  .hp-listing--mobile-list .hp-listing__mobile-thumb img,
  .marketplace-mobile-list .hp-listing__image a,
  .marketplace-mobile-list .hp-listing__image img {
    display: block !important;
    width: 74px !important;
    height: 74px !important;
    object-fit: cover !important;
    border-radius: 8px !important;
  }

  .hp-listing--mobile-list .hp-listing__mobile-content,
  .marketplace-mobile-list .hp-listing__content {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .hp-listing--mobile-list .hp-listing__mobile-category,
  .marketplace-mobile-list .hp-listing__categories {
    display: none !important;
  }

  .hp-listing--mobile-list .hp-listing__mobile-title,
  .hp-listing--mobile-list .hp-listing__mobile-title a,
  .marketplace-mobile-list .hp-listing__title,
  .marketplace-mobile-list .hp-listing__title a {
    margin: 0 !important;
    color: #0A444E !important;
    font-family: "Abhaya Libre", Georgia, serif !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    text-decoration: none !important;
  }

  .hp-listing--mobile-list .hp-listing__mobile-price,
  .hp-listing--mobile-list .hp-listing__mobile-attr--price,
  .marketplace-mobile-list .hp-listing__attribute--price {
    color: #0A4852 !important;
    font-family: "Abhaya Libre", Georgia, serif !important;
    font-size: 14px !important;
    font-weight: 800 !important;
  }

  .hp-listing--mobile-list .hp-listing__mobile-attrs,
  .marketplace-mobile-list .hp-listing__attributes .hp-row,
  .marketplace-mobile-list .hp-listing__attributes {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 4px 8px !important;
    margin: 2px 0 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }

  .hp-listing--mobile-list .hp-listing__mobile-attr,
  .marketplace-mobile-list .hp-listing__attribute {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #1E1E1E !important;
    font-family: "Abhaya Libre", Georgia, serif !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.3 !important;
  }

  .hp-listing--mobile-list .hp-listing__mobile-attr:empty {
    display: none !important;
  }

  .hp-listing--mobile-list .hp-listing__mobile-attr--location::before,
  .hp-listing--mobile-list .hp-listing__mobile-attr--jobtype::before,
  .hp-listing--mobile-list .hp-listing__mobile-attr--salary::before,
  .hp-listing--mobile-list .hp-listing__mobile-attr--benefit::before {
    content: "";
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    background: #0B4750;
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
  }

  .hp-listing--mobile-list .hp-listing__mobile-attr--location::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5A2.5 2.5 0 1 1 12 6a2.5 2.5 0 0 1 0 5.5z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5A2.5 2.5 0 1 1 12 6a2.5 2.5 0 0 1 0 5.5z'/%3E%3C/svg%3E");
  }

  .hp-listing--mobile-list .hp-listing__mobile-attr--jobtype::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm1 11H7v-2h4V6h2v7z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm1 11H7v-2h4V6h2v7z'/%3E%3C/svg%3E");
  }

  .hp-listing--mobile-list .hp-listing__mobile-attr--salary::before {
    border-radius: 50%;
    box-shadow: inset 0 0 0 1.5px #0B4750;
    background: transparent;
    mask: none;
    -webkit-mask: none;
  }

  .hp-listing--mobile-list .hp-listing__mobile-attr--benefit::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z'/%3E%3C/svg%3E");
  }

  .marketplace-mobile-list .hp-listing__footer,
  .marketplace-mobile-list .hp-listing__actions,
  .marketplace-mobile-list .hp-listing__created-date,
  .marketplace-mobile-list .hp-listing__verified-badge,
  .marketplace-mobile-list .hp-listing__featured-badge {
    display: none !important;
  }

  body.page-marketplace .hp-pagination,
  body.hp-template--listings-view-page .hp-pagination {
    margin: 20px 0 0 !important;
  }
}
