/* App-wide Styles to Replace Inline Styles */
/* This file eliminates the need for unsafe-inline in CSP */

/* Fleet header styles */
.fleet-header {
    font-size: 3rem;
    font-weight: normal;
}

/* Notification container styles */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 300px;
}

/* Login Page Styles */
.login-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--dark-bg);
    filter: blur(10px);
    z-index: -1;
}

#iris-animation-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    opacity: 0.7;
}

/* SSO Button Styling */
.sso-btn {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #0078d4;
    background: transparent;
    color: #0078d4;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
}

.sso-btn:hover {
    background: #0078d4;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.3);
}

/* Google SSO Button - Yellow Branding */
.sso-btn.btn-outline-danger {
    border: 2px solid #FBBC05;
    color: #FBBC05;
}

.sso-btn.btn-outline-danger:hover {
    background: #FBBC05;
    color: #000;
    box-shadow: 0 4px 12px rgba(251, 188, 5, 0.4);
}

.sso-btn i {
    margin-right: 8px;
    font-size: 1.1em;
}

.login-container {
    max-width: 400px;
    width: 90%;
    margin: 0 auto;
    padding: 0;
    background: transparent;
    border-radius: 12px;
    position: relative;
    z-index: 10;
}

/* Common utility classes to replace inline styles */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-flex { display: flex !important; }
.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }
.m-0 { margin: 0 !important; }
.p-0 { padding: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }

/* Replace common inline color styles */
.text-primary { color: #007bff !important; }
.text-success { color: #28a745 !important; }
.text-danger { color: #dc3545 !important; }
.text-warning { color: #ffc107 !important; }
.text-info { color: #17a2b8 !important; }
.text-light { color: #f8f9fa !important; }
.text-dark { color: #343a40 !important; }
.text-white { color: #fff !important; }
.text-muted { color: #6c757d !important; }

.bg-primary { background-color: #007bff !important; }
.bg-success { background-color: #28a745 !important; }
.bg-danger { background-color: #dc3545 !important; }
.bg-warning { background-color: #ffc107 !important; }
.bg-info { background-color: #17a2b8 !important; }
.bg-light { background-color: #f8f9fa !important; }
.bg-dark { background-color: #343a40 !important; }
.bg-white { background-color: #fff !important; }

/* Replace common inline display styles */
.hidden { display: none; }
.visible { display: block; }
.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Card and modal styles */
.modal-orange-border {
    border: 3px solid #ff6b35;
}

.card-orange-border {
    border: 2px solid #ff6b35;
}

/* Map and visualization styles */
.map-container {
    height: 500px;
    width: 100%;
    position: relative;
}

.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
}

/* Loading and spinner styles */
.spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Form styles */
.form-group-styled {
    margin-bottom: 1.5rem;
}

.form-control-styled {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.75rem;
    width: 100%;
}

/* Button styles */
.btn-styled {
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary-styled {
    background: #007bff;
    color: white;
}

.btn-primary-styled:hover {
    background: #0056b3;
}

.btn-optimotive {
    background-color: #FE5000;
    color: white;
    border: none;
}

.btn-optimotive:hover {
    background-color: #cc4000;
    color: white;
}

/* Table styles */
.table-styled {
    width: 100%;
    border-collapse: collapse;
}

.table-styled th,
.table-styled td {
    padding: 0.75rem;
    border: 1px solid #ddd;
}

/* Customer branding using CSS variables */
.customer-branded {
    background-color: var(--brand-primary-color, #ff6b35);
    color: var(--brand-text-color, #ffffff);
}

.customer-branded-secondary {
    background-color: var(--brand-secondary-color, #333333);
    color: var(--brand-text-color, #ffffff);
}

/* Icon styles */
.icon-small { 
    width: 16px; 
    height: 16px; 
}

.icon-medium { 
    width: 24px; 
    height: 24px; 
}

.icon-large { 
    width: 32px; 
    height: 32px; 
}

/* Badge styles */
.badge-custom {
    display: inline-block;
    padding: 0.25em 0.4em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}

/* Alert styles */
.alert-custom {
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
}

.alert-success-custom {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger-custom {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* Progress bar styles */
.progress-custom {
    display: flex;
    height: 1rem;
    overflow: hidden;
    font-size: 0.75rem;
    background-color: #e9ecef;
    border-radius: 0.25rem;
}

.progress-bar-custom {
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    background-color: #007bff;
    transition: width 0.6s ease;
}

/* Navigation styles */
.nav-custom {
    display: flex;
    flex-wrap: wrap;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
}

.nav-link-custom {
    display: block;
    padding: 0.5rem 1rem;
    color: #007bff;
    text-decoration: none;
    background-color: transparent;
}

.nav-link-custom:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Responsive styles */
@media (max-width: 768px) {
    .login-container {
        width: 95%;
        padding: 1.5rem;
    }
    
    .map-container {
        height: 300px;
    }
    
    .chart-container {
        height: 250px;
    }
}

@media (max-width: 576px) {
    .login-container {
        width: 100%;
        border-radius: 0;
    }
    
    .btn-styled {
        width: 100%;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-only {
        display: block !important;
    }
}

/* Pointer events utilities */
.no-pointer-events {
    pointer-events: none !important;
}

.pointer-events-auto {
    pointer-events: auto !important;
}

/* Login page specific styles */
.login-wrapper {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
}

.login-container .card {
    background-color: #000000;
    border: 2px solid var(--optimotive-orange, #FE5000);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(254, 80, 0, 0.3);
    overflow: hidden;
}

.login-container .card-body {
    padding: 1.5rem;
    background-color: #000000;
    border-radius: 10px;
}

.btn-login {
    width: 100%;
    background: var(--optimotive-orange, #FE5000);
    border: none;
    border-radius: 6px;
    padding: 0.75rem;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    color: white;
    font-weight: 600;
}

.btn-login:hover {
    background: var(--optimotive-orange, #FE5000);
    box-shadow: 0 0 20px rgba(254, 80, 0, 0.5);
    transform: translateY(-2px);
    color: white;
}

.brand-logo {
    max-width: 300px;
    height: auto;
    margin-bottom: 0.5rem;
}

.form-label {
    color: white;
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 1px;
    font-size: 1.1rem;
}

body.login-page, body.login-page html {
    overflow: hidden;
    height: 100vh;
}

.create-account-link {
    color: var(--optimotive-orange, #FE5000);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.create-account-link:hover {
    color: var(--optimotive-orange, #FE5000);
    text-shadow: 0 0 8px rgba(254, 80, 0, 0.5);
    text-decoration: none;
}

/* ============================== */
/* Fleet Page Mobile Responsive   */
/* ============================== */

/* Mobile responsive for fleet page title */
@media (max-width: 768px) {
    .fleet-header {
        font-size: 2rem !important;
        margin-bottom: 1rem !important;
    }
    
    /* Adjust button arrangement on mobile */
    .d-flex.justify-content-between.align-items-center {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.5rem !important;
    }
    
    /* Mobile optimization for header buttons */
    .d-flex .btn-outline-light {
        width: 100% !important;
        margin-top: 0.5rem !important;
    }
}

@media (max-width: 480px) {
    .fleet-header {
        font-size: 1.5rem !important;
    }
}