/* Mobile-first responsive styles for dog health assessment app */

:root {
    --primary-color: #007bff;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-bg: #f8f9fa;
    --border-radius: 8px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    line-height: 1.6;
}

/* Navigation */
.navbar-brand {
    font-weight: bold;
    color: var(--primary-color) !important;
}

.navbar-brand i {
    color: var(--warning-color);
}

/* Upload Card */
.upload-card {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius);
}

.upload-card .card-header {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

/* Camera Section */
#camera-container {
    max-width: 100%;
    margin: 0 auto;
}

#camera-video {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: block;
    margin: 0 auto;
}

#camera-canvas {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: var(--border-radius);
}

/* Form Styling */
.form-control {
    border-radius: var(--border-radius);
    border: 2px solid #e9ecef;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

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

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

/* Health Score Display */
.health-score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.score-number {
    font-size: 2.5rem;
    font-weight: bold;
}

.score-total {
    font-size: 1.2rem;
    opacity: 0.8;
}

.health-status {
    color: var(--primary-color);
    font-weight: bold;
    margin: 1rem 0;
}

/* Analysis Cards */
.analysis-score {
    display: flex;
    align-items: center;
    font-weight: bold;
}

.analysis-score .badge {
    font-size: 0.9rem;
    padding: 0.5rem 0.8rem;
}

/* Color Guide */
.color-sample {
    border: 2px solid #dee2e6;
    flex-shrink: 0;
}

.color-guide-item {
    padding: 1rem;
    border-radius: var(--border-radius);
    background: white;
    border: 1px solid #e9ecef;
    height: 100%;
}

/* Consistency Icons */
.consistency-icon {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Alerts and Messages */
.alert {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.alert-info {
    background-color: #e7f3ff;
    color: #0056b3;
}

.alert-warning {
    background-color: #fff8e1;
    color: #856404;
}

.alert-danger {
    background-color: #ffe6e6;
    color: #721c24;
}

.alert-success {
    background-color: #e8f5e8;
    color: #155724;
}

/* Loading Spinner */
#loading {
    padding: 2rem;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Card Styling */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
    transition: box-shadow 0.3s ease;
}

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

.card-header {
    background-color: white;
    border-bottom: 2px solid #e9ecef;
    font-weight: bold;
}

/* Progress Bar */
.progress {
    border-radius: var(--border-radius);
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: var(--border-radius);
    transition: width 0.6s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .upload-card {
        margin: 0 10px;
    }
    
    .btn-lg {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .health-score-circle {
        width: 100px;
        height: 100px;
    }
    
    .score-number {
        font-size: 2rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    #camera-video {
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .health-score-circle {
        width: 80px;
        height: 80px;
    }
    
    .score-number {
        font-size: 1.5rem;
    }
    
    .score-total {
        font-size: 1rem;
    }
    
    .card-header h3 {
        font-size: 1.3rem;
    }
    
    .card-header h5 {
        font-size: 1.1rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    #camera-section,
    .alert-info {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
    
    .container {
        max-width: 100%;
    }
    
    body {
        background: white;
    }
}

/* Accessibility */
.btn:focus,
.form-control:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #000;
    }
    
    .btn {
        border: 2px solid;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .btn,
    .card,
    .progress-bar {
        transition: none;
    }
    
    .btn:hover {
        transform: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --light-bg: #1a1a1a;
    }
    
    body {
        background-color: #1a1a1a;
        color: #ffffff;
    }
    
    .card {
        background-color: #2d2d2d;
        color: #ffffff;
    }
    
    .navbar-light {
        background-color: #2d2d2d !important;
    }
    
    .form-control {
        background-color: #2d2d2d;
        border-color: #444;
        color: #ffffff;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}
