/**
 * AutoSMS Application Styles
 * Extracted from inline styles for better maintainability and CSP compliance
 * 
 * Date: March 18, 2026
 * Note: Only static, non-dynamic CSS extracted from templates
 */

/* ============================================
   SHOP FLOOR STYLES
   ============================================ */

.shop-floor-board {
    display: grid;
    grid-template-columns: minmax(240px, 18%) 1fr;
    gap: 1rem;
    padding-bottom: 1rem;
    align-items: start;
}

.shop-floor-sidebar {
    align-self: stretch;
}

.shop-floor-bays {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.shop-floor-bay {
    min-width: 0;
    max-width: none;
    flex: none;
    display: flex;
    flex-direction: column;
}

.bay-header {
    padding: 0.75rem;
    border-radius: 0.375rem 0.375rem 0 0;
    font-weight: 600;
}

.bay-body {
    min-height: 160px;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 0.375rem 0.375rem;
    padding: 0.75rem;
    background-color: #f8f9fa;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.bay-body > .text-center:first-child:last-child {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.bay-vehicle-card {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.bay-vehicle-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.shop-floor-board:fullscreen,
.workflow-board:fullscreen {
    padding: 1rem;
    background-color: #f5f5f5;
    overflow-y: auto;
    height: 100%;
}

.workflow-board:fullscreen .stage-body {
    max-height: calc(50vh - 50px);
    overflow-y: auto;
}

.stage-body {
    max-height: 50vh;
    overflow-y: auto;
}

.bay-status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
}

.bay-status-active {
    background-color: #198754;
}

.bay-status-idle {
    background-color: #6c757d;
}

.bay-status-pending {
    background-color: #ffc107;
}

/* ============================================
   DASHBOARD STYLES
   ============================================ */

/* Pulse animation for critical alerts */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.alert-critical {
    box-shadow: 0 0 15px rgba(220, 53, 69, 0.3);
    border: 2px solid #dc3545;
}

/* Metric cards hover effect */
.card-metric {
    transition: transform 0.2s ease;
}

.card-metric:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Priority indicators */
.priority-high { 
    border-left: 4px solid #dc3545; 
}

.priority-medium { 
    border-left: 4px solid #ffc107; 
}

.priority-low { 
    border-left: 4px solid #28a745; 
}

/* Thick border utility for metric cards */
.thick-border {
    border-width: 5px !important;
    border-style: solid !important;
    background-color: transparent !important;
}

/* Force thick borders to be visible */
.card[style*="border-width: 5px"] {
    border-width: 5px !important;
    border-style: solid !important;
}

/* Override Bootstrap border utilities with stronger specificity */
.card.border-primary[style*="border-width: 5px"] {
    border: 5px solid #007bff !important;
}

.card.border-secondary[style*="border-width: 5px"] {
    border: 5px solid #6c757d !important;
}

.card.border-success[style*="border-width: 5px"] {
    border: 5px solid #28a745 !important;
}

.card.border-warning[style*="border-width: 5px"] {
    border: 5px solid #ffc107 !important;
}

.card.border-danger[style*="border-width: 5px"] {
    border: 5px solid #dc3545 !important;
}

.card.border-info[style*="border-width: 5px"] {
    border: 5px solid #17a2b8 !important;
}

.card.border-dark[style*="border-width: 5px"] {
    border: 5px solid #343a40 !important;
}

/* Alternative approach - target specific cards */
.overview-stats .card {
    border-width: 5px !important;
    border-style: solid !important;
    background-color: transparent !important;
}

.overview-stats .card.border-primary {
    border-color: #007bff !important;
}

.overview-stats .card.border-secondary {
    border-color: #6c757d !important;
}

.overview-stats .card.border-success {
    border-color: #28a745 !important;
}

.overview-stats .card.border-warning {
    border-color: #ffc107 !important;
}

.overview-stats .card.border-danger {
    border-color: #dc3545 !important;
}

.overview-stats .card.border-info {
    border-color: #17a2b8 !important;
}

.overview-stats .card.border-dark {
    border-color: #343a40 !important;
}

/* Metric display */
.metric-large { 
    font-size: 2.5rem; 
    font-weight: bold; 
}

.metric-trend { 
    font-size: 0.875rem; 
    opacity: 0.8; 
}

/* ============================================
   FOOTER VERSION DISPLAY
   ============================================ */

.footer-meta {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-version {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
}

.footer-version a,
.footer-version span {
    color: inherit !important;
    text-decoration: none;
}

.footer-version a:hover,
.footer-version a:focus {
    color: #ffffff !important;
    text-decoration: underline;
}

.admin-footer {
    margin-top: 2rem;
}

.admin-footer .footer-meta {
    margin-top: 0;
}

@media (max-width: 991.98px) {
    .footer-meta {
        text-align: center;
    }
}

/* ============================================
   DASHBOARD CUSTOMIZATION STYLES
   ============================================ */

.dashboard-card {
    margin-bottom: 1rem;
}

.sortable-ghost {
    opacity: 0.4;
}

.sortable-chosen {
    transform: scale(1.02);
}

.dashboard-controls {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1000;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 10px;
}

.card-toggle {
    font-size: 0.8rem;
    margin: 2px 0;
}

/* ============================================
   MOBILE SCROLLING FIX
   ============================================ */

@media (max-width: 768px) {
    .dashboard-card {
        touch-action: pan-y;
    }
    
    .card {
        touch-action: pan-y;
    }
    
    body {
        touch-action: pan-y;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Common transitions */
.transition-all {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Status badges */
.status-active {
    background-color: #28a745;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.status-pending {
    background-color: #ffc107;
    color: #212529;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.status-inactive {
    background-color: #6c757d;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

/* ============================================
   STORAGE USAGE BAR
   Discrete width classes (5% steps) so progress bar fill can be set from
   a server-rendered percentage bucket without inline styles.
   ============================================ */

.storage-bar-w-0   { width: 0%; }
.storage-bar-w-5   { width: 5%; }
.storage-bar-w-10  { width: 10%; }
.storage-bar-w-15  { width: 15%; }
.storage-bar-w-20  { width: 20%; }
.storage-bar-w-25  { width: 25%; }
.storage-bar-w-30  { width: 30%; }
.storage-bar-w-35  { width: 35%; }
.storage-bar-w-40  { width: 40%; }
.storage-bar-w-45  { width: 45%; }
.storage-bar-w-50  { width: 50%; }
.storage-bar-w-55  { width: 55%; }
.storage-bar-w-60  { width: 60%; }
.storage-bar-w-65  { width: 65%; }
.storage-bar-w-70  { width: 70%; }
.storage-bar-w-75  { width: 75%; }
.storage-bar-w-80  { width: 80%; }
.storage-bar-w-85  { width: 85%; }
.storage-bar-w-90  { width: 90%; }
.storage-bar-w-95  { width: 95%; }
.storage-bar-w-100 { width: 100%; }

.storage-progress-track {
    height: 6px;
}

/* ============================================
   POLICY CONTENT (rendered lite-markdown)
   ============================================ */

.policy-content p {
    margin-bottom: 0.5rem;
}

.policy-content ul,
.policy-content ol {
    margin-bottom: 0.5rem;
    padding-left: 1.25rem;
}

.policy-content h4,
.policy-content h5,
.policy-content h6 {
    margin-top: 0.5rem;
    margin-bottom: 0.35rem;
}

.policy-content > *:last-child {
    margin-bottom: 0;
}

.policy-preview-text {
    max-width: 60ch;
}

.policy-content-preview {
    min-height: 12rem;
    overflow-y: auto;
}

/* ============================================
   DASHBOARD CHART INTERACTIONS
   ============================================ */

.chart-point-hover {
    cursor: pointer;
}


