/* Live mobile overrides for the compiled admin/seller panel */
html,
body,
#app {
  max-width: 100%;
  overflow-x: hidden;
}

.vben-mobile-menu {
  display: none;
}

@media (max-width: 1023px) {
  .vben-chrome,
  .vben-chrome__body,
  .vben-chrome__main,
  .vben-chrome__content,
  .page-route-container,
  .page-route-view {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .vben-chrome__rail {
    display: none !important;
  }

  .vben-mobile-menu {
    display: inline-flex !important;
  }

  .vben-chrome__sider {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 260 !important;
    height: 100vh !important;
    height: 100dvh !important;
    width: min(280px, 86vw) !important;
    transform: translateX(-105%) !important;
    box-shadow: none !important;
    transition: transform 0.2s ease;
  }

  .vben-chrome.is-mobile-open .vben-chrome__sider {
    transform: translateX(0) !important;
    box-shadow: 12px 0 32px rgba(0, 0, 0, 0.35) !important;
  }

  .vben-chrome__overlay {
    position: fixed;
    inset: 0;
    z-index: 250;
    border: 0;
    padding: 0;
    margin: 0;
    background: rgba(0, 0, 0, 0.5);
  }

  .vben-chrome.is-mobile-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 240;
    background: rgba(0, 0, 0, 0.45);
  }

  .vben-chrome__main,
  .vben-chrome.is-header-first .vben-chrome__main {
    margin-left: 0 !important;
  }

  .vben-chrome.is-header-first .vben-chrome__sider {
    height: 100vh !important;
    height: 100dvh !important;
  }

  .vben-chrome__header {
    height: auto !important;
    min-height: 50px;
    padding: 6px 8px !important;
    gap: 6px;
    flex-wrap: nowrap !important;
  }

  .vben-chrome__header-left,
  .vben-chrome__header-right {
    min-width: 0;
  }

  .vben-chrome__header-right {
    flex: 1;
    justify-content: flex-end;
    overflow: hidden;
  }

  .vben-search,
  .vben-locale,
  .vben-chrome__header-right .vben-icon-btn[aria-label="Toàn màn hình"],
  .vben-chrome.is-header-first .vben-top-nav,
  .vben-chrome__fold {
    display: none !important;
  }

  .vben-chrome__logo-text {
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .vben-crumb {
    max-width: 46vw;
    overflow: hidden;
  }

  .vben-crumb__current {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .vben-chrome__content {
    padding: 12px !important;
  }

  .vben-stat-grid,
  .vps-status__grid {
    grid-template-columns: 1fr 1fr !important;
  }

  .vben-table-card,
  .overflow-x-auto,
  .ant-table-wrapper,
  .vben-chart-card,
  .apexcharts-canvas {
    max-width: 100%;
  }

  .overflow-x-auto {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 1023px) {
  body[data-page="notifications"] .vben-chrome__content .inline-flex {
    white-space: nowrap;
  }

  body[data-page="notifications"] .vben-chrome__content .overflow-x-auto {
    overflow: visible;
  }

  body[data-page="notifications"] .vben-chrome__content table {
    display: block;
    width: 100%;
    min-width: 0 !important;
  }

  body[data-page="notifications"] .vben-chrome__content thead {
    display: none;
  }

  body[data-page="notifications"] .vben-chrome__content tbody {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
  }

  body[data-page="notifications"] .vben-chrome__content tbody tr {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border: 1px solid hsl(var(--border));
    border-radius: 12px;
    background: hsl(var(--card, var(--background)));
  }

  body[data-page="notifications"] .vben-chrome__content tbody td {
    display: block;
    width: 100% !important;
    max-width: 100%;
    padding: 0 !important;
    white-space: normal !important;
  }

  body[data-page="notifications"] .vben-chrome__content tbody td[colspan] {
    text-align: center;
    padding: 20px 8px !important;
  }

  body[data-page="notifications"] .vben-chrome__content tbody td .uppercase {
    white-space: nowrap;
  }

  body[data-page="notifications"] .vben-chrome__content tbody td:last-child .flex {
    justify-content: flex-start !important;
    flex-wrap: wrap;
    gap: 8px;
  }

  body[data-page="notifications"] .vben-chrome__content tbody tr:has(> td:nth-child(6):last-child) > td:first-child .mt-2 {
    display: none;
  }

  body[data-page="notifications"] .vben-chrome__content tbody tr:has(> td:nth-child(6):last-child) > td:nth-child(n + 2):not([colspan]) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
  }

  body[data-page="notifications"] .vben-chrome__content tbody tr:has(> td:nth-child(6):last-child) > td:nth-child(2)::before {
    content: "Mức độ";
    color: hsl(var(--muted-foreground));
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
  }

  body[data-page="notifications"] .vben-chrome__content tbody tr:has(> td:nth-child(6):last-child) > td:nth-child(3) {
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
  }

  body[data-page="notifications"] .vben-chrome__content tbody tr:has(> td:nth-child(6):last-child) > td:nth-child(3)::before {
    content: "Vai trò";
    color: hsl(var(--muted-foreground));
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
  }

  body[data-page="notifications"] .vben-chrome__content tbody tr:has(> td:nth-child(6):last-child) > td:nth-child(3) .flex {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  body[data-page="notifications"] .vben-chrome__content tbody tr:has(> td:nth-child(6):last-child) > td:nth-child(4)::before {
    content: "Trạng thái";
    color: hsl(var(--muted-foreground));
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
  }

  body[data-page="notifications"] .vben-chrome__content tbody tr:has(> td:nth-child(6):last-child) > td:nth-child(5)::before {
    content: "Ngày đăng";
    color: hsl(var(--muted-foreground));
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
  }

  body[data-page="notifications"] .vben-chrome__content section .p-6 {
    padding: 12px !important;
  }

  body[data-page="notifications"] .vben-chrome__content .min-w-\[200px\] {
    min-width: 0 !important;
    width: 100%;
  }

  body[data-page="notifications"] .vben-chrome__content input.h-11,
  body[data-page="notifications"] .vben-chrome__content select {
    width: 100%;
  }

  body[data-page="notifications"] .vben-chrome__content .flex.flex-wrap.items-center.gap-3 {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    width: 100%;
  }

  body[data-page="notifications"] .vben-chrome__content .flex.flex-wrap.items-center.gap-3 > :first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 639px) {
  .vben-stat-grid,
  .vps-status__grid {
    grid-template-columns: 1fr !important;
  }

  .vben-locale,
  .vben-chrome__tabs button[aria-label="Làm mới"],
  .vben-chrome__tabs button[aria-label="Toàn màn hình"] {
    display: none !important;
  }

  .vben-chrome__header-right > .relative > button {
    width: 36px !important;
    height: 36px !important;
  }

  .vben-chrome__header-right > .relative > button span.overflow-hidden {
    width: 32px !important;
    height: 32px !important;
  }

  .vben-pref,
  .vben-search-modal,
  .vben-chrome__header-right .absolute {
    max-width: calc(100vw - 16px) !important;
  }

  .vps-status__head {
    flex-wrap: wrap;
  }
}
