/*
 * Reflective Glass Button Design System
 * Feature: 012-i-would-like
 * Updated: 2025-12-13
 * 
 * Modern glassmorphic button styling with reflective sweep animations.
 * Provides consistent, accessible, performant button components
 * across the entire Dexro AI website.
 */

.liquid-glass-btn {
  /* Reset and positioning */
  border: none;
  outline: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-family: inherit;
  position: relative;
  overflow: hidden;
  
  /* Reflective glass foundation */
  background: linear-gradient(
    135deg,
    rgba(103, 217, 241, 0.15) 0%,
    rgba(56, 189, 248, 0.1) 100%
  );
  border: 1px solid rgba(103, 217, 241, 0.3);
  box-shadow: 
    inset 1px 1px 2px rgba(255, 255, 255, 0.15),
    inset -1px -1px 2px rgba(0, 0, 0, 0.2),
    0 4px 15px rgba(0, 0, 0, 0.3);
  
  /* Typography */
  color: #67d9f1;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.3px;
  
  /* Sizing */
  padding: 16px 36px;
  border-radius: 16px;
  min-height: 44px;
  min-width: 44px;
  
  /* Transitions */
  transition: all 0.4s ease;
  will-change: transform, box-shadow;
  contain: layout style;
  
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.liquid-glass-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transition: left 0.6s ease;
  pointer-events: none;
  z-index: 1;
}

.liquid-glass-btn:hover:not(:disabled) {
  background: linear-gradient(
    135deg,
    rgba(103, 217, 241, 0.25) 0%,
    rgba(56, 189, 248, 0.18) 100%
  );
  border-color: rgba(103, 217, 241, 0.5);
  box-shadow: 
    inset 1px 1px 3px rgba(255, 255, 255, 0.2),
    inset -1px -1px 3px rgba(0, 0, 0, 0.25),
    0 8px 25px rgba(103, 217, 241, 0.4);
  transform: translateY(-2px);
}

.liquid-glass-btn:hover:not(:disabled)::before {
  left: 100%;
}

.liquid-glass-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
  box-shadow: 
    inset 1px 1px 2px rgba(255, 255, 255, 0.15),
    inset -1px -1px 2px rgba(0, 0, 0, 0.2),
    0 2px 10px rgba(0, 0, 0, 0.3);
  transition: all 0.1s ease;
}

.liquid-glass-btn:focus-visible {
  outline: 2px solid rgba(103, 217, 241, 1);
  outline-offset: 2px;
  box-shadow: 
    inset 1px 1px 2px rgba(255, 255, 255, 0.15),
    inset -1px -1px 2px rgba(0, 0, 0, 0.2),
    0 4px 15px rgba(0, 0, 0, 0.3),
    0 0 0 4px rgba(103, 217, 241, 0.2);
}

.liquid-glass-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: linear-gradient(
    135deg,
    rgba(103, 217, 241, 0.08) 0%,
    rgba(56, 189, 248, 0.05) 100%
  );
  border-color: rgba(103, 217, 241, 0.15);
}

.liquid-glass-btn:disabled::before {
  display: none;
}

/* Primary Variant */
.liquid-glass-btn-primary {
  background: linear-gradient(
    135deg,
    rgba(103, 217, 241, 0.2) 0%,
    rgba(56, 189, 248, 0.15) 100%
  );
  border-color: rgba(103, 217, 241, 0.4);
  box-shadow: 
    inset 1px 1px 2px rgba(255, 255, 255, 0.2),
    inset -1px -1px 2px rgba(0, 0, 0, 0.2),
    0 4px 15px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(103, 217, 241, 0.2);
}

.liquid-glass-btn-primary:hover:not(:disabled) {
  background: linear-gradient(
    135deg,
    rgba(103, 217, 241, 0.3) 0%,
    rgba(56, 189, 248, 0.22) 100%
  );
  border-color: rgba(103, 217, 241, 0.6);
  box-shadow: 
    inset 1px 1px 3px rgba(255, 255, 255, 0.25),
    inset -1px -1px 3px rgba(0, 0, 0, 0.25),
    0 8px 25px rgba(103, 217, 241, 0.5),
    0 0 30px rgba(103, 217, 241, 0.3);
}

/* Secondary Variant */
.liquid-glass-btn-secondary {
  background: linear-gradient(
    135deg,
    rgba(148, 163, 184, 0.15) 0%,
    rgba(100, 116, 139, 0.1) 100%
  );
  border-color: rgba(148, 163, 184, 0.3);
  color: rgba(226, 232, 240, 0.95);
}

.liquid-glass-btn-secondary:hover:not(:disabled) {
  background: linear-gradient(
    135deg,
    rgba(148, 163, 184, 0.25) 0%,
    rgba(100, 116, 139, 0.18) 100%
  );
  border-color: rgba(148, 163, 184, 0.5);
  box-shadow: 
    inset 1px 1px 3px rgba(255, 255, 255, 0.2),
    inset -1px -1px 3px rgba(0, 0, 0, 0.25),
    0 8px 25px rgba(148, 163, 184, 0.3);
}

/* Size Variants */
.liquid-glass-btn-small {
  padding: 8px 16px;
  font-size: 12px;
  border-radius: 12px;
  min-height: 36px;
}

.liquid-glass-btn-large {
  padding: 20px 48px;
  font-size: 18px;
  font-weight: 700;
  border-radius: 20px;
  min-height: 56px;
}

/* Text wrapping utility for buttons in constrained flex containers */
.liquid-glass-btn-wrap {
  white-space: normal;
  text-align: center;
  word-break: keep-all;
}

/* Mobile */
@media (max-width: 768px) {
  .liquid-glass-btn {
    padding: 14px 28px;
    font-size: 15px;
    min-width: 44px;
    min-height: 44px;
  }
  .liquid-glass-btn-large {
    padding: 16px 36px;
    font-size: 16px;
    min-height: 48px;
  }
  .liquid-glass-btn-small {
    padding: 10px 18px;
    font-size: 13px;
    min-height: 40px;
  }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
  .liquid-glass-btn {
    padding: 15px 32px;
    font-size: 15px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .liquid-glass-btn,
  .liquid-glass-btn::before {
    transition: none;
  }
  .liquid-glass-btn:hover:not(:disabled)::before {
    left: -100%;
  }
}

/* High contrast */
@media (prefers-contrast: high) {
  .liquid-glass-btn {
    border-width: 2px;
    border-color: rgba(103, 217, 241, 0.6);
  }
  .liquid-glass-btn:focus-visible {
    outline-width: 3px;
  }
}
