/* MudBlazor Color Palette Overrides */
:root {
    --mud-palette-dark-darken: #5c79bb;
    --mud-palette-warning-lighten: #5c79bb;
}

/* Explicit MudBlazor Button Color Overrides */
.mud-button-filled-warning {
    background-color: rgba(255, 201, 0, 1) !important;
    color: rgba(0, 58, 120, 1) !important;
    border-color: rgba(255, 201, 0, 1) !important;
}

.mud-button-filled-warning:hover {
    background-color: #5c79bb !important;
    color: #ffffff !important;
}

.mud-button-filled-warning:focus {
    background-color: rgba(255, 201, 0, 1) !important;
    color: rgba(0, 58, 120, 1) !important;
}

.mud-button-filled-dark {
    background-color: #003a78 !important;
    color: #ffffff !important;
    border-color: #003a78 !important;
}

.mud-button-filled-dark:hover {
    background-color: #5c79bb !important;
    color: #ffffff !important;
}

.mud-button-filled-dark:focus {
    background-color: #003a78 !important;
    color: #ffffff !important;
}

/* General defaults / fix gutters */
html, body { height: 100%; margin: 0; }

/* Remove container side padding globally so images can bleed */
.mud-container { padding-left: 0 !important; padding-right: 0 !important; }

/* --- existing template styles  --- */
h1:focus { outline: none; }
.valid.modified:not([type=checkbox]) { outline: 1px solid #26b050; }
.invalid { outline: 1px solid #e50000; }
.validation-message { color: #e50000; }

/* Optional checkbox tweak */
.darker-border-checkbox.form-check-input { border-color: #929292; }

/* --- Login page layout --- */
.login-hero {
    background-image: url('./images/DANXduo-trailersathub-portalimage.png');
    background-size: cover;
    background-position: left center;
    background-repeat: no-repeat;
    height: 100%;
    min-height: 100vh;
    width: 100%;
    position: relative;
}

/* Ensure hero image loads properly on different screen sizes */
@media (max-width: 1200px) {
    .login-hero {
        background-position: left center;
    }
}

@media (max-width: 768px) {
    .login-hero {
        background-position: left center;
        background-size: cover;
    }
}

.login-card { 
  max-width: 520px; 
  width: 100%;
  transition: all 0.3s ease;
}

/* Panel wrapper - properly centers content */
.panel-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

/* pill search row */
.track-surface { 
  border-radius: 9999px; 
  padding: .25rem; 
}

/* Responsive logo - flexible sizing without fixed height */
.responsive-logo {
  max-width: 200px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Ensure SVG logo renders properly */
.responsive-logo[src$=".svg"] {
  max-width: 350px;
  width: 100%;
  height: auto;
}

/* --- Responsive tweaks --- */
@media (max-width: 959px) {
  .panel-wrap {
    padding: 20px;
  }
  
  .login-card {
    max-width: 480px;
  }
}

@media (max-width: 600px) {
  .panel-wrap {
    padding: 16px;
  }
  
  .login-card {
    max-width: 100%;
    padding: 16px !important;
  }
  
  .responsive-logo, .responsive-logo[src$=".svg"] {
    max-width: 150px;
  }
}

@media (max-width: 480px) {
  .responsive-logo, .responsive-logo[src$=".svg"] {
    max-width: 120px;
  }
}

/* Development environment indicator */
.dev-environment-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #ff6a00;
    color: white;
    text-align: center;
    padding: 5px 0;
    font-weight: bold;
    z-index: 9999;
    opacity: 0.9;
}

/* Additional responsiveness improvements */
@media (max-width: 480px) {
    .mud-button {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    .mud-input {
        font-size: 0.9rem;
    }
    
    .mud-text-subtitle1 {
        font-size: 0.9rem;
    }
    
    .mud-text-h6 {
        font-size: 1.1rem;
    }
}

/* Make sure the login form content adjusts when dev banner is present */
.dev-environment-banner + .mud-paper {
    margin-top: 30px;
}
