/**
 * Market component styles
 */

/* Market Modal */
.market-content {
  max-width: 900px;
}

/* Market Tabs */
.market-tabs {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.market-tab {
  padding: 10px 20px;
  background: linear-gradient(45deg, #D2B48C, #CD853F);
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  font-size: 16px;
}

.market-tab:hover {
  background: linear-gradient(45deg, #DEB887, #D2691E);
  transform: translateY(-2px);
}

.market-tab.active {
  background: linear-gradient(45deg, #A0522D, #8B4513);
  box-shadow: 0 0 10px rgba(160, 120, 80, 0.5);
}

.market-tab-content {
  display: none;
  padding: 20px;
}

.market-tab-content.active {
  display: block;
}

/* Market Filters */
.market-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
  background: rgba(210, 180, 140, 0.1);
  padding: 15px;
  border-radius: 8px;
}

.filter-group {
  flex: 1;
  min-width: 200px;
}

.filter-group label {
  display: block;
  margin-bottom: 5px;
  color: #8B4513;
  font-weight: bold;
}

.filter-group select {
  width: 100%;
  padding: 8px;
  border-radius: 5px;
  border: 1px solid rgba(210, 180, 140, 0.5);
  background: rgba(255, 248, 231, 0.9);
  font-size: 14px;
  color: #8B4513;
}

/* Market Listings */
.market-listings {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-height: 500px;
  overflow-y: auto;
}

.market-listing {
  display: flex;
  align-items: center;
  background: rgba(210, 180, 140, 0.1);
  border: 1px solid rgba(210, 180, 140, 0.3);
  border-radius: 8px;
  padding: 15px;
  transition: all 0.3s ease;
}

.market-listing:hover {
  background: rgba(210, 180, 140, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.listing-tower {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  margin-right: 15px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.listing-variant {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  position: absolute;
  top: -5px;
  right: -5px;
  border: 2px solid #FFF;
}

.listing-info {
  flex: 1;
}

.listing-name {
  font-weight: bold;
  color: #8B4513;
  margin-bottom: 5px;
}

.listing-seller, .listing-time {
  font-size: 12px;
  color: #A0522D;
}

.listing-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin: 0 15px;
}

.price-amount {
  font-size: 18px;
  font-weight: bold;
  color: #E91E63;
}

.price-currency {
  font-size: 12px;
  color: #E91E63;
}

.buy-btn, .cancel-btn {
  padding: 8px 15px;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.buy-btn {
  background: linear-gradient(45deg, #E91E63, #9C27B0);
  color: white;
}

.buy-btn:hover {
  background: linear-gradient(45deg, #F06292, #BA68C8);
  transform: translateY(-2px);
}

.cancel-btn {
  background: linear-gradient(45deg, #F44336, #D32F2F);
  color: white;
}

.cancel-btn:hover {
  background: linear-gradient(45deg, #EF5350, #E57373);
  transform: translateY(-2px);
}

/* Sell Form */
.sell-form {
  background: rgba(210, 180, 140, 0.1);
  border-radius: 8px;
  padding: 20px;
  max-width: 500px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  color: #8B4513;
  font-weight: bold;
}

.form-group select, .form-group input {
  width: 100%;
  padding: 10px;
  border-radius: 5px;
  border: 1px solid rgba(210, 180, 140, 0.5);
  background: rgba(255, 248, 231, 0.9);
  font-size: 14px;
  color: #8B4513;
}

.market-action-btn {
  display: block;
  width: 100%;
  padding: 12px;
  background: linear-gradient(45deg, #E91E63, #9C27B0);
  color: white;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 20px;
}

.market-action-btn:hover {
  background: linear-gradient(45deg, #F06292, #BA68C8);
  transform: translateY(-2px);
}

/* Empty Message */
.empty-message {
  text-align: center;
  padding: 30px;
  color: #8B4513;
  font-style: italic;
  background: rgba(210, 180, 140, 0.1);
  border-radius: 8px;
}

/* Inventory Count Badge */
.inventory-count-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #E91E63;
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 12px;
  font-weight: bold;
  border: 2px solid white;
}

/* Inventory Item Actions */
.inventory-item-actions {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 10px;
}

.sell-button, .market-button {
  padding: 5px 10px;
  border: none;
  border-radius: 5px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.sell-button {
  background: linear-gradient(45deg, #F44336, #D32F2F);
  color: white;
}

.sell-button:hover {
  background: linear-gradient(45deg, #EF5350, #E57373);
}

.market-button {
  background: linear-gradient(45deg, #E91E63, #9C27B0);
  color: white;
}

.market-button:hover {
  background: linear-gradient(45deg, #F06292, #BA68C8);
}

/* Inventory Item Stats */
.inventory-item-stats {
  margin-top: 5px;
  font-size: 12px;
  color: #8B4513;
}

.stat-bonus {
  margin-bottom: 2px;
  font-weight: bold;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .market-filters {
    flex-direction: column;
  }
  
  .filter-group {
    width: 100%;
  }
  
  .market-listing {
    flex-wrap: wrap;
  }
  
  .listing-price {
    margin: 10px 0;
  }
  
  .buy-btn, .cancel-btn {
    width: 100%;
    margin-top: 10px;
  }
}
