/**
 * 골드 확정 배정 + 막힘 방지 시스템 스타일
 * 쇠구컵 2 드래프트용
 */

/* ==========================================
   골드 현황판 (선수카드 내부 인라인)
   ========================================== */
#gold-status-panel {
  /* 인라인 배치 - position 제거 */
  position: static;
  width: 200px;
  flex-shrink: 0;
  max-height: none;
  overflow-y: visible;
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.98) 0%, rgba(22, 33, 62, 0.98) 100%);
  border: 2px solid rgba(255, 215, 0, 0.3);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  z-index: 1;
  display: none; /* 기본 숨김, JS에서 표시 */
}

/* 인라인 클래스 (draft.html에서 사용) */
.gold-panel-inline {
  position: static !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  bottom: auto !important;
  width: 200px !important;
  flex-shrink: 0;
}

.gold-panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 184, 0, 0.1) 100%);
  border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.gold-panel-icon {
  font-size: 20px;
}

.gold-panel-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--gold-primary, #ffd700);
}

.gold-panel-content {
  padding: 12px 16px;
}

.gold-remaining {
  margin-bottom: 12px;
}

.gold-remaining-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary, #a0aec0);
  margin-bottom: 8px;
}

.gold-remaining-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.gold-player-tag {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(255, 215, 0, 0.15);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--gold-primary, #ffd700);
}

.gold-teams-status {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 12px;
}

.gold-teams-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary, #a0aec0);
  margin-bottom: 8px;
}

.gold-team-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  margin-bottom: 4px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  font-size: 12px;
  transition: all 0.2s ease;
}

.gold-team-row.warning {
  background: rgba(255, 184, 0, 0.15);
  border: 1px solid rgba(255, 184, 0, 0.3);
}

.gold-team-row.danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.gold-team-name {
  font-weight: 600;
  color: var(--text-primary, #fff);
}

.gold-team-options {
  color: var(--text-secondary, #a0aec0);
}

.gold-team-row.warning .gold-team-options {
  color: #ffb800;
}

.gold-team-row.danger .gold-team-options {
  color: #ef4444;
}

.no-options {
  color: #ef4444;
  font-weight: 600;
}


/* ==========================================
   위험 경고 배너
   ========================================== */
#gold-warning-banner,
.gold-warning-banner {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: linear-gradient(135deg, rgba(255, 184, 0, 0.95) 0%, rgba(255, 140, 0, 0.95) 100%);
  border: 2px solid rgba(255, 215, 0, 0.5);
  border-radius: 12px;
  padding: 16px 24px;
  box-shadow: 0 8px 32px rgba(255, 184, 0, 0.4);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

#gold-warning-banner.show,
.gold-warning-banner.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.gold-warning-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gold-warning-icon {
  font-size: 24px;
  animation: warningPulse 1s ease infinite;
}

@keyframes warningPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.gold-warning-text {
  font-size: 14px;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.4;
}


/* ==========================================
   확정 배정 알림 오버레이
   ========================================== */
.gold-auto-assign-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.gold-auto-assign-overlay.show {
  opacity: 1;
  visibility: visible;
}

.gold-auto-assign-content {
  text-align: center;
  transform: scale(0.8);
  transition: transform 0.3s ease;
}

.gold-auto-assign-overlay.show .gold-auto-assign-content {
  transform: scale(1);
  animation: popIn 0.5s ease;
}

@keyframes popIn {
  0% { transform: scale(0.5); opacity: 0; }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.gold-auto-assign-icon {
  font-size: 80px;
  margin-bottom: 16px;
  animation: lockShake 0.5s ease;
}

@keyframes lockShake {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-10deg); }
  75% { transform: rotate(10deg); }
}

.gold-auto-assign-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--gold-primary, #ffd700);
  margin-bottom: 16px;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.gold-auto-assign-messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gold-auto-assign-msg {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  padding: 12px 24px;
  background: rgba(79, 209, 197, 0.2);
  border: 1px solid rgba(79, 209, 197, 0.4);
  border-radius: 8px;
}


/* ==========================================
   입찰 차단 알림
   ========================================== */
.bid-blocked-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.bid-blocked-overlay.show {
  opacity: 1;
  visibility: visible;
}

.bid-blocked-content {
  text-align: center;
  background: linear-gradient(135deg, #2d1f1f 0%, #1a1a2e 100%);
  border: 2px solid rgba(239, 68, 68, 0.5);
  border-radius: 20px;
  padding: 32px 48px;
  max-width: 500px;
  transform: scale(0.8);
  transition: transform 0.3s ease;
}

.bid-blocked-overlay.show .bid-blocked-content {
  transform: scale(1);
}

.bid-blocked-icon {
  font-size: 64px;
  margin-bottom: 16px;
  animation: blockShake 0.5s ease;
}

@keyframes blockShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-10px); }
  40%, 80% { transform: translateX(10px); }
}

.bid-blocked-title {
  font-size: 28px;
  font-weight: 700;
  color: #ef4444;
  margin-bottom: 16px;
}

.bid-blocked-reason {
  font-size: 16px;
  color: var(--text-primary, #fff);
  line-height: 1.6;
  margin-bottom: 24px;
  padding: 16px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
}

.bid-blocked-close {
  padding: 12px 32px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bid-blocked-close:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
}


/* ==========================================
   모바일 대응
   ========================================== */
@media (max-width: 768px) {
  #gold-status-panel {
    width: 100% !important;
    max-width: none !important;
  }
  
  #gold-warning-banner,
  .gold-warning-banner {
    width: calc(100% - 40px);
    max-width: 400px;
    padding: 12px 16px;
  }
  
  .gold-warning-text {
    font-size: 13px;
  }
  
  .gold-auto-assign-title {
    font-size: 24px;
  }
  
  .gold-auto-assign-msg {
    font-size: 14px;
    padding: 10px 16px;
  }
  
  .bid-blocked-content {
    padding: 24px;
    margin: 20px;
  }
  
  .bid-blocked-title {
    font-size: 22px;
  }
  
  .bid-blocked-reason {
    font-size: 14px;
  }
}


/* ==========================================
   드래프트 게임 모달 내 현황판 - 인라인 배치
   ========================================== */
.draft-game-content #gold-status-panel {
  position: static !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
}
