/*---------------------------------------------------*/
/* UI Enhancements */
/*---------------------------------------------------*/

/* Base Typography */
body {
    font-family: 'Roboto', sans-serif;
    color: #2c3e50; /* Improved contrast for readability */
    line-height: 1.6;
}

h1, h2, h3 {
    font-size: 1.75rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: #34495e;
}

p, span, button {
    font-size: 1.25rem;
}

/* Form Elements */
input, textarea, select {
    border: 1px solid #ddd;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 1rem;
}

input:focus, textarea:focus, select:focus {
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.25);
    outline: none;
}

/* Validation states for forms */
input.error, textarea.error {
    border-color: #e74c3c;
    box-shadow: 0 0 5px rgba(231, 76, 60, 0.25);
}

input.success, textarea.success {
    border-color: #27ae60;
    box-shadow: 0 0 5px rgba(39, 174, 96, 0.25);
}

/* Table Enhancements */
table tbody tr:hover {
    cursor: pointer;
    background-color: #f8f9fa;
    transition: background-color 0.2s ease;
}

table thead th {
    position: sticky;
    top: 0;
    background-color: #fff;
    z-index: 2;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

.table-responsive {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

tr {   
    border-left: 4px solid #fff !important;
}

/* Sorting indicators */
th.sorted-asc::after {
    content: ' ▲';
    color: #3498db;
}

th.sorted-desc::after {
    content: ' ▼';
    color: #3498db;
}

/* Table Row Selection Styles - Regular Tables */
/* Base styles for bg-info */
tr.bg-info {
    border-left: 4px solid #17a2b8 !important;
}

tr.bg-info,
tr.bg-info td {
    background-color: #a8dadc !important;
    color: #0c5460 !important;
}

tr.bg-info:hover {
    border-left: 4px solid #138496 !important;
}

tr.bg-info:hover,
tr.bg-info:hover td {
    background-color: #6bb6cd !important;
    color: #0c5460 !important;
}

/* Base styles for bg-success */
tr.bg-success {
    border-left: 4px solid #28a745 !important;
}

tr.bg-success,
tr.bg-success td {
    background-color: #a8e6a3 !important;
    color: #155724 !important;
}

tr.bg-success:hover {
    border-left: 4px solid #1e7e34 !important;
}

tr.bg-success:hover,
tr.bg-success:hover td {
    background-color: #6bc763 !important;
    color: #155724 !important;
}

/* Base styles for bg-warning */
tr.bg-warning {
    border-left: 4px solid #ffc107 !important;
}

tr.bg-warning,
tr.bg-warning td {
    background-color: #ffe066 !important;
    color: #856404 !important;
}

tr.bg-warning:hover {
    border-left: 4px solid #e0a800 !important;
}

tr.bg-warning:hover,
tr.bg-warning:hover td {
    background-color: #ffcc00 !important;
    color: #856404 !important;
}

/* Base styles for bg-danger */
tr.bg-danger {
    border-left: 4px solid #dc3545 !important;
}

tr.bg-danger,
tr.bg-danger td {
    background-color: #f1a3a6 !important;
    color: #721c24 !important;
}

tr.bg-danger:hover {
    background-color: #e67579 !important;
    border-left: 4px solid #c82333 !important;
}

tr.bg-danger:hover,
tr.bg-danger:hover td {
    background-color: #e67579 !important;
    color: #721c24 !important;
}

/* Disabled state combinations for regular tables */
tr.bg-info.bg-disabled,
tr.bg-info.bg-disabled td {
    background-color: #c7dee5 !important;
    color: #5a6c75 !important;
}

tr.bg-info.bg-disabled:hover,
tr.bg-info.bg-disabled:hover td {
    background-color: #b8d4dc !important;
    color: #5a6c75 !important;
}

tr.bg-success.bg-disabled,
tr.bg-success.bg-disabled td {
    background-color: #d0e4d3 !important;
    color: #6c7d70 !important;
}

tr.bg-success.bg-disabled:hover,
tr.bg-success.bg-disabled:hover td {
    background-color: #c8dccb !important;
    color: #6c7d70 !important;
}

tr.bg-warning.bg-disabled,
tr.bg-warning.bg-disabled td {
    background-color: #f5f0c9 !important;
    color: #7a6c5a !important;
}

tr.bg-warning.bg-disabled:hover,
tr.bg-warning.bg-disabled:hover td {
    background-color: #f2edc0 !important;
    color: #7a6c5a !important;
}

tr.bg-danger.bg-disabled,
tr.bg-danger.bg-disabled td {
    background-color: #f0d4d7 !important;
    color: #756267 !important;
}

tr.bg-danger.bg-disabled:hover,
tr.bg-danger.bg-disabled:hover td {
    background-color: #edcdd1 !important;
    color: #756267 !important;
}

/* Table Row Selection Styles - Striped Tables */
/* Base styles for striped tables */
.table-striped tbody tr.bg-info {
    border-left: 4px solid #17a2b8 !important;
}

.table-striped tbody tr.bg-info,
.table-striped tbody tr.bg-info td {
    background-color: #a8dadc !important;
    color: #0c5460 !important;
}

.table-striped tbody tr.bg-info:hover {
    border-left: 4px solid #138496 !important;
}

.table-striped tbody tr.bg-info:hover,
.table-striped tbody tr.bg-info:hover td {
    background-color: #6bb6cd !important;
    color: #0c5460 !important;
}

.table-striped tbody tr.bg-success {
    border-left: 4px solid #28a745 !important;
}

.table-striped tbody tr.bg-success,
.table-striped tbody tr.bg-success td {
    background-color: #a8e6a3 !important;
    color: #155724 !important;
}

.table-striped tbody tr.bg-success:hover {
    border-left: 4px solid #1e7e34 !important;
}

.table-striped tbody tr.bg-success:hover,
.table-striped tbody tr.bg-success:hover td {
    background-color: #6bc763 !important;
    color: #155724 !important;
}

.table-striped tbody tr.bg-warning {
    border-left: 4px solid #ffc107 !important;
}

.table-striped tbody tr.bg-warning,
.table-striped tbody tr.bg-warning td {
    background-color: #ffe066 !important;
    color: #856404 !important;
}

.table-striped tbody tr.bg-warning:hover {
    border-left: 4px solid #e0a800 !important;
}

.table-striped tbody tr.bg-warning:hover,
.table-striped tbody tr.bg-warning:hover td {
    background-color: #ffcc00 !important;
    color: #856404 !important;
}

.table-striped tbody tr.bg-danger {
    border-left: 4px solid #dc3545 !important;
}

.table-striped tbody tr.bg-danger,
.table-striped tbody tr.bg-danger td {
    background-color: #f1a3a6 !important;
    color: #721c24 !important;
}

.table-striped tbody tr.bg-danger:hover {
    border-left: 4px solid #c82333 !important;
}

.table-striped tbody tr.bg-danger:hover,
.table-striped tbody tr.bg-danger:hover td {
    background-color: #e67579 !important;
    color: #721c24 !important;
}

/* Disabled states for striped tables */
.table-striped tbody tr.bg-disabled,
.table-striped tbody tr.bg-disabled td {
    background-color: #dfdfdf !important;
    color: #6c757d !important;
}

.table-striped tbody tr.bg-disabled:hover,
.table-striped tbody tr.bg-disabled:hover td {
    background-color: #d6d6d6 !important;
    color: #6c757d !important;
}

.table-striped tbody tr.bg-info.bg-disabled,
.table-striped tbody tr.bg-info.bg-disabled td {
    background-color: #c7dee5 !important;
    color: #5a6c75 !important;
}

.table-striped tbody tr.bg-info.bg-disabled:hover,
.table-striped tbody tr.bg-info.bg-disabled:hover td {
    background-color: #b8d4dc !important;
    color: #5a6c75 !important;
}

.table-striped tbody tr.bg-success.bg-disabled,
.table-striped tbody tr.bg-success.bg-disabled td {
    background-color: #d0e4d3 !important;
    color: #6c7d70 !important;
}

.table-striped tbody tr.bg-success.bg-disabled:hover,
.table-striped tbody tr.bg-success.bg-disabled:hover td {
    background-color: #c8dccb !important;
    color: #6c7d70 !important;
}

.table-striped tbody tr.bg-warning.bg-disabled,
.table-striped tbody tr.bg-warning.bg-disabled td {
    background-color: #f5f0c9 !important;
    color: #7a6c5a !important;
}

.table-striped tbody tr.bg-warning.bg-disabled:hover,
.table-striped tbody tr.bg-warning.bg-disabled:hover td {
    background-color: #f2edc0 !important;
    color: #7a6c5a !important;
}

.table-striped tbody tr.bg-danger.bg-disabled,
.table-striped tbody tr.bg-danger.bg-disabled td {
    background-color: #f0d4d7 !important;
    color: #756267 !important;
}

.table-striped tbody tr.bg-danger.bg-disabled:hover,
.table-striped tbody tr.bg-danger.bg-disabled:hover td {
    background-color: #edcdd1 !important;
    color: #756267 !important;
}

/* Base styles for unselected items (without bg- prefix) - Regular Tables */
tr.success,
tr.success td {
    background-color: #d1edcc !important;
    color: #0f5132 !important;
}

tr.warning,
tr.warning td {
    background-color: #fff3cd !important;
    color: #664d03 !important;
}

tr.info,
tr.info td {
    background-color: #d1ecf1 !important;
    color: #055160 !important;
}

tr.danger,
tr.danger td {
    background-color: #f8d7da !important;
    color: #58151c !important;
}

/* Base styles for unselected items (without bg- prefix) - Striped Tables */
.table-striped tbody tr.success,
.table-striped tbody tr.success td {
    background-color: #d1edcc !important;
    color: #0f5132 !important;
}

.table-striped tbody tr.warning,
.table-striped tbody tr.warning td {
    background-color: #fff3cd !important;
    color: #664d03 !important;
}

.table-striped tbody tr.info,
.table-striped tbody tr.info td {
    background-color: #d1ecf1 !important;
    color: #055160 !important;
}

.table-striped tbody tr.danger,
.table-striped tbody tr.danger td {
    background-color: #f8d7da !important;
    color: #58151c !important;
}

/* Hover styles for unselected items (without bg- prefix) - Regular Tables */
tr.success:hover,
tr.success:hover td {
    background-color: #c3e6ba !important;
    color: #0f5132 !important;
}

tr.warning:hover,
tr.warning:hover td {
    background-color: #ffeaa7 !important;
    color: #664d03 !important;
}

tr.info:hover,
tr.info:hover td {
    background-color: #b8e6f0 !important;
    color: #055160 !important;
}

tr.danger:hover,
tr.danger:hover td {
    background-color: #f1aeb5 !important;
    color: #58151c !important;
}

/* Hover styles for unselected items (without bg- prefix) - Striped Tables */
.table-striped tbody tr.success:hover,
.table-striped tbody tr.success:hover td {
    background-color: #c3e6ba !important;
    color: #0f5132 !important;
}

.table-striped tbody tr.warning:hover,
.table-striped tbody tr.warning:hover td {
    background-color: #ffeaa7 !important;
    color: #664d03 !important;
}

.table-striped tbody tr.info:hover,
.table-striped tbody tr.info:hover td {
    background-color: #b8e6f0 !important;
    color: #055160 !important;
}

.table-striped tbody tr.danger:hover,
.table-striped tbody tr.danger:hover td {
    background-color: #f1aeb5 !important;
    color: #58151c !important;
}

/* Badge styling for status indicators */
.badge {
    border-radius: 12px;
    padding: 4px 8px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-success {
    background-color: #27ae60;
    color: white;
}

.badge-warning {
    background-color: #f39c12;
    color: white;
}

.badge-danger {
    background-color: #e74c3c;
    color: white;
}

.badge-info {
    background-color: #3498db;
    color: white;
}

/* Pagination */
.pagination li a {
    color: #3498db;
    padding: 8px 12px;
    margin: 0 2px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination li a:hover {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.pagination li.active a {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

/* Layout Components */
.wrapper-md {
    padding: 5px;
}

.breadcrumb {
    margin: 0 0 5px 0;
    background-color: #f8f9fa;
    border-radius: 4px;
    padding: 8px 12px;
}

.well-time-sm {
    padding: 3px;
    border-radius: 3px;
}

.well-time {
    min-height: 28px;
}

.panel {
    margin-bottom: 5px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.portal_details_container {
    margin: 5px;
    padding: 15px;
    background-color: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Utility Classes */
.bg-disabled {
    color: #6c757d;
    background-color: #dfdfdf;
}

.padder-v {
    padding-top: 15px;
    padding-bottom: 5px;
}

.padding-right-5 {
    padding-right: 5px;
}

/* Clinical Research Specific Styles */
.document-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-approved {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-rejected {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus indicators for keyboard navigation */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/*---------------------------------------------------*/