/* ===================================================================
   TAIBJEE & BHALLA ADVOCATES LLP - BUTTON COMPONENT SYSTEM
   World-class button styling with elegant hover animations
   ================================================================= */

/* ===================================================================
   CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ================================================================= */
:root {
  /* Brand Colors - Corporate Burgundy + Silver Palette */
  --tnb-primary: #4E102F;        /* Deep Burgundy */
  --tnb-primary-dark: #3a0c23;   /* Darker Burgundy */
  --tnb-primary-light: #873157;  /* Lighter Burgundy */
  --tnb-accent: #C0C0C0;         /* Silver */
  --tnb-accent-dark: #A8A8A8;    /* Darker Silver */
  --tnb-secondary: #8b7d73;      /* Warm Taupe */
  --tnb-secondary-dark: #6d5f55; /* Darker Taupe */
  
  /* Button Specific Colors */
  --btn-primary-bg: rgba(78, 16, 47, 0.9);
  --btn-primary-bg-hover: rgba(135, 49, 87, 0.95);
  --btn-primary-text: #ffffff;
  --btn-primary-shadow: rgba(78, 16, 47, 0.3);
  --btn-primary-shadow-hover: rgba(135, 49, 87, 0.4);
  
  --btn-secondary-bg: rgba(255, 255, 255, 0.3);
  --btn-secondary-bg-hover: rgba(158, 156, 157, 0.2);
  --btn-secondary-border: rgba(158, 156, 157, 0.4);
  --btn-secondary-text: #4E102F;
  --btn-secondary-text-hover: #4E102F;
  
  --btn-text-color: #4E102F;
  --btn-text-color-hover: var(--tnb-accent);
  
  /* Typography */
  --btn-font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
  --btn-font-weight: 600;
  --btn-font-weight-light: 500;
  --btn-letter-spacing: 0.5px;
  
  /* Spacing & Sizing */
  --btn-padding-sm: 0.75rem 1.5rem;
  --btn-padding-md: 1rem 2rem;
  --btn-padding-lg: 1.25rem 2.5rem;
  --btn-padding-xl: 1.5rem 3rem;
  
  --btn-border-radius: 0.75rem; /* rounded-xl */
  --btn-border-width: 2px;
  
  /* Animation & Transitions */
  --btn-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --btn-scale-hover: 1.05;
  --btn-scale-active: 0.97;
  --btn-translate-hover: -2px;
  
  /* Focus States */
  --btn-focus-ring: 0 0 0 3px rgba(78, 16, 47, 0.2);
  --btn-focus-outline: 2px solid #4E102F;
  --btn-focus-offset: 2px;
  
  /* Glassmorphism */
  --btn-backdrop-blur: blur(10px);
  --white-30: rgba(255, 255, 255, 0.3);
}

/* ===================================================================
   BASE BUTTON STYLES
   ================================================================= */
.btn {
  /* Reset & Base Styles */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  
  /* Typography */
  font-family: var(--btn-font-family);
  font-weight: var(--btn-font-weight);
  font-size: 0.875rem;
  line-height: 1.5;
  letter-spacing: var(--btn-letter-spacing);
  text-decoration: none;
  white-space: nowrap;
  text-transform: uppercase;
  
  /* Layout */
  padding: var(--btn-padding-md);
  border: 2px solid transparent;
  border-radius: var(--btn-border-radius);
  
  /* Interaction */
  cursor: pointer;
  user-select: none;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
  
  /* Glassmorphism */
  backdrop-filter: var(--btn-backdrop-blur);
  -webkit-backdrop-filter: var(--btn-backdrop-blur);
  
  /* Accessibility */
  outline: none;
  
  /* Remove default button styles */
  background: none;
  text-align: center;
  vertical-align: middle;
}

/* Focus States for Accessibility */
.btn:focus-visible {
  outline: var(--btn-focus-outline);
  outline-offset: var(--btn-focus-offset);
  box-shadow: var(--btn-focus-ring);
}

/* Disabled State */
.btn:disabled,
.btn.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
  transform: none !important;
  box-shadow: none !important;
}

/* Button loading states moved to performance-optimizations.css for consolidation */

/* ===================================================================
   PRIMARY BUTTON (CTA) - Burgundy with Glassmorphism
   ================================================================= */
.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border: 1px solid rgba(78, 16, 47, 1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 15px var(--btn-primary-shadow);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--btn-primary-bg-hover);
  border-color: rgba(135, 49, 87, 1);
  color: var(--btn-primary-text);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--btn-primary-shadow-hover);
}

.btn-primary:active {
  transform: translateY(-1px) scale(0.98);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.15);
}

/* Shimmer Effect for ALL Buttons */
.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--white-30), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

/* ===================================================================
   SECONDARY BUTTON (Light Glassmorphism)
   ================================================================= */
.btn-secondary {
  background: var(--btn-secondary-bg);
  color: var(--btn-secondary-text);
  border: 1px solid var(--btn-secondary-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(158, 156, 157, 0.2);
}

.btn-secondary:hover {
  background: var(--btn-secondary-bg-hover);
  color: var(--btn-secondary-text-hover);
  border-color: rgba(158, 156, 157, 0.6);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(158, 156, 157, 0.3);
}

.btn-secondary:active {
  transform: translateY(-1px) scale(0.98);
}

/* ===================================================================
   ACCENT BUTTON (Taupe/Champagne)
   ================================================================= */
.btn-accent {
  background: rgba(201, 177, 151, 0.2);
  color: #4E102F;
  border: 1px solid #C9B197;
  font-weight: 600;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn-accent:hover {
  background: #C9B197;
  color: white;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 177, 151, 0.4);
}

.btn-accent:active {
  transform: translateY(-1px) scale(0.98);
  box-shadow: 0 4px 15px rgba(201, 177, 151, 0.3);
}

/* ===================================================================
   OUTLINE PRIMARY BUTTON
   ================================================================= */
.btn-outline-primary {
  background: rgba(255, 255, 255, 0.1);
  color: #4E102F;
  border: 2px solid rgba(78, 16, 47, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn-outline-primary:hover {
  background: rgba(78, 16, 47, 0.9);
  color: white;
  border-color: rgba(78, 16, 47, 1);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(78, 16, 47, 0.3);
}

.btn-outline-primary:active {
  transform: translateY(-1px) scale(0.98);
}

/* ===================================================================
   TEXT BUTTON
   ================================================================= */
.btn-text {
  background: transparent;
  color: var(--btn-text-color);
  border: none;
  padding: 0.5rem 1rem;
  font-weight: var(--btn-font-weight-light);
  text-transform: none;
}

.btn-text:hover {
  color: var(--btn-text-color-hover);
  text-decoration: none;
  transform: translateY(-1px);
}

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

/* ===================================================================
   BUTTON SIZES
   ================================================================= */
.btn-sm {
  padding: var(--btn-padding-sm);
  font-size: 0.875rem;
  border-radius: calc(var(--btn-border-radius) - 0.125rem);
}

.btn-lg {
  padding: var(--btn-padding-lg);
  font-size: 1.125rem;
}

.btn-xl {
  padding: var(--btn-padding-xl);
  font-size: 1.25rem;
  border-radius: calc(var(--btn-border-radius) + 0.25rem);
}

/* ===================================================================
   BUTTON VARIANTS
   ================================================================= */

/* Full Width Button */
.btn-block {
  width: 100%;
  justify-content: center;
}

/* Icon Buttons */
.btn-icon-only {
  padding: 1rem;
  aspect-ratio: 1;
  border-radius: 50%;
}

.btn-icon-left .btn-icon {
  margin-right: 0.5rem;
}

.btn-icon-right .btn-icon {
  margin-left: 0.5rem;
}

/* Floating Action Button */
.btn-fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  box-shadow: 
    0 8px 25px rgba(78, 16, 47, 0.3),
    0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
}

.btn-fab:hover {
  transform: scale(1.1);
  box-shadow: 
    0 12px 35px rgba(78, 16, 47, 0.4),
    0 6px 16px rgba(0, 0, 0, 0.2);
}

/* ===================================================================
   RESPONSIVE DESIGN
   ================================================================= */

/* Tablet Styles */
@media (max-width: 768px) {
  .btn {
    padding: 0.875rem 1.75rem;
    font-size: 0.9rem;
  }
  
  .btn-sm {
    padding: 0.625rem 1.25rem;
    font-size: 0.8rem;
  }
  
  .btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
  }
  
  .btn-xl {
    padding: 1.125rem 2.25rem;
    font-size: 1.125rem;
  }
  
  .btn-fab {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 3rem;
    height: 3rem;
  }
}

/* Mobile Styles */
@media (max-width: 480px) {
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    border-radius: 0.625rem;
  }
  
  .btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
  }
  
  .btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 0.9rem;
  }
  
  .btn-xl {
    padding: 1rem 2rem;
    font-size: 1rem;
  }
  
  /* Stack buttons vertically on mobile */
  .btn-group-mobile-stack {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .btn-group-mobile-stack .btn {
    width: 100%;
  }
  
  .btn-fab {
    bottom: 1rem;
    right: 1rem;
    width: 2.75rem;
    height: 2.75rem;
  }
}

/* ===================================================================
   BUTTON GROUPS
   ================================================================= */
.btn-group {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.btn-group-center {
  justify-content: center;
}

.btn-group-start {
  justify-content: flex-start;
}

.btn-group-end {
  justify-content: flex-end;
}

.btn-group-between {
  justify-content: space-between;
}

/* Connected Button Group */
.btn-group-connected {
  gap: 0;
}

.btn-group-connected .btn {
  border-radius: 0;
  border-right-width: 1px;
}

.btn-group-connected .btn:first-child {
  border-top-left-radius: var(--btn-border-radius);
  border-bottom-left-radius: var(--btn-border-radius);
}

.btn-group-connected .btn:last-child {
  border-top-right-radius: var(--btn-border-radius);
  border-bottom-right-radius: var(--btn-border-radius);
  border-right-width: var(--btn-border-width);
}

/* ===================================================================
   HIGH CONTRAST MODE SUPPORT
   ================================================================= */
@media (prefers-contrast: high) {
  .btn {
    border-width: 3px;
  }
  
  .btn-primary {
    background: var(--btn-primary-bg);
    border-color: var(--btn-primary-text);
  }
  
  .btn-secondary {
    background: var(--btn-primary-text);
    color: var(--btn-primary-bg);
    border-color: var(--btn-primary-bg);
  }
}

/* ===================================================================
   REDUCED MOTION SUPPORT
   ================================================================= */
@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: color 0.2s ease, background-color 0.2s ease;
  }
  
  .btn:hover {
    transform: none;
  }
  
  .btn::before,
  .btn::after {
    transition: none;
    animation: none;
  }
  
  .btn.loading::after {
    animation: none;
    border: 2px solid currentColor;
    border-radius: 0;
  }
}

/* ===================================================================
   PRINT STYLES
   ================================================================= */
@media print {
  .btn {
    background: transparent !important;
    color: black !important;
    border: 2px solid black !important;
    box-shadow: none !important;
    text-decoration: underline;
  }
  
  .btn-fab {
    display: none;
  }
}

/* ===================================================================
   UTILITY CLASSES
   ================================================================= */

/* Button with gradient background */
.btn-gradient {
  background: linear-gradient(135deg, rgba(78, 16, 47, 0.9) 0%, rgba(135, 49, 87, 0.9) 100%);
  box-shadow: 
    0 4px 14px rgba(78, 16, 47, 0.3),
    0 2px 6px rgba(0, 0, 0, 0.1);
}

.btn-gradient:hover {
  background: linear-gradient(135deg, rgba(135, 49, 87, 0.95) 0%, rgba(78, 16, 47, 0.9) 100%);
  box-shadow: 
    0 8px 25px rgba(78, 16, 47, 0.4),
    0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Pulsing animation for important CTAs */
.btn-pulse {
  animation: btn-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes btn-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

/* Glass morphism effect */
.btn-glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

/* ===================================================================
   SUBMIT BUTTON - DIAGONAL SKEW EFFECT
   Elegant button with golden diagonal stripe animation on hover
   ================================================================= */

.btn-submit-skew {
  min-width: 6.5em;
  height: 2.3em;
  margin: 0.5em;
  background: #4E102F; /* Burgundy background */
  -webkit-transform: translate(0);
  transform: translate(0);
  overflow: hidden;
  cursor: pointer;
  border: none;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 1.1em;
  position: relative;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0 1.5em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.5s ease;
  z-index: 1;
}

.btn-submit-skew:hover {
  color: #4E102F; /* Burgundy text on hover */
}

.btn-submit-skew::after {
  content: "";
  background: #E6E6E6; /* Brighter silver background */
  position: absolute;
  z-index: -1;
  height: 100%;
  left: -35%;
  top: 0;
  transform: skew(50deg);
  transform-origin: top left;
  width: 0;
  transition: all 0.3s ease;
  opacity: 0.98; /* Ensure full opacity */
}

.btn-submit-skew:hover::after {
  transform: skewX(-45deg) scale(1, 1);
  width: 135%;
  background: #E6E6E6; /* Brighter silver background */
  opacity: 1;
}

/* Ensure text and icons are properly positioned above the overlay */
.btn-submit-skew i,
.btn-submit-skew span {
  position: relative;
  z-index: 1;
  transition: color 0.3s ease;
}

.btn-submit-skew span {
  position: relative;
  z-index: 1;
}
