/* Medical Agency Custom Styles */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

/* Product Cards */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e0e0e0;
}

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

.product-card .card-title {
    font-size: 0.95rem;
    height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Buttons */
.btn {
    border-radius: 6px;
    padding: 8px 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn-sm {
    padding: 4px 8px;
    font-size: 0.875rem;
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background: #f8f9fa;
}

/* Cards */
.card {
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.card-header {
    border-bottom: 2px solid rgba(0,0,0,0.1);
    font-weight: 600;
}

/* Tables */
.table {
    font-size: 0.95rem;
}

.table thead {
    background-color: #f8f9fa;
}

.table-hover tbody tr:hover {
    background-color: #f1f3f5;
}

/* Alerts */
.alert {
    border-radius: 8px;
    border-left: 4px solid;
}

.alert-success {
    border-left-color: var(--success-color);
}

.alert-danger {
    border-left-color: var(--danger-color);
}

.alert-warning {
    border-left-color: var(--warning-color);
}

.alert-info {
    border-left-color: var(--info-color);
}

/* Badges */
.badge {
    padding: 6px 12px;
    font-weight: 500;
    font-size: 0.85rem;
    transition: transform 0.3s ease;
}

/* Cart badge animation */
.navbar .badge {
    display: inline-block;
    transition: all 0.3s ease;
}

.navbar .badge.pulse {
    animation: pulse 0.5s ease;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
    }
}

/* Forms */
.form-control,
.form-select {
    border-radius: 6px;
    border: 1px solid #ced4da;
    padding: 10px 15px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 500;
    margin-bottom: 6px;
    color: #495057;
}

/* Pagination */
.pagination {
    margin-top: 20px;
}

.page-link {
    border-radius: 6px;
    margin: 0 3px;
    color: var(--primary-color);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Footer */
footer {
    margin-top: auto;
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .product-card .card-title {
        font-size: 0.875rem;
        height: auto;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .table {
        font-size: 0.875rem;
    }
    
    .btn {
        padding: 6px 12px;
        font-size: 0.875rem;
    }
}

@media (max-width: 576px) {
    .product-card .card-body {
        padding: 10px;
    }
    
    .card-header h5 {
        font-size: 1rem;
    }
    
    .btn-sm {
        padding: 3px 6px;
        font-size: 0.75rem;
    }
}

/* Admin Sidebar */
@media (min-width: 768px) {
    .sidebar {
        position: fixed;
        top: 56px;
        bottom: 0;
        left: 0;
        z-index: 100;
        overflow-y: auto;
    }
}

/* Sticky elements */
.sticky-top {
    position: sticky;
    top: 0;
    z-index: 1020;
}

/* Image hover effect */
img {
    transition: transform 0.3s ease;
}

img:hover {
    transform: scale(1.05);
}

/* Breadcrumb */
.breadcrumb {
    background-color: transparent;
    padding: 10px 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
}

/* List group */
.list-group-item {
    border-radius: 6px !important;
    margin-bottom: 5px;
    border: 1px solid #e0e0e0;
}

.list-group-item.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Utility classes */
.text-truncate-2 {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.shadow-sm {
    box-shadow: 0 2px 4px rgba(0,0,0,0.075) !important;
}

.shadow {
    box-shadow: 0 4px 6px rgba(0,0,0,0.1) !important;
}

.shadow-lg {
    box-shadow: 0 10px 15px rgba(0,0,0,0.15) !important;
}

/* Print styles */
@media print {
    .navbar,
    .sidebar,
    .btn,
    footer {
        display: none;
    }
}