/* SP: Giao diện riêng cụm dưới trang chủ PC, không đụng bản điện thoại. */
.pcHomeOnlyMarker{display:none;}

@media (min-width:1024px){
  :root{
    --pc-home-filter-width:1180px; /* SP chỉnh chiều rộng bộ lọc PC tại đây */
    --pc-home-ad-width:850px; /* SP chỉnh chiều rộng quảng cáo PC tại đây */
  }

  /* SP: Ẩn cụm danh mục icon ở trang chủ PC */
  #page-home .homeCategorySection{
    display:none !important;
  }

  /* SP: Bộ lọc PC nằm giữa trang và hiển thị đầy đủ */
  #page-home .homeFilters,
  #page-search-results .homeFilters{
    width:min(100%, var(--pc-home-filter-width));
    max-width:var(--pc-home-filter-width);
    margin:0 auto;
    padding:12px 0 0;
    display:flex;
    flex-wrap:nowrap;
    justify-content:center;
    align-items:center;
    gap:8px;
    overflow:visible;
    scrollbar-width:auto;
    scroll-snap-type:none;
  }

  #page-home .homeFilters::-webkit-scrollbar,
  #page-search-results .homeFilters::-webkit-scrollbar{
    display:none;
  }

  #page-home .homeFilterBtn,
  #page-search-results .homeFilterBtn{
    flex:0 0 auto;
    white-space:nowrap;
  }

  /* SP: Ẩn nút Menu góc phải ở bản PC, không ảnh hưởng điện thoại */
  #page-home .homeSection__menuBtn,
  #page-search-results .homeSection__menuBtn{
    display:none !important;
  }

  /* SP: Quảng cáo trang chủ PC nằm giữa trang và thu chiều ngang lại */
  #page-home .homeAdBanner{
    width:min(100%, var(--pc-home-ad-width));
    max-width:var(--pc-home-ad-width);
    margin:14px auto 10px;
  }
}

/* SP v322: PC - thu nhỏ toàn bộ tab nổi nhỏ còn 2/10 màn hình, giữ chữ y cũ, hiện giữa màn hình từ dưới lên. Không ảnh hưởng điện thoại. */
@media (min-width:1024px){
  :root{
    --pc-floating-small-width:20vw; /* SP: chiều ngang tab nổi nhỏ PC = 2/10 màn hình */
    --pc-floating-small-min-width:220px; /* SP: chống quá nhỏ trên màn PC hẹp */
    --pc-floating-small-max-width:420px; /* SP: giới hạn rộng tối đa tab nổi nhỏ PC */
    --pc-floating-small-max-height:72vh; /* SP: chiều cao tối đa tab nổi nhỏ PC */
  }

  @keyframes pcFloatingSmallRise{
    from{transform:translate(-50%, calc(-50% + 44px));opacity:.01;}
    to{transform:translate(-50%, -50%);opacity:1;}
  }

  .homeFilterModal,
  .spPickerModal,
  .detailPhoneActionSheet,
  .profileIntroSheet,
  .authSupportOverlay,
  .appPopupOverlay,
  .contactChatPopupHost{
    display:flex;
    align-items:center;
    justify-content:center;
  }

  .homeFilterModal__sheet,
  .spPickerModal__sheet,
  .detailPhoneActionSheet__panel,
  .profileIntroSheet__panel,
  .authSupportSheet,
  .appPopupSheet,
  .contactChatPopupHost .contactChatSheet--popup{
    position:absolute !important;
    left:50% !important;
    right:auto !important;
    top:50% !important;
    bottom:auto !important;
    width:clamp(var(--pc-floating-small-min-width), var(--pc-floating-small-width), var(--pc-floating-small-max-width)) !important;
    max-width:clamp(var(--pc-floating-small-min-width), var(--pc-floating-small-width), var(--pc-floating-small-max-width)) !important;
    min-width:0 !important;
    max-height:var(--pc-floating-small-max-height) !important;
    border-radius:22px !important;
    transform:translate(-50%, -50%) !important;
    animation:pcFloatingSmallRise .22s ease both;
    box-sizing:border-box;
    overflow:hidden;
    margin:0 !important;
  }

  .homeFilterModal__sheet,
  .spPickerModal__sheet,
  .contactChatPopupHost .contactChatSheet--popup{
    height:auto !important;
    min-height:0 !important;
  }

  .homeFilterModal__list,
  .spPickerModal__list,
  .contactChatSheet--popup .contactChatSheet__messages{
    max-height:42vh;
    overflow:auto;
    -webkit-overflow-scrolling:touch;
  }

  .detailPhoneActionSheet__panel,
  .profileIntroSheet__panel,
  .authSupportSheet,
  .appPopupSheet{
    padding-bottom:18px !important;
    box-shadow:0 18px 42px rgba(0,0,0,.18) !important;
  }

  .contactChatPopupHost .contactChatSheet--popup{
    height:50vh !important;
    min-height:360px !important;
    max-height:var(--pc-floating-small-max-height) !important;
    display:flex;
    flex-direction:column;
  }

  .contactChatSheet--popup .contactChatSheet__bar{
    border-radius:22px 22px 0 0;
  }
}

/* SP v323: PC - chuẩn cỡ chữ toàn app, không ảnh hưởng bản điện thoại. */
@media (min-width:1024px){
  :root{
    --pc-title-font-size:20px; /* SP: tiêu đề PC toàn app */
    --pc-body-font-size:18px; /* SP: chữ nội dung chính PC toàn app */
    --pc-sub-font-size:16px; /* SP: dòng phụ PC toàn app */
  }

  .routeTitle,
  .homeSection__title,
  .categoryGroup__title,
  .createTopBar__title,
  .createCategoryPicker__title,
  .spPickerModal__title,
  .accountHero__title,
  .appPopupTitle,
  .authSupportTitle,
  .homeFilterModal__title,
  .detailPage__title,
  .detailPhoneActionSheet__title,
  .accountProfileSheet__title,
  .profileIntroSheet__title,
  .similarPostsPage__title,
  .adminHero__title,
  .adminPageHead__title,
  .savedPostsCard__title,
  .myPostsCard__title,
  .adminPostCard .myPostsCard__title,
  .postCard__title,
  .contactQuickPost__title,
  .contactComposerPost__title,
  .videoCaption__title,
  .myVideoItem__title,
  .hcmDistrictFooter__title,
  .hcmSiteFooter__title{
    font-size:var(--pc-title-font-size) !important;
  }

  .appPopupText,
  .authSupportText,
  .detailPage__desc,
  .detailPage__content,
  .detailPhoneActionSheet__phone,
  .profileIntroSheet__input,
  .spPickerModal__item,
  .homeFilterBtn,
  .homeFilterModal__item,
  .accountMenu__label,
  .adminMenu .accountMenu__label,
  .adminActionBtn,
  .adminSearchInput,
  .adminDetailField__value,
  .adminDetailField__label,
  .input,
  .textarea,
  .spField__ph,
  .spField__topLabel,
  .filebtn,
  .saveBtn,
  .postCard__price,
  .savedPostsCard__price,
  .myPostsCard__price,
  .contactChatSheet__message,
  .videoCaption__desc,
  .myVideoAction{
    font-size:var(--pc-body-font-size) !important;
  }

  .appPopupSub,
  .authSupportSub,
  .createCategoryPicker__sub,
  .createCategoryPicker__meta,
  .spField__counter,
  .spCreateCategorySummary,
  .hint,
  .filehint,
  .postCard__meta,
  .postCard__date,
  .postCard__location,
  .postCard__area,
  .savedPostsCard__meta,
  .savedPostsCard__date,
  .myPostsCard__date,
  .myPostsCard__meta,
  .adminHero__desc,
  .adminUsersCount,
  .adminUserCard__phone,
  .adminUserCard__access,
  .adminUserCard__date,
  .adminUserCard__posts,
  .adminPostCard__owner,
  .adminStatsCard__label,
  .adminStatsCard__note,
  .detailPage__metaItem,
  .detailPage__code,
  .profileIntroSheet__count,
  .contactListItem__meta,
  .contactQuickPost__price,
  .contactQuickPost__place,
  .videoCaption__location,
  .videoUploadPicker__sub,
  .myVideoItem__status,
  .hcmSiteFooter__subtitle{
    font-size:var(--pc-sub-font-size) !important;
  }
}

/* SP v324: PC - popup lọc bám ngay dưới chân nút lọc đang bấm, không ảnh hưởng mobile và không đụng logic lọc. */
@media (min-width:1024px){
  .homeFilterModal.is-pc-anchored{
    display:block !important;
    background:rgba(0,0,0,.08) !important;
    align-items:initial !important;
    justify-content:initial !important;
  }

  .homeFilterModal.is-pc-anchored .homeFilterModal__sheet{
    position:fixed !important;
    left:var(--pc-filter-modal-left) !important;
    top:var(--pc-filter-modal-top) !important;
    right:auto !important;
    bottom:auto !important;
    transform:none !important;
    animation:none !important;
    margin:0 !important;
  }
}

/* SP v373: PC Trang chủ - giữ bộ lọc đứng yên và canh lại về phải bằng trục logo/menu PC. Không ảnh hưởng mobile/logic. */
@media (min-width:1024px){
  body.is-pc-left-menu-home #page-home{
    padding-top:48px !important; /* SP: chừa đúng chiều cao bộ lọc PC để nội dung bên dưới không bị đội lên */
  }

  body.is-pc-left-menu-home #page-home .homeFilters{
    position:fixed !important;
    top:var(--pc-topbar-height, 62px) !important;
    left:calc(var(--pc-left-menu-left, 18px) + var(--pc-left-menu-width, 260px) + 24px) !important;
    right:0 !important; /* SP v425: kéo nền trắng thanh lọc PC cắt hết qua mép phải màn hình */
    z-index:8400 !important;
    width:auto !important;
    max-width:none !important;
    margin:0 !important;
    padding:12px 24px 0 0 !important; /* SP v425: giữ khoảng thở bên phải nhưng nền vẫn full */
    justify-content:flex-start !important;
    background:#fff !important;
    transform:none !important;
  }
}

/* SP v376: PC - popup phòng chat nổi dưới chân bên phải, không còn nằm giữa màn hình. */
@media (min-width:1024px){
  .contactChatPopupHost:not(.contactChatPopupHost--pcList){
    display:block !important;
    align-items:initial !important;
    justify-content:initial !important;
    background:transparent !important;
    pointer-events:none !important;
  }

  .contactChatPopupHost:not(.contactChatPopupHost--pcList) .contactChatPopupBackdrop{
    display:none !important;
  }

  .contactChatPopupHost:not(.contactChatPopupHost--pcList) .contactChatSheet--popup{
    position:fixed !important;
    left:auto !important;
    right:18px !important; /* SP sửa khoảng cách popup chat với mép phải PC tại đây */
    top:auto !important;
    bottom:18px !important; /* SP sửa khoảng cách popup chat với mép dưới PC tại đây */
    width:390px !important; /* SP sửa chiều ngang popup phòng chat PC tại đây */
    max-width:calc(100vw - 36px) !important;
    height:520px !important; /* SP sửa chiều cao popup phòng chat PC tại đây */
    min-height:420px !important;
    max-height:calc(100dvh - 96px) !important;
    transform:none !important;
    margin:0 !important;
    border-radius:18px !important;
    pointer-events:auto !important;
    box-shadow:0 12px 34px rgba(0,0,0,.22) !important;
    animation:none !important;
  }

  .contactChatSheet--popup .contactChatSheet__composer{
    align-items:center !important;
  }

  .contactChatSheet--popup .contactChatSheet__inputRow{
    align-items:center !important;
  }

  .contactChatSheet--popup .contactChatSheet__attach{
    width:32px !important; /* SP sửa kích thước nút + trong ô nhập popup chat PC tại đây */
    height:32px !important;
    flex:0 0 32px !important;
    padding:0 !important;
    margin:0 !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    line-height:0 !important;
    font-size:30px !important;
    transform:translateY(-2px) !important; /* SP v426: canh dấu + popup chat PC vào giữa khung, không giảm độ đậm */
  }
}

/* SP v421: PC - đưa nút Có tin đăng mới xuống ngay dưới thanh lọc, không ảnh hưởng mobile/chức năng. */
@media (min-width:1024px){
  body.is-pc-left-menu-home #page-home .homeNewPostsNotice{
    top:calc(var(--pc-topbar-height, 62px) + 56px) !important; /* SP: vị trí nút Có tin đăng mới PC nằm dưới thanh lọc */
    z-index:8500 !important; /* SP: cao hơn nền thanh lọc để không bị che */
  }
}

/* SP v480: iPad không dùng popup PC nhỏ 20vw. Giữ popup cảnh báo đồng bộ như app hiện tại, không ảnh hưởng PC lớn/mobile. */
@media (min-width:1024px) and (max-width:1279px){
  :root{
    --pc-floating-small-width:calc(100vw - 32px); /* SP sửa chiều ngang popup iPad tại đây */
    --pc-floating-small-min-width:0px; /* SP: tránh popup iPad bị ép nhỏ */
    --pc-floating-small-max-width:420px; /* SP: đồng bộ popup chuẩn app hiện tại */
    --pc-floating-small-max-height:82vh; /* SP sửa chiều cao tối đa popup iPad tại đây */
  }

  .appPopupSheet,
  .authSupportSheet,
  .detailPhoneActionSheet__panel,
  .profileIntroSheet__panel,
  .spPickerModal__sheet,
  .homeFilterModal__sheet{
    width:min(calc(100vw - 32px), 420px) !important;
    max-width:min(calc(100vw - 32px), 420px) !important;
  }
}
