/* PDF Invoice Reader - Main Stylesheet
   Professional Canadian Financial Tool
   Based on STYLE-GUIDE.md */

/* Import all modular CSS files */
@import url('css/variables.css');
@import url('css/base.css');
@import url('css/components.css');
@import url('css/pages.css');

/* Additional global styles if needed */

/* At a Glance Card Styles */
.at-a-glance {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  padding: 32px;
  margin: 48px auto;
  max-width: 800px;
  box-shadow: 0 20px 40px rgba(102, 126, 234, 0.25);
  position: relative;
  overflow: hidden;
}

.at-a-glance::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { transform: translateX(0) translateY(0); }
  50% { transform: translateX(-30px) translateY(-30px); }
}

.at-a-glance h2 {
  color: white;
  font-size: 28px;
  margin: 0 0 24px 0;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

.at-a-glance ul {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
  z-index: 1;
}

.at-a-glance li {
  color: white;
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 12px;
  padding-left: 28px;
  position: relative;
}

.at-a-glance li::before {
  content: '✨';
  position: absolute;
  left: 0;
  top: 0;
}

.at-a-glance li strong {
  font-weight: 600;
  color: #ffd700;
}

/* Ensure nav mount point doesn't affect layout */
#nav-mount {
  position: fixed;
  top: 40px;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 9997;
}

/* When translate is active, adjust nav-mount position */
body.translated #nav-mount {
  top: 80px !important;
}

/* ========================================
   TRANSLATION STYLES
   ======================================== */

/* French Translation Button Styling */
.nav-french {
  margin-left: 10px;
}

.french-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #6B4C8A;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.french-btn:hover {
  background: #5A3D78;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(107, 76, 138, 0.3);
}

.french-btn:active {
  transform: translateY(0);
}

.french-icon {
  font-size: 18px;
  filter: brightness(0) invert(1);
  display: inline-block;
}

/* Hide Google Translate Widget */
#google_translate_element {
  display: none !important;
}

/* Alternative: Make it invisible but present in DOM */
#google_translate_element .goog-te-gadget {
  position: absolute;
  visibility: hidden;
  pointer-events: none;
}

/* Top banner spacer to accommodate Google Translate bar */
.top-banner-spacer {
  width: 100%;
  height: 40px;
  background: linear-gradient(135deg, #6B4C8A 0%, #C77DA2 100%);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9998;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Adjust body padding to account for the banner */
body {
  padding-top: 40px !important;
}

/* Position navigation below the purple banner - ALWAYS STICKY */
#mainNav, nav[role="navigation"], #nav-mount > nav {
  position: fixed !important;
  top: 40px !important;
  width: 100%;
  z-index: 9997;
  background: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  opacity: 1 !important;
  transform: translateY(0) !important;
  visibility: visible !important;
  display: block !important;
}

/* Override any hiding behavior */
#mainNav[data-hidden="true"],
nav[data-hidden="true"] {
  opacity: 1 !important;
  transform: translateY(0) !important;
  visibility: visible !important;
  display: block !important;
}

/* When Google Translate is active, push nav down more */
body.translated #mainNav,
body.translated nav[role="navigation"],
body.translated #nav-mount > nav {
  top: 80px !important; /* 40px banner + 40px Google Translate bar */
}

/* Handle Google Translate banner - position it between purple bar and nav */
.goog-te-banner-frame {
  position: fixed !important;
  top: 40px !important; /* Below purple banner */
  left: 0 !important;
  width: 100% !important;
  z-index: 9997 !important; /* Below purple banner but above nav */
}

/* Adjust main content padding */
.main-content, main {
  padding-top: 120px !important; /* Account for banner + nav */
}

/* When translate is active, add more padding */
body.translated .main-content,
body.translated main {
  padding-top: 160px !important; /* Account for banner + translate bar + nav */
}

/* Remove Google Translate widget styling that affects layout */
.goog-te-gadget-icon {
  display: none !important;
}

.goog-te-gadget-simple {
  background-color: transparent !important;
  border: none !important;
}

/* Ensure body doesn't have unwanted top margin */
body {
  top: 0px !important;
}

/* Loading state for language buttons */
.french-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Body class when translation is active */
body.translated {
  padding-top: var(--translate-bar-height, 40px);
}

/* CSS Variable for dynamic translate bar height */
:root {
  --translate-bar-height: 40px;
}

/* Responsive Design for Translation */
@media (max-width: 768px) {
  .nav-french {
    position: absolute;
    top: 10px;
    right: 10px;
    margin: 0;
  }
  
  .french-btn {
    padding: 6px 12px;
    font-size: 13px;
  }
  
  .french-icon {
    font-size: 16px;
  }
}