/**
 * Live Auction Legacy Styles
 * NOTE: CSS variables are now set via inline styles from UI Settings
 * Do NOT add :root variables here - they will override inline styles
 */

.ae-live-fullbleed {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  box-sizing: border-box;
}

.ae-ui-alert {
  padding: 16px 18px;
  border-radius: var(--ae-border-radius);
  border: 1px solid var(--ae-bg-border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--ae-text-primary);
  font-family: var(--ae-font-family);
}

.ae-ui-alert--error {
  border-left: 4px solid var(--ae-danger);
  background: rgba(244, 67, 54, 0.15);
}

/* ===== Live participant view ===== */
.ae-participant-live {
  background: var(--ae-bg-primary);
  color: var(--ae-text-primary);
  font-family: var(--ae-font-family);
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  grid-template-rows: 1fr;
  gap: 0;
  min-height: 100vh;
}

.ae-jitsi-container {
  grid-column: 1;
  grid-row: 1;
  background: #000;
  position: relative;
  overflow: hidden;
  border-right: 1px solid var(--ae-bg-border);
  min-height: 100vh;
}

.ae-jitsi-embed {
  width: 100%;
  height: 100%;
}

.ae-jitsi-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.ae-jitsi-readonly-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.ae-readonly-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255, 152, 0, 0.9);
  color: #fff;
  padding: 5px 10px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.ae-pin-control {
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 12;
  background: rgba(76, 175, 80, 0.9);
  color: #fff;
  border: 0;
  padding: 8px 12px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  display: none;
  text-transform: uppercase;
  transition: opacity 0.2s;
  pointer-events: auto;
}

.ae-pin-control:hover {
  opacity: 0.9;
}

.ae-jitsi-container.is-auctioneer .ae-pin-control {
  display: block;
}

.ae-sidebar {
  grid-column: 2;
  grid-row: 1;
  background: var(--ae-bg-secondary);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  min-height: 100vh;
}

.ae-lot-info {
  background: var(--ae-bg-secondary);
  border-bottom: 1px solid var(--ae-bg-border);
  padding: 15px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.ae-lot-section-title {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--ae-text-label);
  margin-bottom: 8px;
  font-weight: 700;
}

.ae-lot-number {
  font-size: 20px;
  font-weight: 800;
  color: var(--ae-text-primary);
  margin-bottom: 10px;
  padding: 8px;
  background: var(--ae-bg-tertiary);
  border-radius: var(--ae-border-radius);
}

.ae-lot-carousel {
  position: relative;
  width: 100%;
  height: 100px;
  background: var(--ae-bg-tertiary);
  border-radius: var(--ae-border-radius);
  margin-bottom: 10px;
  overflow: hidden;
}

.ae-lot-carousel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ae-lot-carousel-nav {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
}

.ae-carousel-dot {
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
}

.ae-carousel-dot.active {
  background: var(--ae-text-primary);
}

.ae-lot-detail-item {
  margin-bottom: 10px;
  font-size: 12px;
}

.ae-lot-detail-label {
  color: var(--ae-text-label);
  font-size: 10px;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.ae-lot-detail-value {
  color: var(--ae-text-primary);
  font-size: 13px;
  font-weight: 600;
}

.ae-reserve-price {
  background: var(--ae-bg-border);
  padding: 6px;
  border-radius: 3px;
  font-size: 11px;
}

.ae-bid-panel {
  background: var(--ae-bg-tertiary);
  border-top: 1px solid var(--ae-bg-border);
  border-bottom: 1px solid var(--ae-bg-border);
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  flex-shrink: 0;
}

.ae-current-bid {
  background: var(--ae-bg-secondary);
  padding: 15px;
  border-radius: var(--ae-border-radius);
  text-align: center;
}

.ae-bid-label {
  font-size: 11px;
  color: var(--ae-text-label);
  text-transform: uppercase;
  margin-bottom: 5px;
}

.ae-bid-amount {
  font-size: 28px;
  font-weight: 900;
  color: var(--ae-primary);
  margin-bottom: 5px;
}

.ae-bid-paddle {
  font-size: 12px;
  color: var(--ae-text-secondary);
}

.ae-bid-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
  align-items: center;
}

.ae-place-bid-button {
  background: var(--ae-primary);
  color: #fff;
  border: 0;
  padding: 15px 30px;
  border-radius: var(--ae-border-radius);
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  width: 100%;
  transition: opacity 0.2s;
}

.ae-place-bid-button:hover {
  opacity: 0.9;
}

.ae-bid-info {
  background: rgba(76, 175, 80, 0.1);
  border: 1px solid var(--ae-primary);
  padding: 10px;
  border-radius: var(--ae-border-radius);
  text-align: center;
  font-size: 12px;
  color: var(--ae-text-secondary);
  width: 100%;
}

.ae-activity-feed {
  background: var(--ae-bg-secondary);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 200px;
}

.ae-activity-title {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--ae-text-label);
  padding: 10px;
  border-bottom: 1px solid var(--ae-bg-border);
  font-weight: 700;
  background: var(--ae-bg-border);
  flex-shrink: 0;
}

.ae-activity-list {
  padding: 10px 0;
  overflow-y: auto;
  flex: 1;
}

.ae-activity-empty {
  padding: 20px;
  text-align: center;
  color: #666;
  font-size: 12px;
}

.ae-activity-item {
  padding: 10px;
  border-bottom: 1px solid var(--ae-bg-border);
  font-size: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ae-activity-paddle {
  color: var(--ae-primary);
  font-weight: 900;
}

.ae-activity-amount {
  color: var(--ae-text-primary);
  text-align: right;
}

.ae-activity-source {
  grid-column: 1 / -1;
  color: var(--ae-text-label);
  font-size: 10px;
  margin-top: 3px;
}

/* SOLD overlay */
.ae-sold-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 8000;
}

.ae-sold-overlay.active {
  display: flex;
}

.ae-sold-message {
  background: var(--ae-danger);
  color: #fff;
  padding: 20px 30px;
  border-radius: 10px;
  font-size: 42px;
  font-weight: 900;
  letter-spacing: 2px;
}

/* Participant winner announcement */
.ae-participant-winner-announcement {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 8888;
  background: linear-gradient(135deg, #FFD700 0%, #FFC700 100%);
  padding: 60px 50px;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
  max-width: 650px;
  text-align: center;
  font-family: Arial, sans-serif;
}

.ae-participant-winner-title {
  font-size: 64px;
  margin-bottom: 25px;
  letter-spacing: 2px;
  font-weight: 900;
  color: #1a1a1a;
}

.ae-participant-winner-lot {
  font-size: 42px;
  margin-bottom: 20px;
  font-weight: 900;
  color: #1a1a1a;
}

.ae-participant-winner-lot span {
  color: #c41e3a;
}

.ae-participant-winner-paddle {
  font-size: 36px;
  margin-bottom: 20px;
  color: #1a1a1a;
}

.ae-participant-winner-amount {
  font-size: 44px;
  margin-bottom: 25px;
  font-weight: 900;
  color: #c41e3a;
}

.ae-participant-winner-countdown {
  font-size: 16px;
  color: #333;
  margin-top: 25px;
  font-weight: 700;
}

/* ===== States (no-auction / countdown / ended) ===== */
.ae-live-state {
  background: var(--ae-bg-primary);
  color: var(--ae-text-primary);
  font-family: var(--ae-font-family);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.ae-live-state-card {
  text-align: center;
  max-width: 600px;
  width: 100%;
}

.ae-live-state-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.ae-live-state-title {
  margin: 0 0 15px 0;
  color: var(--ae-text-primary);
}

.ae-live-state-subtitle {
  margin: 0 0 30px 0;
  color: var(--ae-text-secondary);
  line-height: 1.6;
}

.ae-live-state-panel {
  background: var(--ae-bg-secondary);
  padding: 20px;
  border-radius: var(--ae-border-radius);
  margin-bottom: 30px;
}

.ae-live-state-btnrow {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.ae-live-btn {
  background: var(--ae-primary);
  color: #fff;
  border: 0;
  padding: 12px 30px;
  border-radius: var(--ae-border-radius);
  font-weight: 900;
  cursor: pointer;
  font-size: 14px;
  display: inline-block;
  text-decoration: none;
}

.ae-live-btn.secondary {
  background: var(--ae-bg-tertiary);
}

.ae-live-countdown {
  font-size: 48px;
  font-weight: 900;
  color: var(--ae-accent);
  font-family: "Courier New", monospace;
}

.ae-live-cover {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: var(--ae-border-radius);
  margin-bottom: 30px;
}

.ae-live-cover-placeholder {
  background: var(--ae-bg-secondary);
  height: 300px;
  border-radius: var(--ae-border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
  font-size: 60px;
}

/* Responsive */
@media (max-width: 1024px) {
  .ae-participant-live {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .ae-jitsi-container {
    grid-column: 1;
    grid-row: 1;
    height: 30vh;
    min-height: 30vh;
    border-right: none;
    border-bottom: 1px solid var(--ae-bg-border);
  }

  .ae-sidebar {
    grid-column: 1;
    grid-row: 2;
  }
}
