#bf-deals-container {
    /* max-width: 1200px;
    margin: 0 auto; */
    padding: 20px;
    font-family: Arial, sans-serif;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.bf-deals-header {
    text-align: center;
    color: #000;
    margin-bottom: 30px;
    font-size: 2.5em;
}

.bf-deals-filters {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.filter-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.bf-filter, .bf-search {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.bf-button {
    padding: 10px 20px;
    background: #d9534f;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.bf-button:hover {
    background: #c9302c;
}

.deals-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: white;
}

.deals-table th {
    background: #333;
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: bold;
}

.deals-table td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

.deals-table tr:hover {
    background: #f9f9f9;
}

.deal-link {
    color: #0066cc;
    text-decoration: none;
}

.deal-link:hover {
    text-decoration: underline;
}

.savings-positive {
    color: #28a745;
    font-weight: bold;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}

.page-btn {
    padding: 8px 12px;
    /* background: #007bff; */
    background: #182e56;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.page-btn:hover {
    background: #0056b3;
}

.page-btn.active {
    background: #0056b3;
    font-weight: bold;
}

.page-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.loading {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #666;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #999;
}

#bf-deals-container * {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/***** new change code ****/

#bf-sidebar {
    /* min-width: 185px; */
    /* background: #ecf2f7; */
    border-radius: 10px;
    /* padding: 30px 18px; */
    /* box-shadow: 0 2px 10px rgba(44,62,80,0.09); */
    margin-top: 300px;
}

.bf-sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bf-sidebar-menu li {
    margin-bottom: 20px;
}

.bf-sidebar-menu li:last-child {
    margin-bottom: 0;
}

.bf-sidebar-link {
    display: block;
    background: linear-gradient(90deg, #6cd6ff 0%, #2172e8 100%);
    color: #fff !important;
    border-radius: 6px;
    padding: 15px 14px;
    text-decoration: none;
    font-size: 1.08em;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(44,62,80,0.05);
    text-align: left;
    transition: background 0.22s, box-shadow 0.16s;
}

.bf-sidebar-link:hover {
    background: #154678;
    color: #fff !important;
    box-shadow: 0 2px 12px rgba(44,62,80,0.09);
}

/* Responsive: Sidebar stacks above content on mobile */
@media (max-width: 900px) {
    #bf-sidebar {
        min-width: 100%;
        margin-bottom: 20px;
        box-shadow: none;
    }
    .bf-sidebar-link {
        font-size: 1em;
        padding: 12px;
    }
    div[style^="display: flex"] {
        flex-direction: column;
        gap: 0;
    }
}


/* Wrapper Flex adjusts for mobile */
@media (max-width: 900px) {
    .bf-deals-header {
        font-size: 2em;
        margin-bottom: 20px;
    }

    div[style*="display: flex"] {
        flex-direction: column !important;
        gap: 0 !important;
        max-width: 100vw !important;
    }

    #bf-sidebar {
        width: 100% !important;
        min-width: 0;
        margin-bottom: 18px;
        border-radius: 10px;
        box-shadow: none;
        padding: 18px 8px;
    }

    #bf-deals-container {
        width: 100% !important;
        max-width: 100vw !important;
        padding: 12px !important;
        box-sizing: border-box;
    }
}

/* Table responsiveness */
.deals-table {
    width: 100%;
    overflow-x: auto;
    display: block;
}

/* Wrapper table div enables scroll if overflow */
#deals-table-container {
    overflow-x: auto;
    min-width: 270px;
}

/* Pagination/Slider responsive */
.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 22px;
    width: 100%;
    box-sizing: border-box;
}

.page-btn, .sidebar-btn, .bf-button {
    font-size: 1em;
}

@media (max-width: 600px) {
    .page-btn {
        padding: 6px 10px;
        margin: 2px 0;
        font-size: 0.9em;
        min-width: 33px;
    }
    .pagination {
        gap: 3px;
    }
    .bf-sidebar-link, .sidebar-btn {
        font-size: 0.94em;
        padding: 12px 8px;
    }
}


/* Excel-inspired deals table style */
.deals-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #f6fbfe;
    box-shadow: 0 3px 16px rgba(45, 111, 170, 0.08);
    border-radius: 10px;
    overflow: hidden;
    /* font-size: 1.02em; */
    /* font-size: 18px; */
    font-size: 15px;
}

/* Table headers: Excel look */
.deals-table th {
    background: linear-gradient(180deg, #e6f0fa 60%, #c9e2fc 100%);
    color: #2365a8;
    font-weight: 700;
    padding: 13px 10px;
    border-bottom: 2px solid #8bc3f7;
    text-align: left;
    letter-spacing: 0.06em;
    border-top: 1.5px solid #ddeefd;
}

/* Table cells: subtle separation, Excel borders */
.deals-table td {
    padding: 13px 10px;
    background: #fff;
    border-bottom: 1px solid #e3eefa;
    border-right: 1px solid #e3eefa;
    transition: background 0.23s;
    vertical-align: middle;
}

/* Remove border for last cell in row */
.deals-table td:last-child {
    border-right: none;
}

/* Row hover: Excel row highlight */
.deals-table tr:hover td {
    background: #e3f2fd;
}

/* First column special effect (optional) */
.deals-table td:first-child {
    font-weight: 600;
    color: #1170bd;
    background: #f1f8fe;
}

/* Round top corners for first row, bottom for last row (subtle Excel touch) */
.deals-table tr:first-child th:first-child {
    border-top-left-radius: 10px;
}
.deals-table tr:first-child th:last-child {
    border-top-right-radius: 10px;
}
.deals-table tr:last-child td:first-child {
    border-bottom-left-radius: 10px;
}
.deals-table tr:last-child td:last-child {
    border-bottom-right-radius: 10px;
}


th.sortable {
    cursor: pointer;
    user-select: none;
}

/* Filters stack vertically on mobile */
@media (max-width: 600px) {
  .filter-row {
    flex-direction: column;
    gap: 7px;
  }
  .bf-deals-filters {
    padding: 10px;
    margin-bottom: 14px;
  }
  .bf-filter, .bf-search {
    font-size: 0.93em;
    padding: 9px;
  }
  .bf-button {
    font-size: 0.93em;
    padding: 9px 12px;
    margin-top: 6px;
  }
  /* #deals-table-container {
    overflow-x: auto;
    min-width: 100vw;
     For better touch experience
    -webkit-overflow-scrolling: touch;
  } */
  .deals-table {
    display: block;
    min-width: 550px; /* Ensures enough room for scrolling horizontally */
    width: auto;
    font-size: 0.93em;
  }
  .deals-table th, .deals-table td {
    padding: 7px 5px;
    min-width: 80px;
    font-size: 0.93em;
  }
  /* Optionally hide the remarks column for very narrow screens */
  .deals-table th:last-child, .deals-table td:last-child {
    display: none;
  }
}

/* Extra: Flex wrapper responsiveness if needed */
@media (max-width: 600px) {
  div[style*="display: flex"] {
    flex-direction: column !important;
    gap: 0 !important;
    max-width: 100vw !important;
  }
  #bf-deals-container {
    padding: 10px !important;
    box-sizing: border-box;
    max-width: 100vw !important;
  }

/* new added vinit */
.deals-table-container {
    overflow-x: auto !important;
    min-width: auto !important;
    width: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  .deals-table {
    display: table;
    min-width: 650px; /* Set min-width larger than total column widths */
    width: max-content;
    font-size: 0.93em;
  }
  .deals-table th,
  .deals-table td {
    min-width: 95px; /* Enough to prevent column collapse */
    padding: 7px 5px;
    font-size: 0.93em;
  }
}
