/**
 * D.E.V.I Lightning Banner Component Styles
 * Scoped styles for the D.E.V.I promo banner with lightning background
 */

/* Enhanced D.E.V.I CTA Strip with Lightning Background */
.devi-cta-strip {
  position: relative;
  margin: clamp(24px, 3vw, 40px) 0 0;
  overflow: hidden;
}

.devi-cta-strip .strip-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(2, 2, 10, 0.85); /* Slightly more transparent for lightning visibility */
  border: 1px solid rgba(111, 99, 231, 0.3);
  border-radius: 16px;
  padding: 12px 16px;
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
}

/* Lightning Background Canvas */
#devi-lightning-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  border-radius: 16px;
  pointer-events: none;
  display: block;
}

/* Enhanced text contrast for AAA compliance */
.devi-cta-strip p {
  margin: 0;
  color: #ffffff; /* Pure white for maximum contrast */
  font-weight: 600;
  text-shadow: 
    0 1px 2px rgba(0, 0, 0, 0.8),
    0 0 4px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 3;
}

.devi-cta-strip strong {
  color: #ffffff;
  font-weight: 700;
  text-shadow: 
    0 1px 2px rgba(0, 0, 0, 0.9),
    0 0 6px rgba(111, 99, 231, 0.5);
}

/* Enhanced CTA Button */
.btn-devi-cta {
  position: relative;
  z-index: 3;
  display: inline-block;
  padding: 0.85rem 1.1rem;
  border-radius: 12px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  background: linear-gradient(180deg, var(--primary-color, #6F63E7), #5146c9);
  box-shadow: 
    0 4px 12px rgba(111, 99, 231, 0.4),
    0 1px 3px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.btn-devi-cta:hover {
  transform: translateY(-1px);
  box-shadow: 
    0 8px 20px rgba(111, 99, 231, 0.5),
    0 2px 6px rgba(0, 0, 0, 0.4);
  filter: saturate(1.05) brightness(1.05);
}

.btn-devi-cta--small {
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  font-size: 0.9rem;
}

/* Accessibility enhancements */
.devi-cta-strip:focus-within .strip-inner {
  background: rgba(2, 2, 10, 0.95);
  border-color: rgba(111, 99, 231, 0.6);
}

/* Hover state enhancement */
.devi-cta-strip:hover .strip-inner {
  background: rgba(2, 2, 10, 0.9);
  transform: translateY(-1px);
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .devi-cta-strip {
    margin: clamp(20px, 3vw, 28px) 0 0;
  }
  
  .devi-cta-strip .strip-inner {
    flex-direction: column;
    gap: 16px;
    padding: 20px 16px;
    text-align: center;
  }
  
  .btn-devi-cta {
    min-width: 220px;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
  }
  
  .devi-cta-strip p {
    font-size: 1rem;
    line-height: 1.4;
    margin: 0;
  }
  
  .devi-cta-strip strong {
    font-weight: 700;
  }
}

/* Small mobile adjustments */
@media (max-width: 480px) {
  .devi-cta-strip {
    margin: clamp(16px, 2.5vw, 24px) 0 0;
  }
  
  .devi-cta-strip .strip-inner {
    padding: 16px 12px;
    gap: 14px;
  }
  
  .btn-devi-cta {
    min-width: 200px;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
  }
  
  .devi-cta-strip p {
    font-size: 0.95rem;
    line-height: 1.3;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .devi-cta-strip .strip-inner {
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid #ffffff;
  }
  
  .devi-cta-strip p,
  .devi-cta-strip strong {
    color: #ffffff;
    text-shadow: none;
  }
  
  .btn-devi-cta {
    border: 2px solid #ffffff;
    background: var(--primary-color, #6F63E7);
  }
}

/* Reduced motion fallback */
@media (prefers-reduced-motion: reduce) {
  #devi-lightning-bg {
    background: 
      url('../images/fallbacks/devi-lightning-fallback.svg') center/cover,
      linear-gradient(
        135deg,
        rgba(111, 99, 231, 0.1) 0%,
        rgba(0, 0, 0, 0.8) 30%,
        rgba(31, 63, 207, 0.05) 70%,
        rgba(0, 0, 0, 0.9) 100%
      );
  }
  
  .devi-cta-strip:hover .strip-inner,
  .btn-devi-cta:hover {
    transform: none;
  }
  
  .devi-cta-strip .strip-inner,
  .btn-devi-cta {
    transition: none;
  }
}

/* Print styles */
@media print {
  .devi-cta-strip {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
  }
  
  .devi-cta-strip p,
  .devi-cta-strip strong {
    color: #000000;
    text-shadow: none;
  }
  
  #devi-lightning-bg {
    display: none;
  }
  
  .btn-devi-cta {
    background: #6F63E7;
    color: #ffffff;
    border: 1px solid #5749c4;
  }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
  .devi-cta-strip .strip-inner {
    background: rgba(2, 2, 10, 0.9);
    border-color: rgba(111, 99, 231, 0.4);
  }
}

/* Animation performance hints */
#devi-lightning-bg {
  will-change: auto;
  contain: layout style paint;
}

/* Ensure proper stacking context */
.devi-cta-strip {
  isolation: isolate;
}

/* Focus indicators for accessibility */
.btn-devi-cta:focus {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.btn-devi-cta:focus:not(:focus-visible) {
  outline: none;
}

.btn-devi-cta:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}
