@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
body {
    font-family: "Poppins", serif;
    margin: 0;
    background: #f9f9f9;
    color: #333;
}
.scan-info {
    display: flex;
    align-items:center;
    gap: 5px;
    flex-direction: column;
}
.history_table_container {
    padding: 20px;
    max-width: 100%;
    margin: 0 auto;
    /* height: 100vh; */
    display: flex;
    flex-direction: column;
    /* overflow-y: hidden; */
    background: unset;
}
#all_history_container
{
    max-height: calc(100vh - 400px);
}
#static_history_container{
    max-height: calc(100vh - 400px);
}
#dynamic_history_container{
    max-height: calc(100vh - 400px);
}

/* Fixed header section */
.fixed-header {
    /* background: #f9f9f9; */
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 20px 20px 0;
}

/* Scrollable content section */
.scrollable-content {
    flex: 1;
    overflow-y: auto;
    padding:0 0 85px;
    scrollbar-width: none;
    min-height:585px;
}
.scrollable-content::-webkit-scrollbar {
    width: 5px; /* width of the scrollbar */
  }
  
  .scrollable-content::-webkit-scrollbar-track {
    background: #f1f1f1; /* color of the track */
  }
  
  .scrollable-content::-webkit-scrollbar-thumb {
    background: #6754BC; /* color of the scrollbar */
    border-radius: 10px; /* roundness of the scrollbar */
  }
  
  .scrollable-content::-webkit-scrollbar-thumb:hover {
    background: #6754BC; /* color of the scrollbar on hover */
  }
/* Container for the header section */
.header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 12px;
    margin-bottom: 20px;
}

/* Filter tabs styling */
.filter-tabs {
    display: flex;
    gap: 20px;
    position: relative;
}

.filter-tab {
    cursor: pointer;
    color: #666;
    font-size: 14px;
    padding: 8px 0;
    position: relative;
    font-weight: 500;
}

.filter-tab::after {
    content: '';
    position: absolute;
    bottom: -13px; /* Position the line right at the bottom border */
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #715CCD;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.filter-tab.active {
    color: #000;
    font-weight: 500;
    font-size: 14px;
}

.filter-tab.active::after {
    transform: scaleX(1);
}

/* Right controls styling */
.right-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Search container */
.search-container {
    position: relative;
    margin: 15px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.global_trash {
    padding: 8px 16px;
    border-radius: 100px;
    background: #FFE5E5; /* Light red background */
    border: none;
    color: #FF0000; /* Red text */
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px !important;
    transition: background-color 0.2s ease;
    flex-direction: row;
}

.global_trash i {
    font-size: 14px;
}

.global_trash::after {
    content: '';
    font-weight: 500;
 
}

.global_trash:hover {
    background: #FFD6D6; /* Slightly darker red on hover */
}
.search_delete_container{
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.search-container input {
    width: auto;
    padding: 8px 12px;
    padding-left: 35px;
    border: 1px solid #ddd;
    border-radius: 36px;
    font-size: 14px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

/* QR Cards */
.qr-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 10px 0;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: center;
}

.checkbox-container {
    display: flex;
    align-items: center;
}

.qr-image {
    width: 100px;
    height: 100px;
}

.qr-details {
    flex: 0.95;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.qr-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
}

.qr-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qr-title h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

.qr-meta {
    color: #747474;
    font-size: 14px;
    font-weight: 500;
}

.qr-link {
    color: #646464;
    font-size: 13px;
    text-decoration: none;
    font-weight: 500;
}

.qr-stats {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.scan-count {
    font-size: 24px;
    font-weight: 600;
    color: #6754BC;
}

.scan-label {
    color: #0DA00F;
    font-size: 12px;
    font-weight: 500;
}

.status-badge {
    padding: 9px 13px;
    border-radius: 20px;
    font-size: 12px;
}

.status-badge.active {
    background: #46CB48;
    color: #FFFFFF;
    font-size: 12px;
}


.qr-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    /* padding: 6px 12px; */
    padding: 6px;
    border-radius: 36px;
    border: 1.5px solid #6855BD;
    background: #fff;
    color: #6855BD;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    gap: 5px;
}


.action-btn:hover {
    background: #f9fafb;
   
}

/* Pagination */
.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-navigation {
    display: flex;
    align-items: center;
    gap: 0px;
}

.nav-btn {
    border: 1px solid #e5e7eb;
    padding: 0px 7px;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}

/* Add these styles for the buttons */
.sort-btn, .quantity-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #ECECEC;
    color: rgb(102 102 102 / 55%);
    font-size: 14px;
    cursor: pointer;
}

.sort-btn i, .quantity-btn i {
    font-size: 12px;
    color: #666;
}

.right-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pagination-info {
    color: #666;
    font-size: 14px;
}

/* Responsive styles for screens below 768px */
@media (min-width: 576px) and (max-width: 992px) {
    .fixed-header {
        padding: 10px 10px 0;
    }
    
    .scrollable-content {
        padding: 10px;
    }

    /* Header controls */
    .header-controls {
        flex-direction: row;
        align-items: flex-start;
        gap: 15px;
    }

    .right-controls {
        width: 100%;
        flex-wrap: wrap;
        gap: 10px;
    }

    /* QR Cards */
    .qr-card {
        flex-direction: row;
        padding: 15px;
        gap: 15px;
        align-items: flex-start;
    }

    .checkbox-container {
        padding-top: 5px;
    }

    .qr-image {
        width: 80px;
        height: 80px;
        margin-right: 5px;
    }

    .qr-details {
        flex: 1;
        flex-direction: row;
        gap: 10px;
        margin-left: 0;  /* Remove negative margin */
    }

    .qr-info {
        margin-left: 0;  /* Remove negative margin */
        gap: 5px;
    }

    .qr-title {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 2px;
    }

    .qr-title h4 {
        font-size: 14px;
        margin: 0;
    }

    .qr-meta {
        font-size: 12px;
        color: #666;
    }

    .qr-link {
        font-size: 12px;
        word-break: break-all;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .qr-stats {
        display: flex;
        align-items: center;
        gap: 4px;
        margin: 5px 0;
        margin-left: 0;
    }

    .scan-info {
        display: flex;
        align-items:center;
        gap: 5px;
        flex-direction: column;
    }

    .scan-count {
        font-size: 18px;
    }

    .scan-label {
        font-size: 12px;
    }

    .status-badge {
        padding: 3px 8px;
        font-size: 11px;
    }

    /* Three dots menu positioning */
    .mobile-menu-dots {
        position: absolute;
        top: 0px;
        right: 15px;
    }

    .mobile-menu-dropdown {
        top: calc(100% + 5px);
        right: 0;
        min-width: 160px;
    }

    .details-button {
        order: 3; /* Ensure proper ordering in mobile layout */
        /* width: 100%; */
        text-align: center;
        display: contents;
        /* margin-top: 10px; */
        /* margin-right: -60px; */
    }
    
    .detailsButton {
        padding: 8px 12px;
        font-size: 13px;
    }
    .qr-actions{
        gap: 5px;
    }
}

/* Additional styles for very small screens */
@media screen and (max-width: 375px) {
    .qr-card {
        padding: 12px;
        gap: 10px;
    }

    .qr-image {
        width: 45px;
        height: 45px;
    }

    .qr-link {
        max-width: 180px;
    }

    .mobile-menu-dots {
        top: 12px;
        right: 12px;
    }
}

@media screen and (max-width: 450px) {
    
    .qr-meta {
        display: none;  /* Hide the title and created date */
    }

    .qr-info {
        margin-left: -60px;  /* Adjust position for simpler layout */
    }

    .qr-link {
        font-size: 11px;  /* Make URL slightly smaller */
    }

    /* Hide Edit and Print text */
    button[title="Edit"], 
    button[title="Print"],
    .action-btn > *:not(i) {  /* Hide all children except icons */
        display: none !important;
    }

    /* Make buttons square with centered icons */
    .action-btn {
        padding: 6px;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: unset;  /* Remove any minimum width */
    }

    .action-btn i {
        margin: 0;
        font-size: 14px;
    }

    /* Ensure proper spacing */
    .qr-actions {
        gap: 8px;
        display: flex;
        align-items: center;
    }
}

/* Add to existing action-btn styles */
.detailsButton {
    /* background: #7B68EE;
    color: white !important; */
    border: 1px solid #7B68EE !important;
    transition: all 0.3s ease;
}

.detailsButton:hover {
    /* background: #6A5ACD; */
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(122, 92, 237, 0.2);
}

/* For mobile views */
@media (max-width: 480px) {
    .detailsButton span {
        display: none;
    }
    
    .detailsButton i {
        margin: 0;
        font-size: 14px;
    }
    
    .detailsButton {
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 36px !important;
        margin-top:-10px;
    }
}

.download-btn {
    position: relative;
}

.download-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border-radius: 4px;
    min-width: 120px;
    z-index: 1000;
}
.download-dropdown-menu1search {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border-radius: 4px;
    min-width: 120px;
    z-index: 1000;
}

.download-option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.download-option:hover {
    background: #f5f5f5;
}

.download-icon {
    width: 16px;
    height: 16px;
    margin-right: 8px;
}

.download-option span {
    font-size: 14px;
}

/* Add these new styles */
.mobile-menu-dots {
    display: none;
    position: relative;
}

.mobile-menu-dots .dots-btn {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    font-size: 18px;
}

.mobile-menu-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border-radius: 8px;
    min-width: 150px;
    z-index: 1000;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.2s;
    color: #666;
    text-decoration: none;
}

.mobile-menu-item:hover {
    background: #f5f5f5;
}

.mobile-menu-item i {
    margin-right: 10px;
    width: 20px;
}

/* Modify the media query */
@media screen and (max-width: 992px) {
    /* .qr-actions {
        display: none;
    } */

    .mobile-menu-dots {
        display: block;
    }
}
button#quantityDropdown{
    background: #ECECEC;
    border-radius: 36px;
    font-size: 12px;
    font-weight: 400;
}
button.nav-btn {
    border: none;
    background: unset;
    font-size: 12px;
    color: #666;
}
.infor_container{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    flex-direction: column;
}
.line_separator{
    height: 68px;
    width: 0.5px;
    background-color: #B6B6B6;
}
.qr_image_card{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    height: 100%;
    padding: 20px;
    /* background-color: #F5F3FF; */
    border-radius: 9px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
.qr-item{
    display: flex;
}
@media screen and (max-width :576px) 
{
    .fixed-header {
        padding: 10px 10px 0;
    }
    
    .scrollable-content {
        padding: 10px;
    }

    /* Header controls */
    .header-controls {
        flex-direction: row;
        align-items: flex-start;
        gap: 15px;
    }

    .right-controls {
        width: 100%;
        flex-wrap: wrap;
        gap: 10px;
        flex-direction: column;
    }

    /* QR Cards */
    .qr-card {
        flex-direction: row;
        padding: 15px;
        gap: 15px;
        align-items: flex-start;
    }

    .checkbox-container {
        padding-top: 5px;
    }

    .qr-image {
        width: 50px;
        height: 50px;
        margin-right: 5px;
    }

    .qr-details {
        flex: 1;
        flex-direction: column;
        gap: 10px;
        margin-left: 0;  /* Remove negative margin */
    }

    .qr-info {
        margin-left: 0;  /* Remove negative margin */
        gap: 5px;
    }

    .qr-title {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 2px;
    }

    .qr-title h4 {
        font-size: 14px;
        margin: 0;
    }

    .qr-meta {
        font-size: 12px;
        color: #666;
    }

    .qr-link {
        font-size: 12px;
        word-break: break-all;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .qr-stats {
        display: flex;
        align-items: center;
        gap: 15px;
        margin: 5px 0;
        margin-left: 0;
        justify-content: center;
    }

    .scan-info {
        display: flex;
        align-items: center;
        gap: 5px;
        flex-direction: column;
    }

    .scan-count {
        font-size: 18px;
    }

    .scan-label {
        font-size: 12px;
    }

    .status-badge {
        padding: 3px 8px;
        font-size: 11px;
    }

    /* Three dots menu positioning */
    .mobile-menu-dots {
        position: absolute;
        top: 0px;
        right: 15px;
    }

    .mobile-menu-dropdown {
        top: calc(100% + 5px);
        right: 0;
        min-width: 160px;
    }

    .details-button {
         /* Ensure proper ordering in mobile layout */
        /* width: 100%; */
        text-align: center;
        
        /* margin-right: -60px; */
    }
    
    .detailsButton {
        padding: 8px 12px;
        font-size: 13px;
    }
}
    
@media (min-width: 768px) and (max-width: 846px){
    .qr-stats{
        flex-direction: row;
    }
}
@media screen  and (max-width: 425px){
    .details-button{
        margin-top: 10px;
    }
}
.qr-title h4{
    color: #6754BC;
    font-size: 20px;
    font-weight: 500;
}

.ccode{
    color: #747474;
}
  /* Improved tooltip styles */
  .details-button {
    position: relative;
  }
  
  .details-button .tooltip-text {
    visibility: hidden;
    width: 120px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 5px;
    position: absolute;
    z-index: 100;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
    pointer-events: none;
  }
  
  .details-button:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
  } 
.action-btn {
    position: relative;
  }
  
  .action-btn .tooltip-text {
    visibility: hidden;
    width: auto;
    max-width: 120px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 5px;
    position: absolute;
    z-index: 100;
    bottom: 125%; /* Position above the button */
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .action-btn:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
  }
  
  /* Ensure the container doesn't overflow */
  .qr-actions, .details-button {
    overflow: visible;
  }
  
  /* Ensure the main container doesn't cause scrolling */
  .history_table_container {
    overflow-x: hidden;
  }
  
  /* Make sure the QR card doesn't overflow */
  .qr-card {
    max-width: 100%;
    /* overflow: hidden; */
  }
  @media (min-resolution:140dpi) and (max-resolution:151dpi) {
    body{
        zoom:70%
    }
    
    #all_history_container {
        max-height: calc(100vh - 60px);
    }
     #static_history_container {
        max-height: calc(100vh - 60px) ;
    }
    #dynamic_history_container {
        max-height: calc(100vh - 60px);
    }
    
}
@media (min-resolution: 120dpi) and (max-resolution: 125dpi) {
    #all_history_container {
        max-height: calc(100vh - 155px);
    }
     #static_history_container {
        max-height: calc(100vh - 155px);
    }
    #dynamic_history_container {
        max-height: calc(100vh - 155px);
    }
}