/* Enhanced Sustainable Button Styling */

.btn {
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  text-transform: none;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Floating button styling */
.btn.btn-floating {
  border-radius: 50%;
  width: 56px;
  height: 56px;
  box-shadow: 0 4px 12px rgba(45, 125, 76, 0.3);
}

.btn.btn-floating:hover {
  box-shadow: 0 6px 20px rgba(45, 125, 76, 0.4);
  transform: translateY(-2px);
}

/* Shimmer effect for all buttons - nature inspired */
.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent);
  transition: left 0.6s ease;
  z-index: 1;
}

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

.btn:active {
  transform: translateY(1px);
}

/* Ensure button text appears above shimmer */
.btn * {
  position: relative;
  z-index: 2;
}

/* Default Button - Natural Light */
.btn-default {
  color: #2d4a22 !important;
  background: linear-gradient(135deg,
    #f8faf7 0%,
    #f1f5ee 50%,
    #e8f0e4 100%);
  background-size: 200% 200%;
  border: 1px solid rgba(106, 142, 35, 0.2);
  fill: #2d4a22;
  animation: subtleShimmer 4s ease-in-out infinite;
}

.btn-default:focus, 
.btn-default.focus, 
.btn-default:hover, 
.btn-default:active, 
.btn-default.active,
.open > .btn-default.dropdown-toggle {
  background: linear-gradient(135deg,
    #f1f5ee 0%,
    #e8f0e4 50%,
    #dae8d3 100%);
  background-position: right center;
  border-color: rgba(106, 142, 35, 0.4);
  color: #2d4a22 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(106, 142, 35, 0.2);
}

/* Primary Button - Forest Green */
.btn-primary {
  color: #ffffff !important;
  background: linear-gradient(135deg,
    #2d5a27 0%,
    #1e3a2e 25%,
    #0f3b1f 50%,
    #1e3a2e 75%,
    #2d5a27 100%);
  background-size: 300% 300%;
  border: none;
  fill: #ffffff;
  animation: naturalPulse 3s ease-in-out infinite;
  box-shadow: 0 4px 15px rgba(45, 90, 39, 0.3);
}

.btn-primary:focus, 
.btn-primary.focus, 
.btn-primary:hover, 
.btn-primary:active, 
.btn-primary.active,
.open > .btn-primary.dropdown-toggle {
  background-position: right center;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(45, 90, 39, 0.4);
}

/* Secondary Button - Earth Tone */
.btn-secondary {
  color: #ffffff !important;
  background: linear-gradient(135deg,
    #4a6741 0%,
    #3d5a3d 50%,
    #2c4a1e 100%);
  background-size: 200% 200%;
  border: none;
  fill: #ffffff;
  box-shadow: 0 4px 15px rgba(74, 103, 65, 0.3);
}

.btn-secondary:focus, 
.btn-secondary.focus, 
.btn-secondary:hover, 
.btn-secondary:active, 
.btn-secondary.active,
.open > .btn-secondary.dropdown-toggle {
  background-position: right center;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(74, 103, 65, 0.4);
}

/* Accent Button - Sustainable Gold */
.btn-accent {
  color: #2d4a22 !important;
  background: linear-gradient(135deg,
    #d4af37 0%,
    #b8941f 25%,
    #9a7c0a 50%,
    #b8941f 75%,
    #d4af37 100%);
  background-size: 300% 300%;
  border: none;
  fill: #2d4a22;
  animation: earthenShimmer 4s ease-in-out infinite;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-accent:focus, 
.btn-accent.focus, 
.btn-accent:hover, 
.btn-accent:active, 
.btn-accent.active,
.open > .btn-accent.dropdown-toggle {
  background-position: right center;
  color: #2d4a22 !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(212, 175, 55, 0.5);
}

/* Flat Button - Minimalist Natural */
.btn-flat {
  color: #2d5a27 !important;
  background: transparent;
  border: 2px solid transparent;
  fill: #2d5a27;
  position: relative;
  overflow: hidden;
}

.btn-flat::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg,
    rgba(45, 90, 39, 0.1) 0%,
    rgba(45, 90, 39, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 8px;
}

.btn-flat:hover::after {
  opacity: 1;
}

.btn-flat:focus, 
.btn-flat.focus, 
.btn-flat:hover, 
.btn-flat:active, 
.btn-flat.active {
  color: #1e3a2e !important;
  background: rgba(45, 90, 39, 0.05);
  border-color: rgba(45, 90, 39, 0.3);
  transform: translateY(-1px);
}

/* Link Button */
.btn-link {
  color: #2d5a27 !important;
  background: transparent;
  border: none;
  fill: #2d5a27;
  text-decoration: none;
  position: relative;
}

.btn-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #2d5a27, #d4af37);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.btn-link:hover::after {
  width: 100%;
}

.btn-link:focus, 
.btn-link.focus, 
.btn-link:hover, 
.btn-link:active, 
.btn-link.active {
  color: #1e3a2e !important;
  background: transparent;
  border: none;
  text-decoration: none;
}

/* Social Media Buttons with Natural Enhancement */
.btn--facebook {
  color: #fff !important;
  background: linear-gradient(135deg,
    #3b5998 0%,
    #2d4373 50%,
    #1e2e4f 100%);
  background-size: 200% 200%;
  border: none;
  fill: #fff;
  box-shadow: 0 4px 15px rgba(59, 89, 152, 0.3);
}

.btn--linkedin {
  color: #fff !important;
  background: linear-gradient(135deg,
    #0077b5 0%,
    #005582 50%,
    #003d5c 100%);
  background-size: 200% 200%;
  border: none;
  fill: #fff;
  box-shadow: 0 4px 15px rgba(0, 119, 181, 0.3);
}

.btn--twitter {
  color: #fff !important;
  background: linear-gradient(135deg,
    #1da1f2 0%,
    #0c85d0 50%,
    #0066a3 100%);
  background-size: 200% 200%;
  border: none;
  fill: #fff;
  box-shadow: 0 4px 15px rgba(29, 161, 242, 0.3);
}

/* Enhanced Google Button */
.btn.btn--google {
  background: linear-gradient(135deg,
    #ffffff 0%,
    #f8f9fa 50%,
    #e9ecef 100%);
  background-size: 200% 200%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.54) !important;
  background-image: url("../../components/02-atoms/button/icons/google_signin_buttons/google-sign-in.svg");
  background-repeat: no-repeat;
  background-position: 9px center;
  transition: all 0.3s ease;
}

.btn.btn--google:hover, 
.btn.btn--google:focus {
  background-position: right center;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(45, 125, 76, 0.2);
  outline: none;
}

/* Button Sizes with Enhanced Styling */
.btn-sm {
  border-radius: 8px;
  font-size: 0.875rem;
  padding: 6px 16px;
}

.btn-xs {
  border-radius: 5px;
  font-size: 0.75rem;
  padding: 4px 12px;
}

/* Special Button Variants */
.btn--with-bgicon {
  color: #fff !important;
  background: linear-gradient(135deg,
    #2d5a27 0%,
    #1e3a2e 50%,
    #0f3b1f 100%);
  background-size: 200% 200%;
}

/* Natural Animation Keyframes */
@keyframes naturalPulse {
  0%, 100% {
    background-position: 0% 50%;
    box-shadow: 0 4px 15px rgba(45, 90, 39, 0.3);
  }
  50% {
    background-position: 100% 50%;
    box-shadow: 0 4px 20px rgba(45, 90, 39, 0.4);
  }
}

@keyframes earthenShimmer {
  0%, 100% {
    background-position: 0% 50%;
  }
  25% {
    background-position: 25% 25%;
  }
  50% {
    background-position: 100% 50%;
  }
  75% {
    background-position: 75% 75%;
  }
}

@keyframes subtleShimmer {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Shariff Button Enhancement */
.shariff-button {
  border-radius: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.shariff-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Disabled Button States */
.btn:disabled,
.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  animation: none !important;
}

.btn:disabled:hover,
.btn[disabled]:hover {
  transform: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

/* Focus States for Accessibility */
.btn:focus {
  outline: 3px solid rgba(45, 90, 39, 0.3);
  outline-offset: 2px;
}

.btn-accent:focus {
  outline-color: rgba(212, 175, 55, 0.3);
}

/* Loading State */
.btn.loading {
  position: relative;
  color: transparent !important;
}

.btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 599px) {
  .social-auth-buttons > .card__block {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  
  .social-auth-buttons > .card__block .btn {
    order: 1;
    min-height: 48px;
  }
  
  .social-auth-buttons > .card__block .btn.btn--google {
    order: 0;
  }
  
  .btn {
    font-size: 1rem;
    padding: 12px 20px;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .btn {
    border: 2px solid currentColor;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .btn,
  .btn::before,
  .btn::after {
    animation: none !important;
    transition: none !important;
  }
}