/* ==========================================
   COLDMATRIX GLOBAL FIXES - FINAL VERSION
   ========================================== */

/* ===== 1. PREMIUM SILVER COOKIE BANNER ===== */
#cookie-notice {
  position: fixed !important; bottom: 20px !important; left: 50% !important;
  transform: translateX(-50%) !important; width: 95% !important; max-width: 900px !important;
  background: #E8EBEF !important; border: 2px solid #D4AF37 !important; border-radius: 12px !important;
  padding: 18px 24px !important; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
  z-index: 99999 !important; display: flex !important; flex-direction: row !important;
  flex-wrap: wrap !important; justify-content: center !important; align-items: center !important;
  gap: 15px !important; font-family: 'Inter', sans-serif !important;
}
#cookie-notice p { color: #0A0F14 !important; font-size: 0.9rem !important; font-weight: 600 !important; line-height: 1.5 !important; margin: 0 !important; text-align: center !important; width: 100% !important; }
#cookie-notice a { color: #A07828 !important; text-decoration: underline !important; }
#cookieAcceptBtn, #cookieDeclineBtn { padding: 10px 30px !important; font-weight: 800 !important; border-radius: 8px !important; cursor: pointer !important; font-size: 0.85rem !important; min-width: 120px !important; display: inline-block !important; }
#cookieAcceptBtn { background: #D4AF37 !important; color: #0A0F14 !important; border: 2px solid #A07828 !important; }
#cookieDeclineBtn { background: #FFFFFF !important; color: #0A0F14 !important; border: 2px solid #0A0F14 !important; }

/* ===== 2. FORCE SLIM INSTALL BAR (Overrides Claude's Inline Code) ===== */
div.install-bar, div#cmInstallBar {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  justify-content: center !important;
  align-items: center !important;
  width: 95% !important;
  max-width: 500px !important; /* Perfect width on desktop */
  margin: 15px auto !important;
  padding: 6px 16px !important; /* Very slim height */
  border-radius: 50px !important; /* Pill shape */
  box-sizing: border-box !important;
  height: 46px !important; /* Locks the height */
  max-height: 46px !important;
  gap: 12px !important;
  background: linear-gradient(135deg, #E8C96A 0%, #D4AF37 50%, #B8860B 100%) !important;
  border: 2px solid #FFD700 !important;
  color: #0A0F14 !important;
  font-family: 'Oswald', sans-serif !important;
  font-weight: 800 !important;
  font-size: 0.8rem !important;
  text-transform: uppercase !important;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4) !important;
}

/* Force the inner Install button to be tiny and dark */
div.install-bar button, div#cmInstallBar button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 30px !important;
  min-height: 30px !important;
  max-height: 30px !important;
  padding: 0 14px !important;
  margin: 0 !important;
  border-radius: 6px !important;
  font-size: 0.75rem !important;
  background: #0A0F14 !important;
  color: #FFD700 !important;
  border: 1px solid #FFD700 !important;
  white-space: nowrap !important;
}

/* ===== 3. FORCE MARGINS ON EDUCATIONAL CONTENT ===== */
body .container {
  padding-left: 15px !important;
  padding-right: 15px !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

.edu-section, .coldmatrix-note, .local-bridge {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto 24px auto !important;
  box-sizing: border-box !important;
  background-color: #E8EBEF !important;
  color: #0A0F14 !important;
  padding: 24px !important;
  border: 2px solid #D4AF37 !important;
  border-radius: 12px !important;
  overflow-wrap: break-word !important;
}
.edu-section h2, .edu-section h3, .edu-section p, .edu-section li, .coldmatrix-note, .local-bridge p { 
  color: #0A0F14 !important; 
}
/* ===== ULTIMATE DESKTOP & BUTTON LAYOUT FIX ===== */

/* 1. FIX DESKTOP MARGINS (Centers the silver boxes on large screens) */
@media (min-width: 768px) {
  .edu-section, .coldmatrix-note, .local-bridge {
    max-width: 900px !important; /* Stops it from stretching edge-to-edge on desktop */
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* 2. HERO CALCULATE BUTTON (Gold, Full Width, Its own row) */
.btn-primary {
  width: 100% !important;
  display: block !important;
  margin-bottom: 12px !important;
  background: linear-gradient(135deg, #E8C96A 0%, #D4AF37 50%, #B8860B 100%) !important;
  color: #0A0F14 !important;
  border: 2px solid #FFD700 !important;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4) !important;
  font-family: 'Oswald', sans-serif !important;
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  padding: 16px !important;
  border-radius: 10px !important;
  letter-spacing: 1px !important;
}

/* 3. PREMIUM SILVER SECONDARY BUTTONS (Reset, Save, Load) */
/* Forces the container to place them side-by-side */
.btn-row-fixed, 
div:has(> .btn-reset), 
div:has(> button[onclick*="save"]) {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  width: 100% !important;
}

/* Styles for Reset, Save, Load */
.btn-reset, 
button[onclick*="save"], 
button[onclick*="load"],
.btn-row-fixed button:not(.btn-primary) {
  flex: 1 !important; /* Makes them share the row equally */
  min-width: 30% !important;
  background: linear-gradient(135deg, #f8fafc 0%, #c0c8d2 30%, #8a929c 55%, #d0d7df 80%, #a8b0bb 100%) !important;
  color: #0A0F14 !important;
  border: 2px solid #D4AF37 !important;
  font-family: 'Oswald', sans-serif !important;
  font-weight: 800 !important;
  font-size: 0.9rem !important;
  text-transform: uppercase !important;
  padding: 12px !important;
  border-radius: 8px !important;
  box-shadow: 0 3px 8px rgba(0,0,0,0.2) !important;
  display: inline-flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 6px !important;
}
/* ===== 5. FIX GALLERY IMAGES TOUCHING EDGES ===== */

/* Targets the grid that holds the images */
.gallery-grid, 
.deployment-gallery, 
[class*="gallery-grid"] {
  width: calc(100% - 30px) !important; /* Forces 15px gap on left and right */
  max-width: calc(100% - 30px) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

/* Ensures the cards themselves fit perfectly inside the grid */
.gallery-card {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin-bottom: 15px !important;
}

/* Fixes the 'STATE OF THE ART TOOL' badge from hanging off the screen */
.state-badge, 
[class*="state-of-the-art"] {
  right: 10px !important; /* Pulls it back inside the screen */
  max-width: 90% !important;
}