/* shops.css — Shops page-specific styles */

/* Search & Filters */
.controls {
  max-width: 1200px;
  margin: 16px auto;
  padding: 0 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.search-box {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 10px 14px 10px 36px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: border 0.2s;
}

.search-box input:focus {
  border-color: var(--gold);
}

.search-box::before {
  content: '\1F50D';
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
}

.search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  color: var(--text2);
  cursor: pointer;
  font-size: 0.7rem;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  line-height: 1;
}

.search-clear:hover {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

.filter-group {
  display: flex;
  gap: 6px;
  align-items: center;
}

.filter-group label {
  font-size: 0.75rem;
  color: var(--text2);
}

.filter-group input {
  padding: 8px 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.8rem;
  width: 100px;
}

.filter-group select {
  padding: 8px 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.8rem;
  min-width: 150px;
}

/* Shop grid */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 14px;
}

/* Shop card */
.shop-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.2s;
}

.shop-card:hover {
  border-color: var(--gold3);
  box-shadow: 0 4px 20px var(--shadow);
}

.shop-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
}

.shop-icon {
  font-size: 1.6rem;
}

.shop-info {
  flex: 1;
  min-width: 0;
}

.shop-name {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--gold2);
}

.shop-owner {
  font-size: 0.7rem;
  color: var(--text3);
  margin-top: 2px;
}

.shop-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.shop-pos {
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 0.65rem;
  color: var(--text2);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.shop-pos:hover {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
}

.shop-pos.copied {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.shop-time {
  font-size: 0.6rem;
  color: var(--text3);
}

/* Shop items list */
.shop-items {
  padding: 10px 16px;
}

.item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(48, 54, 61, 0.5);
  gap: 8px;
  font-size: 0.82rem;
}

.item-row:last-child {
  border-bottom: none;
}

.item-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-qty {
  color: var(--text3);
  font-size: 0.75rem;
  min-width: 35px;
  text-align: right;
}

.item-price {
  color: var(--gold);
  font-weight: 600;
  min-width: 80px;
  text-align: right;
  white-space: nowrap;
}

/* Item info button (wiki link) */
.item-info-btn {
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0 4px;
  transition: color 0.2s;
  flex-shrink: 0;
}

.item-info-btn:hover {
  color: var(--gold);
}

/* Refresh indicator */
.refresh-bar {
  position: fixed;
  bottom: 12px;
  right: 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  color: var(--text3);
  display: flex;
  align-items: center;
  gap: 6px;
}

.refresh-dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Responsive */
@media (max-width: 600px) {
  .controls {
    flex-direction: column;
  }

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

  .filter-group {
    flex-wrap: wrap;
    justify-content: center;
  }
}
