/**
 * Premium Assets Configuration
 * Phase 4: Asset Configuration and Optimization
 * 
 * @package SENNA_Launcher
 * @since 4.0.0
 */

/* ===========================================
   FONT CONFIGURATION
   =========================================== */

/* Primary Font Import - Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700;900&family=Inter:wght@300;400;500;600;700&display=swap");

/* Font Stack Configuration */
:root {
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto",
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas,
    "Courier New", monospace;

  /* Font Weights */
  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-black: 900;
}

/* Font Loading Optimization */
@font-face {
  font-display: swap; /* Ensure text remains visible during font load */
}

/* ===========================================
   IMAGE PATHS AND CONFIGURATION
   =========================================== */

:root {
  /* Avatar Image */
  --emma-avatar: url("../images/senna.jpeg");

  /* Background Images */
  --premium-bg-texture: url("../images/premium-texture.png");
  --premium-bg-pattern: url("../images/subtle-pattern.svg");

  /* Logo and Icons */
  --leaf-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23718E68'%3E%3Cpath d='M17,8C8,10 5.9,16.17 3.82,21.34L5.71,22L6.66,19.7C7.14,19.87 7.64,20 8,20C19,20 22,3 22,3C21,5 14,5.25 9,6.25C4,7.25 2,11.5 2,13.5C2,15.5 3.75,17.25 3.75,17.25C7,8 17,8 17,8Z'/%3E%3C/svg%3E");

  /* Gradients for Texture */
  --premium-gradient-overlay: linear-gradient(
    135deg,
    rgba(251, 247, 240, 0.02) 0%,
    rgba(113, 142, 104, 0.03) 100%
  );

  --premium-noise-texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' /%3E%3C/filter%3E%3Crect width='100' height='100' fill='%23FBF7F0' filter='url(%23noise)' opacity='0.02'/%3E%3C/svg%3E");
}

/* ===========================================
   SENNA AVATAR STYLING
   =========================================== */

.emma-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--premium-sage);
  box-shadow: 0 0 0 1px rgba(113, 142, 104, 0.1),
    0 4px 12px rgba(13, 53, 62, 0.08), 0 8px 24px rgba(13, 53, 62, 0.04);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.emma-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 0 0 1px rgba(113, 142, 104, 0.2),
    0 8px 24px rgba(13, 53, 62, 0.12), 0 12px 32px rgba(13, 53, 62, 0.08);
}

/* Inline Avatar (smaller version) */
.senna-inline-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--premium-sage);
  object-fit: cover;
}

/* ===========================================
   LEAF ICON CONFIGURATION
   =========================================== */

.leaf-icon,
.opp-leaf-icon {
  width: 24px;
  height: 24px;
  background-image: var(--leaf-icon);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  display: inline-block;
  vertical-align: middle;
}

/* Large Leaf Icon */
.leaf-icon-large {
  width: 32px;
  height: 32px;
}

/* ===========================================
   SUBTLE TEXTURE OVERLAYS
   =========================================== */

/* Premium texture overlay for backgrounds */
.premium-texture-overlay {
  position: relative;
}

.premium-texture-overlay::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: var(--premium-noise-texture);
  background-repeat: repeat;
  pointer-events: none;
  opacity: 0.5;
  z-index: 1;
}

/* Subtle gradient overlay */
.premium-gradient-bg {
  background: var(--premium-gradient-overlay);
  position: relative;
}

/* ===========================================
   REMOVING/HIDING TACKY ELEMENTS
   =========================================== */

/* Hide overly bright or tacky elements */
.old-style-badge,
.flashy-banner,
.neon-text,
.blink-animation,
.rainbow-gradient {
  display: none !important;
}

/* Tone down overly bright colors */
.bright-element {
  filter: saturate(0.8) brightness(0.95);
}

/* ===========================================
   IMAGE OPTIMIZATION
   =========================================== */

/* Lazy loading for images */
img[loading="lazy"] {
  background: var(--premium-cream);
}

/* Image placeholder while loading */
img:not([src]),
img[src=""] {
  background: linear-gradient(
    135deg,
    var(--premium-cream) 0%,
    var(--premium-ivory) 100%
  );
  min-height: 100px;
}

/* ===========================================
   LOGO STYLING
   =========================================== */

.logo-img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--premium-espresso);
  letter-spacing: -0.5px;
}

/* ===========================================
   BACKGROUND PATTERNS
   =========================================== */

/* Subtle dot pattern */
.dot-pattern {
  background-image: radial-gradient(
    circle at 1px 1px,
    rgba(113, 142, 104, 0.05) 1px,
    transparent 1px
  );
  background-size: 20px 20px;
}

/* Subtle line pattern */
.line-pattern {
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(113, 142, 104, 0.02) 10px,
    rgba(113, 142, 104, 0.02) 11px
  );
}

/* ===========================================
   SECURE PAYMENT BADGES
   =========================================== */

.secure-payment-badge {
  width: auto;
  height: 32px;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.secure-payment-badge:hover {
  opacity: 1;
}

.payment-badges-container {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid rgba(113, 142, 104, 0.1);
  margin-top: 24px;
}

/* ===========================================
   LOADING STATES
   =========================================== */

/* Premium skeleton loader */
.skeleton-loader {
  background: linear-gradient(
    90deg,
    var(--premium-cream) 0%,
    var(--premium-ivory) 50%,
    var(--premium-cream) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 4px;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ===========================================
   PREMIUM VISUAL ENHANCEMENTS
   =========================================== */

/* Soft focus effect for backgrounds */
.soft-focus-bg {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(251, 247, 240, 0.95);
}

/* Premium glass effect */
.glass-effect {
  background: rgba(255, 254, 249, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(113, 142, 104, 0.1);
}

/* Subtle shadow for depth */
.premium-shadow {
  box-shadow: 0 1px 3px rgba(13, 53, 62, 0.04), 0 4px 8px rgba(13, 53, 62, 0.02),
    0 8px 16px rgba(13, 53, 62, 0.01);
}

/* Premium hover shadow */
.premium-shadow-hover {
  transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-shadow-hover:hover {
  box-shadow: 0 2px 6px rgba(13, 53, 62, 0.08),
    0 8px 16px rgba(13, 53, 62, 0.04), 0 16px 32px rgba(13, 53, 62, 0.02);
}

/* ===========================================
   RESPONSIVE IMAGES
   =========================================== */

@media (max-width: 768px) {
  .emma-avatar {
    width: 60px;
    height: 60px;
  }

  .logo-img {
    width: 32px;
    height: 32px;
  }

  .leaf-icon {
    width: 20px;
    height: 20px;
  }
}

/* ===========================================
   PRINT STYLES
   =========================================== */

@media print {
  /* Hide decorative elements in print */
  .premium-texture-overlay::before,
  .dot-pattern,
  .line-pattern {
    display: none !important;
  }

  /* Ensure images print properly */
  img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }
}

/* ===========================================
   ACCESSIBILITY IMPROVEMENTS
   =========================================== */

/* Focus styles for images */
img:focus {
  outline: 2px solid var(--premium-sage);
  outline-offset: 2px;
}

/* Alt text visibility for broken images */
img:not([src]):after,
img[src=""]:after {
  content: attr(alt);
  display: block;
  padding: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--premium-charcoal);
  background: var(--premium-cream);
  border: 1px dashed var(--premium-sage);
  border-radius: 4px;
}

/* ===========================================
   PERFORMANCE OPTIMIZATIONS
   =========================================== */

/* Use GPU acceleration for transforms */
.gpu-accelerated {
  transform: translateZ(0);
  will-change: transform;
}

/* Optimize animation performance */
.smooth-animation {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}
