/**
 * Auction Detail Component Styles
 * Plugin: Nerd.Auction
 *
 * Standalone CSS for the AuctionItemDetail component.
 * This file contains all styles needed for the auction detail page.
 */

/* ==========================================================================
   CSS Variables
   ========================================================================== */
.auction-details-page {
  --ad-accent: var(--color-accent, #c9a962);
  --ad-success: #28a745;
  --ad-danger: #dc3545;
  --ad-warning: #f59e0b;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.auction-details-hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  padding: 2rem 0;
  color: white;
}

.auction-details-hero__content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.auction-details-hero__breadcrumb .breadcrumb {
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.auction-details-hero__breadcrumb a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
}

.auction-details-hero__breadcrumb a:hover {
  color: white;
}

.auction-details-hero__breadcrumb .breadcrumb-item.active,
.auction-details-hero__breadcrumb .breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255,255,255,0.5);
}

.auction-details-hero__title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: white;
}

.auction-details-hero__meta {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.8);
}

.auction-details-hero__meta i {
  margin-right: 0.5rem;
  color: var(--ad-accent);
}

.auction-details-hero__stock {
  background: rgba(255,255,255,0.15);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-weight: 600;
}

.auction-details-hero__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.auction-details-hero__actions .btn {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

.auction-details-hero__actions .btn:hover,
.auction-details-hero__actions .btn.active {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.4);
}

/* ==========================================================================
   Main Content Area
   ========================================================================== */
.auction-details__content {
  padding: 2rem 0;
  background: #f8f9fa;
  min-height: 60vh;
}

/* ==========================================================================
   Gallery
   ========================================================================== */
.auction-gallery {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.auction-gallery__main {
  overflow: hidden;
  background: white;
  position: relative;
}

.auction-gallery__image {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.2s;
}

.auction-gallery__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #6c757d;
}

.auction-gallery__thumbs {
  display: flex;
  gap: 8px;
  padding: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
}

.auction-gallery__thumb {
  flex-shrink: 0;
  width: 70px;
  height: 50px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  background: none;
  padding: 0;
  transition: all 0.2s;
}

.auction-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auction-gallery__thumb:hover {
  border-color: var(--ad-accent);
}

.auction-gallery__thumb.active {
  border-color: var(--color-primary, #c9a962);
  box-shadow: 0 0 0 2px rgba(201, 169, 98, 0.3);
}

.auction-gallery__nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  border-top: 1px solid #eee;
}

.auction-gallery__nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #ddd;
  background: white;
  cursor: pointer;
  transition: all 0.2s;
}

.auction-gallery__nav-btn:hover:not(:disabled) {
  background: var(--color-primary, #c9a962);
  border-color: var(--color-primary, #c9a962);
  color: white;
}

.auction-gallery__nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.auction-gallery__counter {
  font-weight: 600;
  color: var(--color-text-secondary, #6c757d);
}

/* ==========================================================================
   Section Card
   ========================================================================== */
.section-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
}

.section-card__header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(201, 169, 98, 0.1);
  color: var(--ad-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.section-card__title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.section-card__body {
  padding: 1.5rem;
}

/* ==========================================================================
   Specs Grid
   ========================================================================== */
.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.spec-item {
  display: flex;
  flex-direction: column;
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.spec-item__label {
  font-size: 0.75rem;
  color: var(--color-text-muted, #adb5bd);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.spec-item__value {
  font-weight: 600;
  color: var(--color-text, #212529);
}

/* ==========================================================================
   Equipment Grid
   ========================================================================== */
.equipment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}

.equipment-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
}

.equipment-item i {
  color: var(--ad-success);
  font-size: 0.85rem;
}

/* ==========================================================================
   Condition/Damage Section
   ========================================================================== */
.condition-warning {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem;
  background: rgba(245, 158, 11, 0.1);
  border-radius: 8px;
  border-left: 4px solid var(--ad-warning);
  margin-bottom: 1.5rem;
}

.condition-warning i {
  color: var(--ad-warning);
  font-size: 1.25rem;
  margin-top: 0.15rem;
}

.condition-clean {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 8px;
  border-left: 4px solid #10B981;
}

.condition-clean i {
  color: #10B981;
  font-size: 1.5rem;
  margin-top: 0.15rem;
}

.condition-clean p {
  margin-top: 0.25rem;
  color: var(--color-text-secondary, #6c757d);
  font-size: 0.9rem;
}

.damage-section {
  margin-bottom: 1.5rem;
}

.damage-section:last-child {
  margin-bottom: 0;
}

.damage-section__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: var(--color-text, #212529);
}

.damage-section__title i {
  color: var(--ad-danger);
}

.damage-list {
  margin: 0;
  padding-left: 1.25rem;
}

.damage-list li {
  margin-bottom: 0.5rem;
  color: var(--color-text-secondary, #6c757d);
}

/* Damage Images Carousel */
.damage-carousel {
  border-radius: 8px;
  overflow: hidden;
  background: #1a1a2e;
}

.damage-carousel .carousel-inner {
  border-radius: 8px;
}

.damage-carousel .carousel-item img {
  max-height: 400px;
  object-fit: contain;
  background: #1a1a2e;
}

.damage-carousel .carousel-control-prev,
.damage-carousel .carousel-control-next {
  width: 40px;
  opacity: 0.8;
}

.damage-carousel .carousel-control-prev:hover,
.damage-carousel .carousel-control-next:hover {
  opacity: 1;
}

.damage-carousel .carousel-indicators {
  margin-bottom: 0.5rem;
}

.damage-carousel .carousel-indicators button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  opacity: 0.5;
}

.damage-carousel .carousel-indicators button.active {
  opacity: 1;
  background-color: var(--ad-warning);
}

/* Damage Gallery (alternative grid view) */
.damage-gallery {
  margin-top: 1rem;
}

.damage-gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
}

.damage-gallery__item {
  display: block;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.damage-gallery__item:hover {
  border-color: var(--ad-warning, #f59e0b);
  transform: scale(1.02);
}

.damage-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Accessories Categories */
.accessories-category__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text, #212529);
  display: flex;
  align-items: center;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eee;
}

.accessories-category__title i {
  color: var(--ad-accent, #c9a962);
}

/* ==========================================================================
   Bid History Table
   ========================================================================== */
.bid-history-table {
  width: 100%;
  border-collapse: collapse;
}

.bid-history-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  background: #f8f9fa;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--color-text-secondary, #6c757d);
  border-bottom: 2px solid #dee2e6;
}

.bid-history-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #eee;
}

.bid-history-table tr:hover {
  background: #f8f9fa;
}

.bidder-name {
  color: var(--color-text, #212529);
}

.bidder-name i {
  margin-right: 0.5rem;
  color: var(--color-text-muted, #adb5bd);
}

.bid-amount {
  font-weight: 700;
  color: var(--ad-success);
}

.bid-time {
  color: var(--color-text-muted, #adb5bd);
  font-size: 0.9rem;
}

/* ==========================================================================
   Bid Panel (Sticky Sidebar)
   ========================================================================== */
#bid-panel {
  position: sticky;
  top: calc(var(--header-height, 70px) + 1rem);
}

.bid-panel {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  overflow: hidden;
}

.bid-panel__header {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  padding: 1rem 1.5rem;
  text-align: center;
}

.bid-panel__status {
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.live-dot {
  width: 10px;
  height: 10px;
  background: #28a745;
  border-radius: 50%;
  animation: livePulse 1.5s infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.2); }
}

.bid-panel__body {
  padding: 1.5rem;
}

/* ==========================================================================
   Current Bid Display
   ========================================================================== */
.current-bid-display {
  text-align: center;
  margin-bottom: 1.5rem;
}

.current-bid-label {
  font-size: 0.85rem;
  color: var(--color-text-muted, #adb5bd);
  text-transform: uppercase;
}

.current-bid-amount {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--ad-accent);
  line-height: 1.2;
}

.current-bid-count {
  font-size: 0.9rem;
  color: var(--color-text-secondary, #6c757d);
}

/* ==========================================================================
   Countdown Display
   ========================================================================== */
.countdown-display {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.countdown-item {
  text-align: center;
}

.countdown-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-text, #212529);
  line-height: 1;
}

.countdown-label {
  font-size: 0.7rem;
  color: var(--color-text-muted, #adb5bd);
  text-transform: uppercase;
}

.countdown-separator {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-text-muted, #adb5bd);
  line-height: 1;
}

.countdown-urgent {
  background: rgba(220, 53, 69, 0.1);
  animation: countdownPulse 1s infinite;
}

.countdown-urgent .countdown-value {
  color: var(--ad-danger);
}

@keyframes countdownPulse {
  0%, 100% { background: rgba(220, 53, 69, 0.1); }
  50% { background: rgba(220, 53, 69, 0.2); }
}

/* ==========================================================================
   Bid Form
   ========================================================================== */
.bid-form__label {
  display: block;
  font-size: 0.85rem;
  color: var(--color-text-secondary, #6c757d);
  margin-bottom: 0.5rem;
}

.bid-form__input-group {
  display: flex;
  margin-bottom: 0.5rem;
}

.bid-form__input {
  flex: 1;
  padding: 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  border: 2px solid #ddd;
  border-radius: 8px 0 0 8px;
  transition: border-color 0.2s;
}

.bid-form__input:focus {
  outline: none;
  border-color: var(--color-primary, #c9a962);
}

.bid-form__suffix {
  display: flex;
  align-items: center;
  padding: 0 1rem;
  background: #f0f0f0;
  border: 2px solid #ddd;
  border-left: none;
  border-radius: 0 8px 8px 0;
  font-weight: 600;
  color: var(--color-text-secondary, #6c757d);
}

.bid-form__hint {
  font-size: 0.8rem;
  color: var(--color-text-muted, #adb5bd);
  margin-bottom: 1rem;
}

.btn-place-bid {
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--color-primary, #c9a962);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-place-bid:hover {
  background: var(--color-primary-dark, #b8954f);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-place-bid:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.bid-terms {
  font-size: 0.75rem;
  color: var(--color-text-muted, #adb5bd);
  text-align: center;
  margin-top: 1rem;
  margin-bottom: 0;
}

.bid-terms a {
  color: var(--color-primary, #c9a962);
}

/* ==========================================================================
   Proxy Bid Section
   ========================================================================== */
.proxy-bid-section {
  padding-top: 0.5rem;
}

.proxy-bid-info {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.proxy-bid-info__label {
  color: var(--color-text-secondary, #6c757d);
  font-size: 0.85rem;
}

.proxy-bid-info__value {
  font-weight: 700;
  color: var(--ad-accent);
}

/* ==========================================================================
   Auction Info
   ========================================================================== */
.auction-info {
  border-top: 1px solid #eee;
  margin-top: 1.5rem;
  padding-top: 1rem;
}

.auction-info__row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: 0.9rem;
}

.auction-info__label {
  color: var(--color-text-muted, #adb5bd);
}

.auction-info__value {
  font-weight: 600;
}

/* ==========================================================================
   Animations
   ========================================================================== */
.bid-panel.flash-update {
  animation: bidPanelFlash 0.5s ease;
}

@keyframes bidPanelFlash {
  0%, 100% { box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
  50% { box-shadow: 0 4px 30px rgba(40, 167, 69, 0.4); }
}

/* ==========================================================================
   Toast Container (shared with auction-list)
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: #333;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastSlideIn 0.3s ease;
  min-width: 250px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.toast--success {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.toast--warning {
  background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
}

.toast--error {
  background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
}

.toast--info {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

@keyframes toastSlideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */
@media (max-width: 991px) {
  .auction-details-hero__title {
    font-size: 1.5rem;
  }

  .auction-details-hero__content {
    flex-direction: column;
  }

  .auction-details-hero__actions {
    width: 100%;
    justify-content: center;
  }

  #bid-panel {
    position: static;
  }

  .bid-panel {
    margin-top: 1.5rem;
  }

  .current-bid-amount {
    font-size: 2rem;
  }
}

@media (max-width: 767px) {
  .auction-details-hero {
    padding: 1.25rem 0;
  }

  .auction-details-hero__title {
    font-size: 1.25rem;
  }

  .auction-details-hero__meta {
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.85rem;
  }

  .auction-details-hero__actions .btn {
    flex: 1;
    text-align: center;
    min-width: 0;
    padding: 0.5rem;
  }

  .auction-details__content {
    padding: 1rem 0;
  }

  .specs-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .equipment-grid {
    grid-template-columns: 1fr;
  }

  .countdown-display {
    padding: 0.75rem;
  }

  .countdown-value {
    font-size: 1.25rem;
  }

  .bid-form__input {
    font-size: 1rem;
    padding: 0.75rem;
  }

  .toast-container {
    left: 10px;
    right: 10px;
    bottom: 10px;
  }

  .toast {
    min-width: auto;
  }
}
