/**
 * BankAuctionList - UX/Design Enhancements 2025
 * Modern design improvements with state-of-the-art UX
 *
 * @package BankAuctionList
 */

/* ==========================================================================
   1. STATUS BADGES - Color-Coded & Semantic
   ========================================================================== */

.auction-status-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--border-radius-full);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all var(--transition-base);
  border: 2px solid transparent;
}

/* Active/Live Auction */
.auction-status-badge.status-active,
.auction-status-badge.status-live {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(52, 211, 153, 0.15));
  color: var(--color-success);
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.auction-status-badge.status-active::before,
.auction-status-badge.status-live::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--color-success);
  border-radius: 50%;
  animation: pulse-status 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Upcoming Auction */
.auction-status-badge.status-upcoming {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(96, 165, 250, 0.15));
  color: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.auction-status-badge.status-upcoming::before {
  content: "⏰";
  font-size: 0.9em;
  margin-right: 2px;
}

/* Closed Auction */
.auction-status-badge.status-closed {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(248, 113, 113, 0.15));
  color: var(--color-error);
  border-color: var(--color-error);
  opacity: 0.7;
}

.auction-status-badge.status-closed::before {
  content: "✓";
  font-size: 0.9em;
  margin-right: 2px;
}

/* Status Badge Animations */
@keyframes pulse-status {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(0.8);
  }
}

/* ==========================================================================
   2. STICKY SEARCH BAR - Enhanced Mobile UX
   ========================================================================== */

.sticky-search-container {
  position: sticky;
  top: 0;
  z-index: 999;
  background: linear-gradient(180deg, var(--color-bg-primary) 0%, rgba(255, 255, 255, 0.98) 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: var(--space-md) 0;
  transition: all var(--transition-base);
  transform: translateY(0);
}

.sticky-search-container.hidden {
  transform: translateY(-100%);
}

.sticky-search-wrapper {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

.sticky-search-form {
  flex: 1;
  display: flex;
  gap: var(--space-sm);
}

.sticky-search-form .form-control {
  padding: var(--space-sm) var(--space-md);
  font-size: var(--font-size-sm);
  border-radius: var(--border-radius-md);
}

.sticky-search-toggle {
  display: none;
  flex-direction: column;
  gap: 3px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

.sticky-search-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

@media (max-width: 768px) {
  .sticky-search-toggle {
    display: flex;
  }

  .sticky-search-form {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg-primary);
    padding: var(--space-md) var(--space-lg);
    flex-direction: column;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-base);
  }

  .sticky-search-form.active {
    max-height: 300px;
  }

  .sticky-search-wrapper {
    position: relative;
  }
}

/* ==========================================================================
   3. FILTER PILLS & ACTIVE FILTERS DISPLAY
   ========================================================================== */

.active-filters-container {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(96, 165, 250, 0.05));
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--border-radius-lg);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-lg);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}

.active-filters-label {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-right: var(--space-sm);
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: var(--color-bg-primary);
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--border-radius-full);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  transition: all var(--transition-base);
  cursor: pointer;
}

.filter-pill:hover {
  background: var(--color-primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.filter-pill-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: transparent;
  border: none;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  color: inherit;
  transition: all var(--transition-fast);
}

.filter-pill:hover .filter-pill-remove {
  transform: scale(1.2);
}

.clear-all-filters {
  margin-left: auto;
  padding: var(--space-sm) var(--space-md);
  background: transparent;
  border: 1px solid var(--color-error);
  color: var(--color-error);
  border-radius: var(--border-radius-md);
  cursor: pointer;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  transition: all var(--transition-base);
}

.clear-all-filters:hover {
  background: var(--color-error);
  color: white;
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .active-filters-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .active-filters-label {
    width: 100%;
  }

  .clear-all-filters {
    margin-left: 0;
    width: 100%;
  }
}

/* ==========================================================================
   4. BANK LOGO DIFFERENTIATION & CARDS
   ========================================================================== */

.bank-logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: var(--border-radius-lg);
  background: linear-gradient(135deg, var(--bank-gradient-1, #667eea), var(--bank-gradient-2, #764ba2));
  margin-bottom: var(--space-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all var(--transition-base);
  font-weight: var(--font-weight-bold);
  color: white;
  font-size: var(--font-size-lg);
  text-align: center;
  padding: var(--space-md);
}

.bank-logo-container:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Bank-specific gradient colors */
.bank-logo.sbi { --bank-gradient-1: #1e40af; --bank-gradient-2: #3b82f6; }
.bank-logo.hdfc { --bank-gradient-1: #059669; --bank-gradient-2: #10b981; }
.bank-logo.icici { --bank-gradient-1: #dc2626; --bank-gradient-2: #ef4444; }
.bank-logo.axis { --bank-gradient-1: #5b21b6; --bank-gradient-2: #9333ea; }
.bank-logo.kotak { --bank-gradient-1: #f59e0b; --bank-gradient-2: #fbbf24; }
.bank-logo.bob { --bank-gradient-1: #0891b2; --bank-gradient-2: #06b6d4; }

.bank-name {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  margin-top: var(--space-sm);
}

/* ==========================================================================
   5. MICRO-INTERACTIONS & ENHANCED FEEDBACK
   ========================================================================== */

/* Wishlist Heart with Enhanced Feedback */
.wishlist-button {
  position: relative;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.5em;
  transition: all var(--transition-fast);
  padding: var(--space-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wishlist-button:hover {
  transform: scale(1.2);
  filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.4));
}

.wishlist-button.active {
  animation: heart-beat 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes heart-beat {
  0% { transform: scale(1); }
  14% { transform: scale(1.3); }
  28% { transform: scale(1); }
  42% { transform: scale(1.3); }
  70% { transform: scale(1); }
}

/* Loading States */
.button-loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.button-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
  to { transform: rotate(360deg); }
}

/* Form Validation Feedback */
.form-control.error {
  border-color: var(--color-error);
  background-color: rgba(239, 68, 68, 0.05);
}

.form-control.error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
  border-color: var(--color-error);
}

.error-message {
  display: block;
  color: var(--color-error);
  font-size: var(--font-size-sm);
  margin-top: var(--space-xs);
  animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Success State */
.form-control.success {
  border-color: var(--color-success);
  background-color: rgba(16, 185, 129, 0.05);
}

.success-message {
  display: block;
  color: var(--color-success);
  font-size: var(--font-size-sm);
  margin-top: var(--space-xs);
  animation: slideDown 0.2s ease-out;
}

/* ==========================================================================
   6. ACCESSIBILITY IMPROVEMENTS
   ========================================================================== */

/* Better Focus States */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Increased Text Sizes for Better Readability */
.auction-card-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-normal);
  margin-bottom: var(--space-sm);
}

.auction-card-meta {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
  color: var(--color-text-secondary);
}

.property-info-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-base);
  margin-bottom: var(--space-sm);
}

/* Semantic Color Improvements */
.icon-with-text {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

/* Skip to Content Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary);
  color: white;
  padding: var(--space-sm) var(--space-md);
  text-decoration: none;
  border-radius: var(--border-radius-md);
  z-index: 9999;
}

.skip-link:focus {
  top: 0;
}

/* ==========================================================================
   7. HERO SECTION OPTIMIZATIONS
   ========================================================================== */

.hero-section-enhanced {
  position: relative;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 600px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-section-enhanced::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-3xl) var(--space-lg);
  text-align: center;
  color: white;
}

.hero-title-enhanced {
  font-size: clamp(2em, 6vw, 4em);
  font-weight: var(--font-weight-extrabold);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-lg);
  animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle-enhanced {
  font-size: clamp(1em, 3vw, 1.5em);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-2xl);
  opacity: 0.95;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInUp 0.8s ease-out 0.1s backwards;
}

.hero-trust-badges {
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
  margin-top: var(--space-2xl);
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: rgba(255, 255, 255, 0.15);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--border-radius-full);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   8. SECONDARY COLORS & REDUCED GRADIENT FATIGUE
   ========================================================================== */

.section-alt {
  background: linear-gradient(180deg, var(--color-bg-primary) 0%, var(--color-bg-secondary) 100%);
}

.section-accent {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(52, 211, 153, 0.08));
  border-left: 4px solid var(--color-secondary);
}

.divider-subtle {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--border-color) 50%, transparent 100%);
  margin: var(--space-2xl) 0;
}

/* Accent underline for headers */
.section-title {
  position: relative;
  padding-bottom: var(--space-md);
  margin-bottom: var(--space-2xl);
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  border-radius: 2px;
}

.section-title.centered::after {
  left: 50%;
  transform: translateX(-50%);
}

/* ==========================================================================
   9. SKELETON LOADERS (Already in main CSS, enhanced here)
   ========================================================================== */

.skeleton-card {
  border-radius: var(--border-radius-lg);
  overflow: hidden;
}

.skeleton-card.auction-card {
  height: 400px;
}

.skeleton-text {
  height: 16px;
  margin-bottom: var(--space-md);
  border-radius: var(--border-radius-md);
}

.skeleton-text.short {
  width: 60%;
}

.skeleton-text.title {
  height: 24px;
  width: 80%;
  margin-bottom: var(--space-lg);
}

/* ==========================================================================
   10. BREADCRUMB NAVIGATION ENHANCEMENT
   ========================================================================== */

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg) 0;
  font-size: var(--font-size-sm);
  flex-wrap: wrap;
}

.breadcrumbs a {
  color: var(--color-primary);
  text-decoration: none;
  transition: all var(--transition-base);
}

.breadcrumbs a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

.breadcrumbs span {
  color: var(--color-text-tertiary);
  margin: 0 var(--space-xs);
}

.breadcrumbs .current {
  color: var(--color-text-primary);
  font-weight: var(--font-weight-medium);
}

/* ==========================================================================
   11. RESPONSIVE ADJUSTMENTS
   ========================================================================== */

@media (max-width: 768px) {
  /* Hero section adjustments */
  .hero-section-enhanced {
    min-height: 500px;
  }

  .hero-content {
    padding: var(--space-2xl) var(--space-lg);
  }

  /* Active filters - stack on mobile */
  .active-filters-container {
    flex-direction: column;
  }

  /* Bank logo - smaller on mobile */
  .bank-logo-container {
    width: 60px;
    height: 60px;
    font-size: var(--font-size-base);
  }

  /* Hero trust badges - single column */
  .hero-trust-badges {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .trust-badge {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .filter-pill {
    font-size: var(--font-size-xs);
    padding: 4px 12px;
  }

  .auction-card-title {
    font-size: var(--font-size-base);
  }
}

/* ==========================================================================
   12. PRINT STYLES
   ========================================================================== */

@media print {
  .sticky-search-container,
  .active-filters-container,
  .wishlist-button,
  .skip-link {
    display: none !important;
  }

  .auction-status-badge {
    border: 1px solid black;
    color: black;
    background: white !important;
  }
}
