/* Custom CSS for Hardware Comparison System */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease-in-out;
}

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

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

.btn:hover {
    transform: translateY(-2px);
}

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

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

/* Tables */
.table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.table th {
    background-color: var(--dark-color);
    color: white;
    border: none;
    padding: 15px;
}

.table td {
    padding: 12px 15px;
    vertical-align: middle;
}

/* Forms */
.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 10px 15px;
    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);
}

/* Hardware Comparison */
.comparison-card {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    background: white;
}

.comparison-card.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.spec-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.spec-row:last-child {
    border-bottom: none;
}

.spec-label {
    font-weight: 600;
    color: var(--dark-color);
}

.spec-value {
    color: var(--secondary-color);
}

/* Compatibility Indicators */
.compatibility-check {
    padding: 10px;
    border-radius: 8px;
    margin: 10px 0;
}

.compatibility-check.compatible {
    background-color: rgba(40, 167, 69, 0.1);
    border: 1px solid var(--success-color);
    color: var(--success-color);
}

.compatibility-check.incompatible {
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
}

.compatibility-check.warning {
    background-color: rgba(255, 193, 7, 0.1);
    border: 1px solid var(--warning-color);
    color: #856404;
}

/* Configuration Builder */
.config-section {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.config-section.filtered {
    border-left: 4px solid var(--success-color);
    background: rgba(40, 167, 69, 0.05);
}

.config-section h4 {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.selected-component {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid var(--success-color);
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
}

/* Price Display */
.price-display {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--success-color);
}

.total-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    background: rgba(0, 123, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    margin-top: 20px;
}

/* Admin Panel */
.admin-sidebar {
    background: var(--dark-color);
    min-height: 100vh;
    color: white;
}

.admin-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 12px 20px;
    border-radius: 5px;
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

.admin-content {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Inventory Management */
.inventory-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.inventory-item .item-info {
    flex-grow: 1;
}

.inventory-item .item-actions {
    display: flex;
    gap: 10px;
}

.stock-level {
    padding: 5px 10px;
    border-radius: 15px;
    font-weight: bold;
    font-size: 0.9rem;
}

.stock-level.high {
    background-color: var(--success-color);
    color: white;
}

.stock-level.medium {
    background-color: var(--warning-color);
    color: white;
}

.stock-level.low {
    background-color: var(--danger-color);
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
    }
    
    .comparison-card {
        margin-bottom: 20px;
    }
    
    .config-section {
        padding: 15px;
    }
    
    .admin-sidebar {
        min-height: auto;
    }
}

/* Loading Animations */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 123, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Detailed Comparison */
.detailed-comparison {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.detailed-comparison .table {
    margin-bottom: 0;
}

.detailed-comparison .table th {
    background-color: var(--dark-color);
    color: white;
    text-align: center;
    vertical-align: middle;
}

.detailed-comparison .table td {
    vertical-align: middle;
}

.detailed-comparison .table-success {
    background-color: rgba(40, 167, 69, 0.2) !important;
    font-weight: bold;
}

.score {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
}

.score-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, #e9ecef, #f8f9fa);
    border: 3px solid currentColor;
    margin-bottom: 5px;
}

.score.text-success .score-circle {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: var(--success-color);
}

.score.text-warning .score-circle {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
}

.score.text-danger .score-circle {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: var(--danger-color);
}

/* Comparison highlights */
.comparison-highlight {
    position: relative;
}

.comparison-highlight::after {
    content: '★';
    position: absolute;
    top: 5px;
    right: 5px;
    color: gold;
    font-size: 0.8rem;
}

/* Animation for comparison loading */
.comparison-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

/* Comparison export styles */
.export-controls {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(45deg, var(--primary-color), var(--info-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

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

/* Dynamic Filtering Styles */
.form-control.compatible {
    border: 2px solid var(--success-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
}

.form-control.incompatible {
    border: 2px solid var(--danger-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.form-control.filtered {
    position: relative;
}

.form-control.filtered::after {
    content: '✓';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--success-color);
    font-weight: bold;
}

.compatibility-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-left: 8px;
    vertical-align: middle;
}

.compatibility-indicator.compatible {
    background-color: var(--success-color);
}

.compatibility-indicator.incompatible {
    background-color: var(--danger-color);
}

.compatibility-indicator.filtered {
    background-color: var(--warning-color);
}