/**
 * Custom styles for PharmaPredict
 * Using Bootstrap dark theme as base
 */

:root {
    --pharma-primary: #0d6efd;
    --pharma-secondary: #6c757d;
    --pharma-success: #198754;
    --pharma-danger: #dc3545;
    --pharma-warning: #ffc107;
    --pharma-info: #0dcaf0;
    --pharma-light: #f8f9fa;
    --pharma-dark: #212529;
    --pharma-bg-dark: #2b3035;
    --pharma-card-bg: #343a40;
}

/* Body and global styles */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main.container {
    flex: 1;
}

/* Card styles */
.card {
    transition: all 0.3s ease;
    border-radius: 0.5rem;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    border-top-left-radius: 0.5rem !important;
    border-top-right-radius: 0.5rem !important;
}

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

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.1);
}

/* Custom badge styles */
.badge.bg-success {
    background-color: var(--pharma-success) !important;
}

.badge.bg-warning {
    background-color: var(--pharma-warning) !important;
    color: var(--pharma-dark);
}

.badge.bg-danger {
    background-color: var(--pharma-danger) !important;
}

.badge.bg-info {
    background-color: var(--pharma-info) !important;
    color: var(--pharma-dark);
}

/* Scanner styles */
#scanner-container {
    position: relative;
    max-width: 100%;
    border-radius: 0.5rem;
    overflow: hidden;
}

#scanner-viewport {
    width: 100%;
    max-width: 640px;
    height: 320px;
    background-color: #000;
    border-radius: 0.5rem;
    margin: 0 auto;
}

.drawingBuffer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Form styles */
.form-floating > .form-control,
.form-floating > .form-select {
    height: calc(3.5rem + 2px);
    line-height: 1.25;
}

.form-floating > label {
    padding: 1rem 0.75rem;
}

/* Dashboard stats */
.dashboard-stat-card .stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    font-size: 1.5rem;
}

/* Alerts styling */
.alert {
    border: none;
    border-radius: 0.5rem;
}

/* Custom button styles */
.btn {
    border-radius: 0.4rem;
}

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

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

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

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

/* Offline banner */
#offline-banner {
    border-radius: 0.5rem;
    border-left: 0.25rem solid var(--pharma-warning);
}

/* Responsive tables */
@media (max-width: 768px) {
    .table-responsive {
        overflow-x: auto;
    }
    
    .table th,
    .table td {
        white-space: nowrap;
    }
}

/* Prediction modal charts */
#predictionChart {
    min-height: 250px;
}

/* Scan result section */
#scan-result {
    transition: all 0.3s ease;
}

/* Loading spinner */
.loading-spinner {
    width: 3rem;
    height: 3rem;
}

/* OS list highlight */
.os-item {
    transition: all 0.3s ease;
}

.os-item:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Settings form */
.settings-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-section:last-child {
    border-bottom: none;
}

/* Login page */
.form-signin {
    max-width: 420px;
    padding: 15px;
    margin: auto;
}

.form-signin .brand-logo {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

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