/* =============================================
   RETROTRADE POINT BRANDING SYSTEM - LOGO COMPONENT
   Premium Institutional Investment Platform
   ============================================= */

/**
 * Logo Component System
 * Single source of truth for all branding
 * Supports responsive scaling and dark/light modes
 */

/* =============================================
   PRIMARY LOGO STYLES
   ============================================= */

.logo-primary,
.logo,
.navbar-brand img,
.brand-logo {
  display: inline-block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 50px;
  object-fit: contain;
  object-position: left center;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.logo-primary:hover,
.logo:hover,
.navbar-brand img:hover,
.brand-logo:hover {
  transform: scale(1.02);
  opacity: 0.9;
}

/* =============================================
   LOGO VARIANTS
   ============================================= */

/* Default Logo - For Dark Backgrounds */
.logo-default {
  content: url('/assets/branding/logo.svg');
}

/* White Logo - For Dark Backgrounds */
.logo-white {
  content: url('/assets/branding/logo-white.svg');
}

/* Dark Logo - For Light Backgrounds */
.logo-dark {
  content: url('/assets/branding/logo-dark.svg');
}

/* Icon Only - Small Displays */
.logo-icon {
  content: url('/assets/branding/logo-icon.svg');
  max-height: 40px;
  max-width: 40px;
}

/* =============================================
   RESPONSIVE SCALING
   ============================================= */

/* Desktop Logo Sizes */
.logo-lg {
  max-height: 60px;
  max-width: 280px;
}

.logo-md {
  max-height: 50px;
  max-width: 240px;
}

.logo-sm {
  max-height: 40px;
  max-width: 180px;
}

.logo-xs {
  max-height: 32px;
  max-width: 150px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .logo-primary,
  .logo,
  .navbar-brand img,
  .brand-logo {
    max-height: 40px;
  }

  .logo-lg {
    max-height: 50px;
    max-width: 220px;
  }

  .logo-md {
    max-height: 40px;
    max-width: 180px;
  }

  .logo-sm {
    max-height: 32px;
    max-width: 140px;
  }
}

@media (max-width: 480px) {
  .logo-primary,
  .logo,
  .navbar-brand img,
  .brand-logo {
    max-height: 35px;
  }

  .logo-lg {
    max-height: 40px;
    max-width: 180px;
  }

  .logo-md {
    max-height: 35px;
    max-width: 150px;
  }

  .logo-sm {
    max-height: 30px;
    max-width: 120px;
  }
}

/* =============================================
   THEME-BASED LOGO DISPLAY
   ============================================= */

/* Dark Mode */
body.dark-mode .logo-primary {
  content: url('/assets/branding/logo.svg');
}

body.dark-mode .navbar-brand img {
  filter: brightness(1);
}

/* Light Mode */
body.light-mode .logo-primary {
  content: url('/assets/branding/logo-dark.svg');
}

/* Transparent Background (Use Gold Accent) */
.logo-accent {
  content: url('/assets/branding/logo.svg');
}

/* =============================================
   NAVBAR LOGO STYLES
   ============================================= */

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #FFFFFF;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.navbar-brand:hover {
  opacity: 0.8;
  text-decoration: none;
}

.navbar-brand img {
  display: inline-block;
  height: 40px;
  width: auto;
  object-fit: contain;
}

/* =============================================
   HEADER LOGO WRAPPER
   ============================================= */

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
}

.logo-wrapper:hover {
  text-decoration: none;
}

.logo-text {
  display: inline-block;
  font-size: 1.25rem;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
}

.logo-tagline {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: #B8C0CC;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 0.25rem;
}

/* =============================================
   FOOTER LOGO STYLES
   ============================================= */

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-logo img {
  height: 40px;
  width: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.footer-logo:hover img {
  transform: scale(1.05);
}

/* =============================================
   FAVICON STYLES
   ============================================= */

.favicon {
  width: 32px;
  height: 32px;
  display: inline-block;
}

/* =============================================
   LOADING & ANIMATION STATES
   ============================================= */

.logo-loading {
  animation: logoFade 0.6s ease-out forwards;
}

.logo-skeleton {
  background: linear-gradient(90deg, #101B2D 25%, #0E1A2B 50%, #101B2D 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes logoFade {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* =============================================
   ACCESSIBILITY
   ============================================= */

.logo[alt] {
  /* Ensures alt text for screen readers */
}

.logo-link:focus,
.navbar-brand:focus {
  outline: 2px solid #D4AF37;
  outline-offset: 2px;
  border-radius: 4px;
}

/* =============================================
   PRINT STYLES
   ============================================= */

@media print {
  .logo-primary,
  .logo,
  .navbar-brand img {
    max-width: 200px;
  }
}
