/* Healthcare Theme Variables */
:root {
    --primary-color: #2563eb;
    --primary-soft: #dbeafe;
    --success-soft: #dcfce7;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-600: #4b5563;
    --gray-700: #374151;
}

/* Global Styles */
html {
    font-size: 12px;
}

@media (min-width: 768px) {
    html {
        font-size: 14px;
    }
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--gray-700);
    margin: 0;
    padding: 0;
}

/* Healthcare Hero Section */
.healthcare-hero {
    background: linear-gradient(135deg, var(--primary-soft) 0%, #ffffff 100%);
    border-radius: 0 0 2rem 2rem;
    padding: 4rem 0;
    margin-bottom: 2rem;
}

.healthcare-hero h1 {
    color: var(--primary-color);
    font-weight: 700;
}

/* Feature Cards */
.feature-card {
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
    background: #ffffff;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.feature-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Background Colors */
.bg-primary-soft {
    background-color: var(--primary-soft);
    color: var(--primary-color);
}

.bg-success-soft {
    background-color: var(--success-soft);
    color: #16a34a;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-lg {
    padding: 1rem 2rem;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: var(--gray-100);
    border-bottom: 2px solid var(--gray-200);
    color: var(--gray-600);
    font-weight: 600;
}

/* Forms */
.form-control {
    border-radius: 0.5rem;
    border-color: var(--gray-200);
    padding: 0.75rem 1rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.form-label {
    font-weight: 500;
    color: var(--gray-700);
}

/* Cards */
.card {
    border: 1px solid var(--gray-200);
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
}

.card-header {
    background-color: var(--gray-100);
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 1.5rem;
}

.card-body {
    flex: 1 1 auto;
    overflow: auto;
}

/* Page Header */
.page-header {
    background: var(--gray-100);
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--gray-200);
}

.page-header h1 {
    color: var(--gray-700);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Utilities */
.text-primary {
    color: var(--primary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

.bg-light {
    background-color: var(--gray-100) !important;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html, body {
    height: 100%;
    position: relative;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* Remove any conflicting margin-bottom on body */
body {
    margin-bottom: 0 !important;
}

/* Layout */
html {
    height: 100%;
    position: relative;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
}

.content-wrapper {
    flex: 1 0 auto;
    width: 100%;
    padding-bottom: 2rem;
}

/* Ensure tables don't overflow their containers */
.table-responsive {
    overflow-x: auto;
    margin-bottom: 1rem;
}

/* Ensure container-fluid doesn't create unwanted overflow */
.container-fluid {
    width: 100%;
    padding-right: var(--bs-gutter-x, 0.75rem);
    padding-left: var(--bs-gutter-x, 0.75rem);
    margin-right: auto;
    margin-left: auto;
}

/* Base Layout */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

.flex-wrapper {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    justify-content: space-between;
}

.content {
    flex: 1;
}

.footer {
    background-color: var(--gray-100);
    padding: 1rem 0;
    border-top: 1px solid var(--gray-200);
}

/* Search Criteria */
.search-criteria {
    margin-bottom: 1.5rem;
}

.search-criteria .form-control-sm {
    height: calc(1.5em + 0.75rem + 2px);
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.search-criteria .form-text {
    margin-top: 0.25rem;
    font-size: 0.8125rem;
}

.search-criteria .btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    height: calc(1.5em + 0.75rem + 2px);
}

/* Search Form Styles */
.search-section {
    background-color: #fff;
    border: 1px solid var(--gray-200);
    padding: 1.25rem;
}

.search-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.search-section-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background-color: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
}

.search-section-title {
    color: var(--gray-700);
    font-weight: 600;
    font-size: 0.875rem;
    margin: 0;
}

.search-divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
}

.search-divider-text {
    background-color: #fff;
    padding: 0 0.75rem;
    color: var(--gray-600);
    font-size: 0.75rem;
    position: relative;
    z-index: 1;
}

.search-divider-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    margin: 0;
    border-top: 1px solid var(--gray-200);
    z-index: 0;
}

.form-floating > .form-control {
    padding-top: 1.25rem;
    padding-bottom: 0.375rem;
    height: calc(2.75rem + 2px);
    font-size: 0.875rem;
}

.form-floating > label {
    padding: 0.75rem 0.75rem;
    font-size: 0.875rem;
}

.card.search-criteria {
    border: none;
    background-color: #f8f9fa;
}

.card.search-criteria .card-body {
    padding: 1.25rem;
}

.card.search-criteria .card-header {
    padding: 0.75rem 1.25rem;
}

.card.search-criteria .card-title {
    font-size: 0.875rem;
}

/* Adjust button sizes */
.search-criteria .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}