@media screen and (max-width: 1680px) {
  .time-filter-tabs .nav-link,
  .ag-cell[col-id="title"] .fw-semibold {
    font-size: 14px;
  }

  .time-filter-tabs .nav-link {
    padding: 8px 14px;
  }
}

@media screen and (max-width: 1440px) {
  .sidebar-menu.icon-only .sidebar-header {
    padding: 10px 15px;
  }

  .sidebar-menu.icon-only .menu li a {
    justify-content: left;

    padding: 15px;
  }

  .sidebar-menu.icon-only .menu li a span,
  .sidebar-menu.icon-only .logo {
    display: block;
  }

  .sidebar-menu.icon-only {
    width: 220px !important;
  }

  .sidebar-menu.icon-only .menu li a i {
    margin-right: 10px;
  }

  .sidebar-menu .sidebar-header {
    padding: 15px 20px;
  }

  .sidebar-menu .menu li a {
    justify-content: center;

    padding: 15px;
  }

  .sidebar-menu .menu li a span,
  .sidebar-menu .logo {
    display: none;
  }

  .sidebar-menu {
    width: fit-content !important;
  }

  .sidebar-menu .menu li a i {
    margin-right: 0;
  }

  .dashboard-content {
    margin-left: 100px !important;
  }

  .dashboard-content.expanded {
    filter: blur(2px);
  }

  .dashboard-content.expanded::after {
    content: "";

    position: fixed;

    background-color: black;

    inset: 0;

    opacity: 0.3;

    filter: blur(0px);
  }

  .sidebar-header .logo h2 {
    font-size: 24px;
  }
}

@media screen and (max-width: 1280px) {
  .ag-theme-alpine.auction-grid-custom .ag-cell {
    font-size: 12px;
  }

  #bidModal.modal .modal-dialog {
    max-width: 80%;
  }
}
@media screen and (max-width: 1024px) {
  .dashboard-row {
    flex-direction: column;
    gap: 30px;
  }
  .dashboard-row .dashboard-card {
    margin-right: 0;
  }
  .page-dealer-dashboard .amacar-dashboard .dashboard-stats {
    gap: 0;
  }
  .amacar-dashboard .dashboard-stats .stat-card {
    margin-bottom: 0;
  }

  .ag-center-cols-viewport {
    overflow-x: auto;
  }
  .sidebar-menu .menu li:last-child{
    display: none;
  }
}

@media screen and (max-width: 768px) {
  /* some css from responsive.css  */

  .dashboard-content,
  .dashboard-content.expanded {
    margin-left: 0 !important;
    width: 100% !important;
  }

  /* Sidebar Menu Mobile Styles */

  .sidebar-menu {
    width: 100%;

    position: relative;

    height: auto;

    max-height: unset;

    z-index: 1000;

    border-bottom: 1px solid rgba(255, 255, 255, 0.1);

    overflow: hidden;

    transition: all 0.3s ease;
  }

  .sidebar-menu.collapsed {
    max-height: 70px; /* Height of the header */

    overflow: hidden;
  }

  .sidebar-menu.mobile-collapsed {
    height: auto;

    max-height: 100vh;

    overflow-y: auto;
  }

  .sidebar-header {
    padding: 15px;

    position: relative;

    z-index: 10;
  }

  .sidebar-toggle {
    display: flex;

    align-items: center;

    justify-content: center;

    width: 40px;

    height: 40px;

    background-color: rgba(255, 255, 255, 0.1);

    border-radius: 4px;

    color: #fff;

    transition: all 0.3s ease;
  }

  .sidebar-toggle:active {
    background-color: rgba(255, 255, 255, 0.2);
  }

  /* Dashboard Content */

  .dashboard-content {
    margin-left: 0;

    width: 100%;

    padding: 15px;
  }

  .dashboard-header {
    flex-direction: row;

    padding: 15px;

    flex-wrap: nowrap;
  }

  .search-box {
    width: 100%;
  }

  .user-info {
    width: max-content;

    border: 0;

    margin: 0;

    padding: 0;
  }

  /* Dashboard Stats */

  .dashboard-stats {
    flex-wrap: wrap;
  }

  .stat-card {
    flex: 0 0 calc(50% - 10px);

    margin-bottom: 15px;

    padding: 15px;
  }

  /* For proper spacing between cards */

  .stat-card:nth-child(even) {
    margin-right: 0;
  }

  .stat-card:nth-child(odd) {
    margin-right: 10px;
  }

  /* Tables and data display */

  .data-table {
    overflow-x: auto;
  }

  .notification-dropdown {
    width: 290px;

    right: -15px;
  }

  /* handwritten css  */

  .amacar-dashboard .sidebar-menu {
    position: fixed;

    top: 0px;

    overflow: auto;
  }

  .dashboard-content {
    margin-left: 80px !important;
    width: calc(100% - 80px) !important;
  }

  .stat-card {
    margin-bottom: 0;
  }

  .dashboard-stats {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));

    gap: 10px;
  }

  .time-filter-tabs {
    padding: 15px;
  }

  .time-filter-tabs .nav-tabs {
    gap: 6px;
  }

  .time-filter-tabs .nav-link {
    padding: 8px 12px;

    font-size: 13px;
  }

  .time-filter-tabs .nav-link i {
    font-size: 12px;
  }

  .time-filter-tabs .nav-link .badge {
    font-size: 10px;

    padding: 2px 6px;
  }

  .profile-dropdown {
    width: 300px;

    left: auto;
  }

  .user-info-wrapper {
    margin-right: 0;

    text-align: center;
  }

  .profile-dropdown-toggle {
    flex-direction: column-reverse;

    align-items: center;
  }

  .header-left {
    max-width: 250px;
  }

  .page-template-dealer-availability .header-left {
    max-width: 100%;
  }

  .profile-header .user-email {
    overflow-wrap: anywhere;
  }

  .ag-theme-alpine.auction-grid-custom .ag-cell {
    padding: 0 !important;
  }

  .page-template-won-auctions .vehicle-flex .col-md-3,
  .page-template-won-auctions .customer-flex .col-md-4,
  .page-template-new-customers .vehicle-flex .col-md-3,
  .page-template-new-customers .customer-flex .col-md-4 {
    width: 48%;
  }

  body.mobile-view .ag-paging-panel {
    justify-content: center;

    min-height: 48px;

    padding: 0 !important;

    align-items: center;

    border: 0;
  }

  .ag-cell-value > span {
    width: 100%;
  }

  body.mobile-view.page-template-new-customers #auctionGrid .ag-row {
    border: 0 !important;

    padding: 0 !important;

    margin: 0 !important;
  }

  .page-template-new-customers .card-header {
    flex-direction: column;

    align-items: flex-start;
  }

  .page-template-dealer-availability .select-weekday {
    flex-direction: column;
  }

  .page-template-dealer-availability .select-weekday .col-md-4,
  .page-template-dealer-availability .select-weekday .col-md-2,
  .page-template-dealer-availability .select-weekday .col-md-3 {
    width: 100%;
  }

  .page-template-dealer-availability .select-weekday .col-md-4 {
    margin-bottom: 0;
  }
}

@media screen and ((max-width: 600px)) {
  body:has(.header-top) .amacar-dashboard .sidebar-menu {
    top: 0;
  }
}

@media screen and ((max-width: 576px)) {
  /* ============== some css from responsive.css  =============*/

  .dashboard-header {
    padding: 10px;
  }

  .mobile-sidebar-toggle {
    margin-right: 10px;
  }

  .user-info {
    justify-content: space-between;
  }

  .notifications {
    margin-right: 15px;
  }

  /* ====== handwritten css ================== */

  .search-box input[type="text"] {
    padding: 10px 15px 10px 40px;
  }
}

@media screen and ((max-width: 540px)) {
  .ag-paging-panel {
    flex-direction: column;

    gap: 0.5rem;

    align-items: center;

    min-height: 100px;
  }

  .ag-paging-panel .ag-paging-row-summary-panel {
    order: -1;
  }

  .dashboard-header {
    gap: 10px;
  }
  #bidModal.modal .modal-dialog {
    margin: 50px 20px;
  }

  .customer-card-flex {
    grid-template-columns: 1fr;
  }

  .customer-card-flex + * {
    flex-direction: column;
  }

  .page-template-new-customers #timeFilterTabs {
    flex-direction: column;
  }

  #scheduleList .list-group-item {
    flex-direction: column;
  }

  .page-template-dealer-availability .text-primary-emphasis {
    font-size: 18px;
  }
}

@media screen and ((max-width: 480px)) {
  .user-info-wrapper {
    display: none;
  }

  .vehicle-card-details > .row {
    flex-direction: column;
  }

  .vehicle-card-details .col-6 {
    width: 100%;
  }

  .sidebar-toggle {
    background: transparent;
  }

  .sidebar-menu .menu li a {
    padding: 12px;
  }

  .sidebar-menu .menu li a i {
    font-size: 14px;
  }

  .dashboard-content {
    margin-left: 56px !important;
  }

  .stat-icon {
    width: 40px;

    height: 40px;
  }

  .stat-icon i {
    font-size: 18px;
  }

  .stat-details p,
  .stat-details span {
    font-size: 14px;
  }

  #auctionGrid.ag-theme-alpine .ag-cell {
    padding: 0 !important;
  }

  .sidebar-menu .sidebar-header {
    padding: 8px 8px;
  }

  .vehicle-card .d-flex.gap-2 {
    flex-direction: column;
  }

  .vehicle-card {
    display: flex;

    flex-direction: column;
  }

  .vehicle-card .d-flex.align-items-center {
    justify-content: center !important;
  }

  .vehicle-card-image,
  .vehicle-card .fw-bold.text-primary {
    display: flex;

    justify-content: center;
  }

  .profile-dropdown {
    width: 230px;

    min-width: 230px;

    right: -10px;
  }

  body.mobile-view .ag-paging-panel {
    min-height: 100px;

    padding: 10px !important;
  }

  .ag-cell[col-id="title"] .fw-semibold {
    font-size: 14px;

    white-space: normal;
  }

  .page-template-won-auctions .vehicle-flex,
  .page-template-won-auctions .customer-flex,
  .page-template-new-customers .vehicle-flex,
  .page-template-new-customers .customer-flex {
    flex-direction: column;
  }

  .page-template-won-auctions .vehicle-flex .col-md-3,
  .page-template-won-auctions .customer-flex .col-md-4,
  .page-template-new-customers .vehicle-flex .col-md-3,
  .page-template-new-customers .customer-flex .col-md-4 {
    width: 100%;

    margin: 10px 0;

    padding: 0;
  }
}

/* vehicle card from live auction  */

/* Make grid container relative for overlay positioning */

#auctionGrid {
  position: relative;
}

/* Mobile Card View Styles */

.vehicle-card {
  transition: all 0.3s ease;

  border: 1px solid #e9ecef !important;

  margin-bottom: 1rem;

  width: 100% !important;

  max-width: 100% !important;

  box-sizing: border-box;
}

.vehicle-card:hover {
  transform: translateY(-2px);

  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}

.vehicle-card-header h6 {
  font-size: 1.1rem;

  line-height: 1.3;
}

.vehicle-card-image {
  position: relative;

  overflow: hidden;
}

.vehicle-card-image img {
  transition: transform 0.3s ease;
}

.vehicle-card-image:hover img {
  transform: scale(1.05);
}

.vehicle-card-details .detail-item {
  padding: 0.5rem;

  background: #f8f9fa;

  border-radius: 6px;

  text-align: center;
}

.vehicle-card-details .detail-item small {
  font-size: 0.75rem;

  font-weight: 600;

  text-transform: uppercase;

  letter-spacing: 0.5px;
}

.vehicle-card-details .detail-item span {
  font-size: 0.9rem;
}

.highest-bid-info {
  text-align: center;

  padding: 0.75rem;

  background: #f0f8ff;

  border-radius: 6px;

  border-left: 3px solid #007bff;
}

.auction-end-info {
  text-align: center;

  padding: 0.75rem;

  background: #fff3cd;

  border-radius: 6px;

  border-left: 3px solid #ffc107;
}

/* Responsive adjustments for mobile cards */

@media (max-width: 576px) {
  .vehicle-card-header h6 {
    font-size: 1rem;
  }

  .vehicle-card-details .row {
    margin: 0;
  }

  .vehicle-card-details .col-6 {
    padding: 0.25rem;
  }

  .vehicle-card-details .detail-item {
    padding: 0.375rem;
  }

  .vehicle-card-details .detail-item small {
    font-size: 0.7rem;
  }

  .vehicle-card-details .detail-item span {
    font-size: 0.8rem;
  }
}

/* Ensure proper spacing in mobile view */

@media (max-width: 768px) {
  #auctionGrid.ag-theme-alpine {
    --ag-row-height: auto;

    --ag-cell-horizontal-padding: 0;

    --ag-cell-vertical-padding: 0;
  }

  #auctionGrid.ag-theme-alpine .ag-row {
    padding: 0;

    margin: 0;
  }

  #auctionGrid.ag-theme-alpine .ag-cell {
    padding: 0;

    border: none;
  }
}

/* Smooth transitions for layout changes */

#auctionGrid.ag-theme-alpine {
  transition: all 0.3s ease;
}

/* Card view specific pagination styling */

.vehicle-card + .ag-paging-panel {
  margin-top: 1rem;

  padding: 1rem;

  background: white;

  border-radius: 8px;

  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Body class-based styling */

body.mobile-view #auctionGrid {
  --ag-row-height: auto;

  --ag-cell-horizontal-padding: 0;

  --ag-cell-vertical-padding: 0;

  width: 100% !important;

  max-width: 100% !important;

  overflow-x: hidden;
}

body.mobile-view #auctionGrid .ag-row {
  padding: 0;

  margin: 0;

  border: none;
}

body.mobile-view #auctionGrid .ag-cell {
  padding: 0;

  border: none;

  overflow: visible;

  width: 100% !important;

  max-width: 100% !important;
}

body.mobile-view #auctionGrid .ag-row {
  width: 100% !important;

  max-width: 100% !important;
}

body.mobile-view #auctionGrid .ag-cell-wrapper {
  width: 100% !important;

  max-width: 100% !important;
}

body.mobile-view #auctionGrid .ag-header {
  display: none;
}

body.mobile-view #auctionGrid .ag-header-row {
  display: none;
}

body.mobile-view #auctionGrid .ag-header-cell {
  display: none;
}

/* Desktop view specific styling */

body.desktop-view #auctionGrid {
  --ag-row-height: 60px;

  --ag-cell-horizontal-padding: 8px;

  --ag-cell-vertical-padding: 4px;
}

body.desktop-view #auctionGrid .ag-header {
  display: table-header-group;
}

/* Smooth transitions for all elements */

#auctionGrid * {
  transition: all 0.3s ease;
}

/* Very small screen optimizations */

@media (max-width: 480px) {
  .dashboard-stats {
    grid-template-columns: 1fr;

    gap: 0.75rem;
  }

  .time-filter-tabs {
    padding: 12px;
  }

  .time-filter-tabs .nav-tabs {
    gap: 4px;
  }

  .time-filter-tabs .nav-link {
    padding: 6px 8px;

    font-size: 12px;
  }

  .vehicle-card-header h6 {
    font-size: 0.95rem;
  }

  .vehicle-card-details .detail-item {
    padding: 0.375rem;
  }

  .vehicle-card-details .detail-item small {
    font-size: 0.65rem;
  }

  .vehicle-card-details .detail-item span {
    font-size: 0.75rem;
  }
}

/* Ensure proper image handling in mobile cards */

.vehicle-card-image img {
  max-width: 100%;

  height: auto;

  object-fit: cover;
}

/* Handle long text in mobile cards */

.vehicle-card-header h6,
.vehicle-card-details .detail-item span {
  word-wrap: break-word;

  overflow-wrap: break-word;
}

/* Ensure action buttons are properly sized on mobile */

@media (max-width: 576px) {
  .vehicle-card .btn {
    font-size: 0.8rem;

    padding: 0.375rem 0.75rem;
  }

  .vehicle-card .btn i {
    font-size: 0.75rem;
  }

  .vehicle-card .d-flex.gap-2 {
    gap: 0.5rem !important;
  }
}

/* Loading state for mobile cards */

.vehicle-card.loading {
  opacity: 0.7;

  pointer-events: none;
}

.vehicle-card.loading::after {
  content: "";

  position: absolute;

  top: 50%;

  left: 50%;

  width: 20px;

  height: 20px;

  margin: -10px 0 0 -10px;

  border: 2px solid #007bff;

  border-top: 2px solid transparent;

  border-radius: 50%;

  animation: spin 1s linear infinite;
}

/* Ensure proper spacing in mobile view */

body.mobile-view .ag-paging-panel {
  margin-top: 1rem;

  padding: 1rem;

  background: white;

  border-radius: 8px;

  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Ensure mobile column takes full width */

body.mobile-view #auctionGrid .ag-col {
  width: 100% !important;

  max-width: 100% !important;

  flex: 1 1 100% !important;
}

/* Force mobile column to take full width */

body.mobile-view #auctionGrid .ag-cell[col-id="title"] {
  width: 100% !important;

  max-width: 100% !important;

  min-width: 100% !important;
}

/* Ensure the mobile column container takes full width */

body.mobile-view #auctionGrid .ag-body-viewport {
  width: 100% !important;

  max-width: 100% !important;
}

/* Handle very long VIN numbers */

.vehicle-card-details .detail-item .text-truncate {
  max-width: 100%;

  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;
}

/* Ensure proper badge positioning in mobile cards */

.vehicle-card .image-count-badge {
  position: absolute;

  top: 8px;

  right: 8px;

  z-index: 2;
}

/* Ensure action buttons are properly sized on mobile for won auctions */

@media (max-width: 576px) {
  #wonAuctionGrid .vehicle-card .btn {
    font-size: 0.8rem;

    padding: 0.375rem 0.75rem;
  }

  #wonAuctionGrid .vehicle-card .btn i {
    font-size: 0.75rem;
  }

  #wonAuctionGrid .vehicle-card .d-flex.gap-2 {
    gap: 0.5rem !important;
  }
}

/* Loading state for won auctions mobile cards */

#wonAuctionGrid .vehicle-card.loading {
  opacity: 0.7;

  pointer-events: none;
}

#wonAuctionGrid .vehicle-card.loading::after {
  content: "";

  position: absolute;

  top: 50%;

  left: 50%;

  width: 20px;

  height: 20px;

  margin: -10px 0 0 -10px;

  border: 2px solid #007bff;

  border-top: 2px solid transparent;

  border-radius: 50%;

  animation: spin 1s linear infinite;
}

/* Ensure proper badge positioning in won auctions mobile cards */

#wonAuctionGrid .vehicle-card .image-count-badge {
  position: absolute;

  top: 8px;

  right: 8px;

  z-index: 2;
}

/* Additional spacing and layout fixes for won auctions mobile cards */

body.mobile-view #wonAuctionGrid .vehicle-card.won-auction-card {
  margin-bottom: 1.5rem;

  border-radius: 12px;

  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);

  transition: all 0.3s ease;
}

body.mobile-view #wonAuctionGrid .vehicle-card.won-auction-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);

  transform: translateY(-2px);
}

body.mobile-view #wonAuctionGrid .vehicle-card .vehicle-image {
  flex-shrink: 0;

  margin-right: 1rem;
}

body.mobile-view #wonAuctionGrid .vehicle-card .vehicle-details {
  flex: 1;

  min-width: 0;
}

body.mobile-view #wonAuctionGrid .vehicle-card .vehicle-info {
  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 1rem;

  margin-bottom: 1.5rem;
}

body.mobile-view #wonAuctionGrid .vehicle-card .info-item {
  background: #f8f9fa;

  padding: 0.75rem;

  border-radius: 8px;

  border: 1px solid #e9ecef;
}

body.mobile-view #wonAuctionGrid .vehicle-card .info-item small {
  display: block;

  font-size: 0.75rem;

  color: #6c757d;

  margin-bottom: 0.5rem;

  font-weight: 600;

  text-transform: uppercase;

  letter-spacing: 0.5px;
}

body.mobile-view #wonAuctionGrid .vehicle-card .info-item span {
  display: block;

  font-size: 0.875rem;

  color: #495057;

  font-weight: 600;

  line-height: 1.3;
}

body.mobile-view #wonAuctionGrid .vehicle-card .action-buttons {
  display: flex;

  gap: 0.75rem;

  flex-wrap: wrap;

  margin-top: 1rem;
}

body.mobile-view #wonAuctionGrid .vehicle-card .btn {
  flex: 1;

  min-width: 120px;

  font-size: 0.8rem;

  padding: 0.6rem 1rem;

  border-radius: 8px;

  font-weight: 500;

  transition: all 0.2s ease;
}

/* Responsive adjustments for very small screens */

@media (max-width: 480px) {
  body.mobile-view #wonAuctionGrid .vehicle-card .vehicle-info {
    grid-template-columns: 1fr;

    gap: 0.75rem;
  }

  body.mobile-view #wonAuctionGrid .vehicle-card .action-buttons {
    flex-direction: column;

    gap: 0.5rem;
  }

  body.mobile-view #wonAuctionGrid .vehicle-card .btn {
    width: 100%;

    min-width: auto;
  }
}

@media (max-width: 360px) {
  body.mobile-view #wonAuctionGrid .vehicle-card.won-auction-card {
    padding: 12px;
  }

  body.mobile-view #wonAuctionGrid .vehicle-card .vehicle-image img,
  body.mobile-view #wonAuctionGrid .vehicle-card .placeholder-image {
    width: 60px !important;

    height: 45px !important;
  }

  body.mobile-view #wonAuctionGrid .vehicle-card .vehicle-details h6 {
    font-size: 0.9rem;
  }

  body.mobile-view #wonAuctionGrid .vehicle-card .vehicle-details p {
    font-size: 0.8rem;
  }
}

/* ============= for won auction from cursor =================  */

/* Mobile Grid Styles */

.mobile-grid-view {
  background: transparent !important;
}

.mobile-grid-view .ag-root-wrapper {
  background: transparent !important;

  border: none !important;
}

.mobile-grid-view .ag-header {
  display: none !important;
}

.mobile-grid-view .ag-row {
  background: transparent !important;

  border: none !important;

  margin-bottom: 16px !important;

  padding: 0 !important;

  box-shadow: none !important;
}

.mobile-grid-view .ag-cell {
  border: none !important;

  padding: 0 !important;

  background: transparent !important;
}

/* Mobile Card Styles */

.mobile-auction-card {
  background: white;

  border-radius: 16px;

  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);

  margin-bottom: 16px;

  overflow: hidden;

  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mobile-auction-card:hover {
  transform: translateY(-2px);

  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.mobile-card-header {
  display: flex;

  align-items: flex-start;

  padding: 16px;

  gap: 12px;
}

.mobile-image-container {
  flex-shrink: 0;

  position: relative;
}

.mobile-vehicle-image {
  width: 80px;

  height: 60px;

  object-fit: cover;

  border-radius: 8px;

  background: #f8f9fa;
}

.mobile-image-count-badge {
  position: absolute;

  top: -6px;

  right: -6px;

  background: linear-gradient(135deg, #007bff, #0056b3);

  color: white;

  border-radius: 50%;

  width: 20px;

  height: 20px;

  display: flex;

  align-items: center;

  justify-content: center;

  font-size: 10px;

  font-weight: 600;

  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.mobile-card-title {
  flex: 1;

  min-width: 0;
}

.mobile-title {
  font-size: 16px;

  font-weight: 600;

  margin: 0 0 4px 0;

  color: #212529;

  line-height: 1.3;
}

.mobile-subtitle {
  font-size: 14px;

  color: #6c757d;

  margin: 0;

  font-weight: 500;
}

.mobile-card-body {
  padding: 0 16px 16px 16px;
}

.mobile-info-grid {
  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 12px 16px;

  margin-bottom: 12px;
}

.mobile-info-item {
  display: flex;

  flex-direction: column;

  gap: 2px;
}

.mobile-label {
  font-size: 12px;

  color: #6c757d;

  font-weight: 500;

  text-transform: uppercase;

  letter-spacing: 0.5px;
}

.mobile-value {
  font-size: 14px;

  color: #212529;

  font-weight: 600;

  word-break: break-word;
}

.mobile-cash-offer {
  color: #0d6efd;
}

.mobile-highest-bid {
  color: #198754;
}

.mobile-bid-label {
  background: rgba(13, 110, 253, 0.1);

  color: #0d6efd;

  font-size: 11px;

  font-weight: 600;

  padding: 4px 8px;

  border-radius: 12px;

  display: inline-block;

  margin-bottom: 12px;
}

.mobile-actions {
  display: flex;

  gap: 8px;
}

.mobile-action-btn {
  flex: 1;

  padding: 10px 12px;

  border: none;

  border-radius: 8px;

  font-size: 14px;

  font-weight: 600;

  cursor: pointer;

  transition: all 0.2s ease;

  display: flex;

  align-items: center;

  justify-content: center;

  gap: 6px;
}

.mobile-view-btn {
  background: #0d6efd;

  color: white;
}

.mobile-view-btn:hover {
  background: #0b5ed7;

  transform: translateY(-1px);
}

.mobile-contact-btn {
  background: #6c757d;

  color: white;
}

.mobile-contact-btn:hover {
  background: #5c636a;

  transform: translateY(-1px);
}

/* Responsive adjustments */

@media (max-width: 480px) {
  .mobile-card-header {
    padding: 12px;

    gap: 10px;
  }

  .mobile-vehicle-image {
    width: 70px;

    height: 50px;
  }

  .mobile-title {
    font-size: 15px;
  }

  .mobile-subtitle {
    font-size: 13px;
  }

  .mobile-info-grid {
    grid-template-columns: 1fr;

    gap: 8px;
  }

  .mobile-card-body {
    padding: 0 12px 12px 12px;
  }
}

/* Fix AG Grid mobile pagination */

@media (max-width: 768px) {
  .ag-paging-panel {
    justify-content: center;

    flex-wrap: wrap;

    gap: 8px;

    padding: 12px;
  }

  .ag-paging-button,
  .ag-paging-page-summary-panel {
    font-size: 14px;
  }
}

/* Make grid container relative for overlay positioning */

#auctionGrid {
  position: relative;
}

/* Mobile Card View Styles */

.vehicle-card {
  transition: all 0.3s ease;

  border: 1px solid #e9ecef !important;

  margin-bottom: 1rem;

  width: 100% !important;

  max-width: 100% !important;

  box-sizing: border-box;
}

.vehicle-card:hover {
  transform: translateY(-2px);

  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}

.vehicle-card-header h6 {
  font-size: 1.1rem;

  line-height: 1.3;
}

.vehicle-card-image {
  position: relative;

  overflow: hidden;
}

.vehicle-card-image img {
  transition: transform 0.3s ease;
}

.vehicle-card-image:hover img {
  transform: scale(1.05);
}

.vehicle-card-details .detail-item {
  padding: 0.5rem;

  background: #f8f9fa;

  border-radius: 6px;

  text-align: center;
}

.vehicle-card-details .detail-item small {
  font-size: 0.75rem;

  font-weight: 600;

  text-transform: uppercase;

  letter-spacing: 0.5px;
}

.vehicle-card-details .detail-item span {
  font-size: 0.9rem;
}

.highest-bid-info {
  text-align: center;

  padding: 0.75rem;

  background: #f0f8ff;

  border-radius: 6px;

  border-left: 3px solid #007bff;
}

.auction-end-info {
  text-align: center;

  padding: 0.75rem;

  background: #fff3cd;

  border-radius: 6px;

  border-left: 3px solid #ffc107;
}

/* Responsive adjustments for mobile cards */

@media (max-width: 576px) {
  .vehicle-card-header h6 {
    font-size: 1rem;
  }

  .vehicle-card-details .row {
    margin: 0;
  }

  .vehicle-card-details .col-6 {
    padding: 0.25rem;
  }

  .vehicle-card-details .detail-item {
    padding: 0.375rem;
  }

  .vehicle-card-details .detail-item small {
    font-size: 0.7rem;
  }

  .vehicle-card-details .detail-item span {
    font-size: 0.8rem;
  }
}

/* Ensure proper spacing in mobile view */

@media (max-width: 768px) {
  #auctionGrid.ag-theme-alpine {
    --ag-row-height: auto;

    --ag-cell-horizontal-padding: 0;

    --ag-cell-vertical-padding: 0;
  }

  #auctionGrid.ag-theme-alpine .ag-row {
    padding: 0;

    margin: 0;
  }

  #auctionGrid.ag-theme-alpine .ag-cell {
    padding: 0;

    border: none;
  }
  #bidModal.modal {
    background: #0000006b;
  }
  .modal-backdrop.fade.show {
    z-index: 0;
    display: none;
  }
  .vehicle-card-header .text-primary {
    text-wrap: auto;
    text-align: center;
  }
  .vehicle-card-image a {
    width: 100%;
    display: block;
  }
  .vehicle-card-image a img {
    width: 100% !important;
    height: auto !important;
    max-height: max-content;
  }
}

/* Smooth transitions for layout changes */

#auctionGrid.ag-theme-alpine {
  transition: all 0.3s ease;
}

/* Card view specific pagination styling */

.vehicle-card + .ag-paging-panel {
  margin-top: 1rem;

  padding: 1rem;

  background: white;

  border-radius: 8px;

  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Body class-based styling */

body.mobile-view #auctionGrid {
  --ag-row-height: auto;

  --ag-cell-horizontal-padding: 0;

  --ag-cell-vertical-padding: 0;

  width: 100% !important;

  max-width: 100% !important;

  overflow-x: hidden;
}

body.mobile-view #auctionGrid .ag-row {
  padding: 0;

  margin: 0;

  border: none;
}

body.mobile-view #auctionGrid .ag-cell {
  padding: 0;

  border: none;

  overflow: visible;

  width: 100% !important;

  max-width: 100% !important;
}

body.mobile-view #auctionGrid .ag-row {
  width: 100% !important;

  max-width: 100% !important;
}

body.mobile-view #auctionGrid .ag-cell-wrapper,
body.mobile-view #wonAuctionGrid .ag-cell-wrapper {
  width: 100% !important;

  max-width: 100% !important;
}

body.mobile-view #auctionGrid .ag-header {
  display: none;
}

body.mobile-view #auctionGrid .ag-header-row {
  display: none;
}

body.mobile-view #auctionGrid .ag-header-cell {
  display: none;
}

/* Desktop view specific styling */

body.desktop-view #auctionGrid {
  --ag-row-height: 60px;

  --ag-cell-horizontal-padding: 8px;

  --ag-cell-vertical-padding: 4px;
}

body.desktop-view #auctionGrid .ag-header {
  display: table-header-group;
}

/* Smooth transitions for all elements */

#auctionGrid * {
  transition: all 0.3s ease;
}

/* Very small screen optimizations */

@media (max-width: 480px) {
  .dashboard-stats {
    grid-template-columns: 1fr;

    gap: 0.75rem;
  }

  .time-filter-tabs {
    padding: 12px;
  }

  .time-filter-tabs .nav-tabs {
    gap: 4px;
  }

  .time-filter-tabs .nav-link {
    padding: 6px 8px;

    font-size: 12px;
  }

  .vehicle-card-header h6 {
    font-size: 0.95rem;
  }

  .vehicle-card-details .detail-item {
    padding: 0.375rem;
  }

  .vehicle-card-details .detail-item small {
    font-size: 0.65rem;
  }

  .vehicle-card-details .detail-item span {
    font-size: 0.75rem;
  }
  .header-left {
    max-width: 185px;
  }
}

/* Ensure proper image handling in mobile cards */

.vehicle-card-image img {
  max-width: 100%;

  height: auto;

  object-fit: cover;
}

/* Handle long text in mobile cards */

.vehicle-card-header h6,
.vehicle-card-details .detail-item span {
  word-wrap: break-word;

  overflow-wrap: break-word;
}

/* Ensure action buttons are properly sized on mobile */

@media (max-width: 576px) {
  .vehicle-card .btn {
    font-size: 0.8rem;

    padding: 0.375rem 0.75rem;
  }

  .vehicle-card .btn i {
    font-size: 0.75rem;
  }

  .vehicle-card .d-flex.gap-2 {
    gap: 0.5rem !important;
  }
}

/* Loading state for mobile cards */

.vehicle-card.loading {
  opacity: 0.7;

  pointer-events: none;
}

.vehicle-card.loading::after {
  content: "";

  position: absolute;

  top: 50%;

  left: 50%;

  width: 20px;

  height: 20px;

  margin: -10px 0 0 -10px;

  border: 2px solid #007bff;

  border-top: 2px solid transparent;

  border-radius: 50%;

  animation: spin 1s linear infinite;
}

/* Ensure proper spacing in mobile view */

body.mobile-view .ag-paging-panel {
  margin-top: 1rem;

  padding: 1rem;

  background: white;

  border-radius: 8px;

  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Ensure mobile column takes full width */

body.mobile-view #auctionGrid .ag-col {
  width: 100% !important;

  max-width: 100% !important;

  flex: 1 1 100% !important;
}

/* Force mobile column to take full width */

body.mobile-view #auctionGrid .ag-cell[col-id="title"] {
  width: 100% !important;

  max-width: 100% !important;

  min-width: 100% !important;
}

/* Ensure the mobile column container takes full width */

body.mobile-view #auctionGrid .ag-body-viewport {
  width: 100% !important;

  max-width: 100% !important;
}

/* Handle very long VIN numbers */

.vehicle-card-details .detail-item .text-truncate {
  max-width: 100%;

  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;
}

/* Ensure proper badge positioning in mobile cards */

.vehicle-card .image-count-badge {
  position: absolute;

  top: 8px;

  right: 8px;

  z-index: 2;
}
