// src/BrightLifeIMS.Web/wwwroot/css/site.css
/* Custom styles for BrightLife IMS */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
}

/* Layout adjustments */
html, body {
    height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
}

main {
    flex: 1 0 auto;
}

/* Card enhancements */
.card {
    transition: transform 0.2s, box-shadow 0.2s;
    border-radius: 8px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Inventory cards */
.inventory-card {
    position: relative;
    overflow: hidden;
}

.inventory-card .badge {
    position: absolute;
    top: 10px;
    right: 10px;
}

/* Custom field configuration */
.custom-field-item {
    padding: 10px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    margin-bottom: 10px;
    background: #f8f9fa;
}

.custom-field-item:hover {
    background: #e9ecef;
}

.custom-field-item input[type="checkbox"] {
    margin-right: 10px;
}

/* Auto-save indicator */
#autoSaveIndicator {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 15px;
    background: #f8f9fa;
}

/* ID format builder */
.id-format-builder {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
}

.id-format-builder .btn-group {
    flex-wrap: wrap;
}

#idPreview {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: var(--success-color);
}

/* Component palette styles */
.component-palette {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 15px;
}

.component-group {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 10px;
}

.component-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.component-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}

.component-btn {
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
    transition: all 0.2s ease;
}

.component-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Template buttons */
.template-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.template-btn {
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    white-space: nowrap;
}

/* Preview container */
.preview-container {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 15px;
}

.preview-item {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 3px;
    border-left: 4px solid var(--success-color);
}

.preview-multiple code {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}

/* Format explanation */
.explanation-container {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 15px;
}

.explanation-text {
    background: #f8f9fa;
    border-radius: 3px;
    padding: 10px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

/* Testing tools */
.testing-tools {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 15px;
}

.testing-tools details summary {
    cursor: pointer;
    list-style: none;
    padding: 8px 12px;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.testing-tools details summary::-webkit-details-marker {
    display: none;
}

.testing-tools details summary::before {
    content: '▶';
    margin-right: 8px;
    transition: transform 0.2s;
}

.testing-tools details[open] summary::before {
    transform: rotate(90deg);
}

.testing-tools details summary:hover {
    background-color: #f8f9fa;
}

.test-results {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 3px;
    padding: 10px;
    background: #f8f9fa;
}

.test-id-item {
    padding: 5px 0;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
}

.test-id-item:last-child {
    border-bottom: none;
}

.test-id-item code {
    background: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.9em;
}

/* Validation styles */
#formatValidation {
    margin-top: 5px;
    font-size: 0.875em;
}

#formatValidation .text-success {
    color: #198754 !important;
}

#formatValidation .text-danger {
    color: #dc3545 !important;
}

#formatValidation .text-warning {
    color: #fd7e14 !important;
}

/* Responsive design for ID builder */
@media (max-width: 768px) {
    .component-buttons {
        justify-content: center;
    }
    
    .template-buttons {
        flex-direction: column;
    }
    
    .template-btn {
        text-align: center;
    }
    
    .preview-multiple code {
        display: block;
        margin-bottom: 5px;
    }
}

/* Table enhancements */
.table-responsive {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.table thead th {
    background: var(--primary-color);
    color: white;
    border: none;
}

/* Form enhancements */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Toast positioning */
.toast-container {
    z-index: 9999;
}

/* Loading spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }
    
    .btn-group-sm .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .card {
        break-inside: avoid;
    }
}

/* Utility classes */
.cursor-pointer {
    cursor: pointer;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.opacity-hover {
    transition: opacity 0.2s;
}

.opacity-hover:hover {
    opacity: 0.8;
}

/* Footer styling */
.footer {
    margin-top: auto;
    padding: 1rem 0;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    text-align: center;
    flex-shrink: 0;
}

