/* Store Management Component */
.store-management {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
}

.store-management-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.store-management-header h2 {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

/* Form Card */
.store-form-card {
  background: var(--card-bg);
  border: 2px solid var(--primary);
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.store-form-card h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 1.5rem 0;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  background: var(--background);
  color: var(--text-primary);
  font-family: inherit;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.form-group textarea {
  resize: vertical;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
}

.form-hint {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Zone Input Section */
.zone-input-container {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.zone-input-container input {
  flex: 1 1 300px;
  width: auto !important;
  min-width: 200px;
  max-width: 100%;
}

.zone-input-container .btn-small {
  flex: 0 0 auto;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  white-space: nowrap;
}

/* Zones List (Chips in Form) */
.zones-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  min-height: 50px;
}

.zone-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-primary);
  color: white;
  padding: 0.4rem 0.7rem;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1;
}

.zone-remove {
  background: none;
  border: none;
  color: white;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  margin: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.zone-remove:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Store Zones Display (in cards) */
.store-zones-display {
  margin-top: 0.75rem;
}

.zones-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.zones-list-display {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.zone-badge {
  display: inline-block;
  background: var(--color-primary);
  color: white;
  padding: 0.3rem 0.7rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 2rem;
}

/* Stores Grid */
.stores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.store-admin-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.store-admin-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.store-admin-info h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.75rem 0;
}

.store-zones {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0.5rem 0;
  word-break: break-word;
}

.store-meta {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin: 0.5rem 0 0 0;
  font-family: monospace;
}

.store-admin-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: auto;
}

.store-admin-actions button {
  flex: 1;
}

.empty-message {
  text-align: center;
  color: var(--text-secondary);
  padding: 3rem;
  grid-column: 1 / -1;
}

/* Responsive */
@media (max-width: 768px) {
  .store-management {
    padding: 1rem;
  }

  .store-management-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .store-management-header button {
    width: 100%;
  }

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

  .store-form-card {
    padding: 1.5rem;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

  .form-actions button {
    width: 100%;
  }
}
