/* Company Medicines - Responsive CSS */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Container (page container) */
.container {
    max-width: 1024px;
    margin: 1rem auto;
    padding: 0 1rem;
}

/* Search text section */
.searchtext {
    min-height: 75px;
    margin-bottom: 10px;
}

/* Content block */
.row,
.company-data {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 0.375rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Heading */
.row h1,
.company-data h1 {
    font-size: 1.875rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #1e40af;
}

@media (max-width: 640px) {
    .row h1 {
        font-size: 1.5rem;
    }
}
/* Screen-reader only utility */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Total count */
.medicine-total {
    margin-bottom: 1rem;
    color: #4b5563;
}

/* Table wrapper */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Table */
.table-wrapper table {
    width: 100%;
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-collapse: collapse;
    border-radius: 0.375rem;
}

/* Table header */
.table-wrapper thead {
    background-color: #dbeafe;
}

.table-wrapper thead tr {
    background-color: #dbeafe;
}

.table-wrapper thead th {
    color: #1e3a8a;
    padding: 0.5rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 600;
}

/* Table body */
.table-wrapper tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s ease;
}

.table-wrapper tbody tr:hover {
    background-color: #eff6ff;
}

.table-wrapper tbody td {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #e5e7eb;
}

/* Links in table */
.table-wrapper tbody td a {
    color: #2563eb;
    text-decoration: none;
}

.table-wrapper tbody td a:hover {
    text-decoration: underline;
}

/* Empty state */
.empty-message {
    padding: 1rem;
    text-align: center;
    color: #6b7280;
}

/* Pagination */
.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.page-item {
    display: inline-block;
    margin: 0.25rem;
}

.page-link {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    background-color: #3b82f6;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.2s ease;
    font-size: 0.875rem;
}

.page-link:hover {
    background-color: #2563eb;
}

.page-link.active {
    background-color: #1e40af;
}

.page-link.disabled {
    background-color: #d1d5db;
    cursor: not-allowed;
}

/* Responsive adjustments for small devices */
@media (max-width: 768px) {
    .container {
        padding: 0;
    }

    .row,
    .company-data {
        padding: 1rem;
    }

    .table-wrapper thead th,
    .table-wrapper tbody td {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }

    .row h1,
    .company-data h1 {
        font-size: 1.25rem;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0;
    }

    .row,
    .company-data {
        padding: 0.75rem;
    }

    .row h1,
    .company-data h1 {
        font-size: 1.125rem;
        margin-bottom: 0.75rem;
    }

    .medicine-total {
        font-size: 0.875rem;
    }

    /* Stack table vertically on very small screens */
    .table-wrapper table {
        display: block;
        border: none;
    }

    .table-wrapper thead {
        display: none;
    }

    .table-wrapper tbody,
    .table-wrapper tr,
    .table-wrapper td {
        display: block;
        width: 100%;
    }

    .table-wrapper tbody tr {
        margin-bottom: 1rem;
        border: 1px solid #e5e7eb;
        border-radius: 0.375rem;
        overflow: hidden;
    }

    .table-wrapper tbody td {
        padding: 0.5rem 1rem;
        border: none;
        border-bottom: 1px solid #f3f4f6;
        position: relative;
        padding-left: 50%;
    }

    .table-wrapper tbody td:before {
        content: attr(data-label);
        position: absolute;
        left: 0.5rem;
        font-weight: 600;
        color: #1e40af;
        font-size: 0.875rem;
    }

    .table-wrapper tbody td:last-child {
        border-bottom: none;
    }

    /* Data attributes for mobile labels */
    .table-wrapper tbody td[data-label]::before {
        display: block;
    }

    .pagination {
        gap: 0.25rem;
    }

    .page-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0;
    }

    .row,
    .company-data {
        padding: 0.5rem;
        border-radius: 0.25rem;
    }

    .row h1,
    .company-data h1 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .table-wrapper thead th,
    .table-wrapper tbody td {
        padding: 0.4rem;
        font-size: 0.75rem;
    }

    .table-wrapper tbody td {
        padding: 0.4rem 0.8rem;
        padding-left: 45%;
    }

    .page-link {
        padding: 0.3rem 0.5rem;
        font-size: 0.7rem;
    }

 
}
