/*!
 * Modernized New Relic Traffic Light Dashboard
 * Enhanced version with modern UI design principles
 * Preserves all existing functionality while improving aesthetics
 */

/* Modern CSS Variables for consistent theming */
:root {
  --primary-color: #00a2d4;
  --primary-dark: #0C2A31;
  --background-dark: #1a1a1a;
  --background-light: #f8f9fa;
  --card-background: #ffffff;
  --text-primary: #2c3e50;
  --text-secondary: #6c757d;
  --text-light: #ffffff;
  --border-radius: 12px;
  --border-radius-small: 8px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --status-green: #10b981;
  --status-yellow: #f59e0b;
  --status-red: #ef4444;
  --gradient-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Enhanced Webfonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@200;300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700;800;900&display=swap');

/* Preserve existing font-face declarations for Simplon Norm */
@font-face {
  font-family: 'Simplon Norm';
  src: url('../fonts/simplonnorm-regular.eot');
  src: url('../fonts/simplonnorm-regular.eot?#iefix') format('embedded-opentype'),
     url('../fonts/simplonnorm-regular.woff2') format('woff2'),
     url('../fonts/simplonnorm-regular.woff') format('woff'),
     url('../fonts/simplonnorm-regular.ttf')  format('truetype'),
     url('../fonts/simplonnorm-regular.svg#svgFontName') format('svg');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Simplon Norm';
  src: url('../fonts/simplonnorm-bold.eot');
  src: url('../fonts/simplonnorm-bold.eot?#iefix') format('embedded-opentype'),
     url('../fonts/simplonnorm-bold.woff2') format('woff2'),
     url('../fonts/simplonnorm-bold.woff') format('woff'),
     url('../fonts/simplonnorm-bold.ttf')  format('truetype'),
     url('../fonts/simplonnorm-bold.svg#svgFontName') format('svg');
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: 'Simplon Norm';
  src: url('../fonts/simplonnorm-light.eot');
  src: url('../fonts/simplonnorm-light.eot?#iefix') format('embedded-opentype'),
     url('../fonts/simplonnorm-light.woff2') format('woff2'),
     url('../fonts/simplonnorm-light.woff') format('woff'),
     url('../fonts/simplonnorm-light.ttf')  format('truetype'),
     url('../fonts/simplonnorm-light.svg#svgFontName') format('svg');
  font-weight: 100;
  font-style: normal;
}

@font-face {
  font-family: 'Simplon Norm';
  src: url('../fonts/simplonnorm-medium.eot');
  src: url('../fonts/simplonnorm-medium.eot?#iefix') format('embedded-opentype'),
     url('../fonts/simplonnorm-medium.woff2') format('woff2'),
     url('../fonts/simplonnorm-medium.woff') format('woff'),
     url('../fonts/simplonnorm-medium.ttf')  format('truetype'),
     url('../fonts/simplonnorm-medium.svg#svgFontName') format('svg');
  font-weight: 600;
  font-style: normal;
}

/* Modern Base Styles */
* {
  box-sizing: border-box;
}

*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Simplon Norm', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--gradient-bg);
  margin: 0;
  padding: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Modern Header Design */
header.global-header {
  background: linear-gradient(135deg, rgba(12, 42, 49, 0.95) 0%, rgba(26, 71, 87, 0.95) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 30px;
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
  min-height: 60px;
}

.global-header--logo {
  height: 30px;
  width: auto;
  transition: var(--transition);
  justify-self: start;
  /* Ensure logo is visible - add slight background for contrast */
  filter: brightness(1.1) contrast(1.2);
}

.global-header--logo:hover {
  transform: scale(1.05);
  filter: brightness(1.2) contrast(1.3);
}

.header-title {
  text-align: center;
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.header-title h1 {
  font-family: 'Inter', 'Helvetica Neue', 'Arial', sans-serif;
  font-weight: 700;
  font-size: 2rem;
  color: #ffffff;
  margin: 0;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  background: none;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: initial;
  background-clip: initial;
  position: relative;
  animation: none;
  text-transform: uppercase;
  filter: none;
}

.header-title h1::before {
  content: '';
  /* No prefix symbol for clean design */
}

.header-title h1::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 3px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    #ffffff 20%, 
    #f8f9fa 50%, 
    #ffffff 80%, 
    transparent 100%);
  border-radius: 2px;
  animation: none;
  opacity: 0.8;
  box-shadow: none;
}

/* Static design - no animations needed */



.header-badge {
  justify-self: end;
  display: flex;
  align-items: center;
}

.alpha-badge {
  background: linear-gradient(135deg, #7f8c8d 0%, #95a5a6 50%, #bdc3c7 100%);
  color: #2c3e50;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  border: 1px solid #95a5a6;
  font-family: 'Simplon Norm', 'Inter', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.24);
  position: relative;
  overflow: hidden;
  animation: none;
  text-shadow: none;
}

.alpha-badge::before {
  content: '';
  /* No prefix for clean design */
}

.alpha-badge::after {
  content: '';
  /* No animation effects for professional look */
}





@keyframes badgePulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 
      0 4px 15px rgba(76, 175, 80, 0.3),
      0 2px 8px rgba(45, 80, 22, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }
  50% {
    transform: scale(1.03);
    box-shadow: 
      0 6px 20px rgba(76, 175, 80, 0.4),
      0 3px 12px rgba(45, 80, 22, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }
}



@keyframes titleFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes underlineExpand {
  from {
    opacity: 0;
    width: 0;
  }
  to {
    opacity: 1;
    width: 140px;
  }
}

.header-spacer {
  justify-self: end;
}

/* Modern Main Content */
main {
  flex: 1;
  padding: 1.5rem 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* Enhanced Grid Layout */
section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.2rem;
  width: 100%;
}

/* Modern Card Design */
.card--container {
  background: var(--card-background);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  transform: translateY(0);
  max-height: 130px;
  min-height: 120px;
  background-color: #f4f4f4;
}

.card--container:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.card--container:active {
  transform: translateY(-4px);
}

/* Modern Status Indicators */
.status {
  width: 100%;
  height: 10px;
  background: linear-gradient(90deg, transparent 0%, currentColor 50%, transparent 100%);
  position: relative;
  overflow: hidden;
}

.status::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.6) 50%, transparent 100%);
  animation: shimmer 4s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Enhanced Brand Section */
.brand {
  text-align: center;
  min-height: 80px;
  background-color: #f4f4f4;
  width: 100%;
  vertical-align: middle;
  align-content: center;
  align-items: center;
  display: flex;
  justify-content: center;
  border-radius: 0 0 4px 4px;
  position: relative;
}

.device {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  background: rgba(108, 117, 125, 0.1);
  color: var(--text-secondary);
  padding: 0.5rem;
  border-radius: var(--border-radius-small);
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.device i {
  font-size: 1rem;
}

.brand h2 {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  margin: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.brand img {
  width: 250px !important;
  height: 40px !important;
  vertical-align: middle;
  text-align: center;
  margin-top: 30px;
}


/* Modern Status Colors with Enhanced Animations */
.red {
  color: var(--status-red);
  animation: pulse-red 4s ease-in-out infinite;
}

@keyframes pulse-red {
  0%, 100% { 
    filter: brightness(1) saturate(1);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
  }
  50% { 
    filter: brightness(1.1) saturate(1.2);
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
  }
}

.yellow {
  color: var(--status-yellow);
  animation: pulse-yellow 4s ease-in-out infinite;
}

@keyframes pulse-yellow {
  0%, 100% { 
    filter: brightness(1) saturate(1);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
  }
  50% { 
    filter: brightness(1.1) saturate(1.2);
    box-shadow: 0 0 0 8px rgba(245, 158, 11, 0);
  }
}

.green {
  color: var(--status-green);
  animation: pulse-green 5s ease-in-out infinite;
}

@keyframes pulse-green {
  0%, 100% { 
    filter: brightness(1) saturate(1);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  }
  50% { 
    filter: brightness(1.1) saturate(1.2);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
}

/* Modern Footer */
footer.footer {
  background: linear-gradient(135deg, rgba(12, 42, 49, 0.95) 0%, rgba(26, 71, 87, 0.95) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem;
  text-align: center;
  margin-top: auto;
}

footer.footer img {
  max-height: 40px;
  opacity: 0.8;
  transition: var(--transition);
}

footer.footer img:hover {
  opacity: 1;
  transform: scale(1.05);
}

/* Enhanced Fade Animation */
.fade-in {
  opacity: 0;
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stagger animation for cards */
.card--container:nth-child(1) { animation-delay: 0.1s; }
.card--container:nth-child(2) { animation-delay: 0.2s; }
.card--container:nth-child(3) { animation-delay: 0.3s; }
.card--container:nth-child(4) { animation-delay: 0.4s; }
.card--container:nth-child(5) { animation-delay: 0.5s; }
.card--container:nth-child(6) { animation-delay: 0.6s; }
.card--container:nth-child(7) { animation-delay: 0.7s; }
.card--container:nth-child(8) { animation-delay: 0.8s; }
.card--container:nth-child(9) { animation-delay: 0.9s; }
.card--container:nth-child(10) { animation-delay: 1.0s; }

/* Link Styles */
a {
  text-decoration: none;
  color: inherit;
  display: block;
}

a:hover {
  text-decoration: none;
}

/* Loading State */
.loading {
  position: relative;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius);
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    height: auto;
    min-height: 100vh;
    overflow: auto;
  }

  header.global-header {
    padding: 1rem 1.5rem;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 1rem;
    text-align: center;
  }

  .global-header--logo {
    justify-self: center;
    height: 32px;
  }

  .header-title {
    display: none;
  }

  .header-badge {
    display: none;
  }

  main {
    padding: 3rem 1rem 2rem 1rem;
    margin-top: 1rem;
  }

  section {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .device {
    position: static;
    margin-bottom: 1rem;
    align-self: flex-end;
    background: rgba(108, 117, 125, 0.15);
  }

  .brand {
    padding: 1.5rem 1rem;
    min-height: 100px;
  }

  .brand img {
    max-height: 50px;
    max-width: 220px;
  }
}

@media (max-width: 480px) {
  header.global-header {
    padding: 1rem;
  }

  .global-header--logo {
    height: 28px;
  }

  .header-title h1 {
    font-size: 1.8rem;
    letter-spacing: 0.08em;
  }

  .header-title h1::before {
    left: -1.5rem;
    font-size: 0.6em;
  }

  .header-badge {
    top: 0.75rem;
    right: 0.75rem;
  }

  .alpha-badge {
    font-size: 0.65rem;
    padding: 0.35rem 0.7rem;
  }

  main {
    padding: 1.5rem 0.75rem;
  }

  section {
    gap: 1rem;
  }

  .brand {
    padding: 1rem;
    min-height: 80px;
  }

  .brand img {
    max-height: 45px;
    max-width: 200px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  section {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1025px) and (max-width: 1400px) {
  section {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1401px) {
  section {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* High-resolution display optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .brand img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --background-light: #1f2937;
    --card-background: #374151;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
  }

  body {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  }

  header.global-header,
  footer.footer {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.95) 0%, rgba(17, 24, 39, 0.95) 100%);
    border-color: rgba(255, 255, 255, 0.1);
  }

  .brand {
    background: linear-gradient(145deg, #374151 0%, #4b5563 100%);
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .status::before {
    display: none;
  }
}

/* Focus states for accessibility */
.card--container:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  body {
    background: white !important;
  }

  .card--container {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .status {
    height: 4px;
  }

  header.global-header,
  footer.footer {
    background: white !important;
    box-shadow: none;
  }
}
